diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..fdf56e4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,37 @@ +name: Lint + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch pre-commit + - name: Run pre-commit + run: pre-commit run --all-files + + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install and run Ruff + uses: astral-sh/ruff-action@v3 + with: + src: "./ibutsu_client" + args: "check --output-format=github" + - name: Run Ruff formatter + uses: astral-sh/ruff-action@v3 + with: + src: "./ibutsu_client" + args: "format --check" diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4e1ef42..6c96c13 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,31 +1,38 @@ -# This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: Upload Python Package +name: publish to pypi on: - release: - types: [created] + push: + tags: + - '*' jobs: deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v4 + with: + # Fetch full history for proper version detection + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: pip install hatch + - name: Build artifacts + run: hatch build + - name: Deploy to PyPI + uses: pypa/gh-action-pypi-publish@v1.12.4 + with: + password: ${{ secrets.PYPI_TOKEN }} + print-hash: true + skip-existing: true + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} + draft: false + prerelease: false + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bbd4b1..38b53e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,27 +1,39 @@ -name: Ibutsu Client Unit Tests +name: ibutsu-client-python tests on: push: branches: - master + - main pull_request: types: ["opened", "synchronize", "reopened"] create: jobs: - tests: + test: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies with Python ${{ matrix.python-version }} - run: | - pip install -U -r requirements.txt - pip install -U -r test-requirements.txt - - name: Run tests - run: pytest --cov=ibutsu_client + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch + - name: Install project with test dependencies + run: hatch env create + - name: Test with pytest and coverage + run: hatch run test:pytest test/ --cov=ibutsu_client --cov-report=term-missing --cov-report=xml --cov-report=html --cov-branch + - name: Upload coverage to Codecov + if: matrix.python-version == '3.12' + uses: codecov/codecov-action@v5 + with: + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index fa0eef9..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=ibutsu_client - -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests - image: python:3.7-alpine -test-3.8: - extends: .tests - image: python:3.8-alpine -test-3.9: - extends: .tests - image: python:3.9-alpine diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6d54bbd..5fe6072 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +6.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8d96818 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,36 @@ +exclude: "docs" +repos: + +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.13.0 + hooks: + - id: ruff-check + args: [ --fix ] + - id: ruff-format +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: debug-statements + +- repo: https://github.com/asottile/pyupgrade + rev: v3.20.0 + hooks: + - id: pyupgrade + args: [--py38-plus] +- repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.18.1 + hooks: + - id: mypy + language_version: python3 + exclude: ^ibutsu_client/ + additional_dependencies: + - python-dateutil + - urllib3 + - types-python-dateutil + +ci: + skip: ["ruff-check", "ruff-format"] + autofix_prs: true diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6434642 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,10 @@ +- Use `hatch` for interacting with the project's building and environment configuration +- Use `pre-commit run` to include all lint checks and auto fixes +- Automatically work to resolve failures in the pre-commit output +- Do not include excessive emoji in readme, contributing, and other documentation files +- Use pytest parametrization over subtests + +## Testing instructions +- Find the CI plan in the .github/workflows folder. +- From the package root you can just call `hatch test` or `pytest -x`. The commit should pass all tests before proceeding +- Add or update tests for the code you change, even if nobody asked. diff --git a/README.md b/README.md index 05c382b..8564aa6 100644 --- a/README.md +++ b/README.md @@ -125,14 +125,14 @@ Class | Method | HTTP request | Description *HealthApi* | [**get_health_info**](docs/HealthApi.md#get_health_info) | **GET** /health/info | Get information about the server *ImportApi* | [**add_import**](docs/ImportApi.md#add_import) | **POST** /import | Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive *ImportApi* | [**get_import**](docs/ImportApi.md#get_import) | **GET** /import/{id} | Get the status of an import -*LoginApi* | [**activate**](docs/LoginApi.md#activate) | **GET** /login/activate/{activation_code} | -*LoginApi* | [**auth**](docs/LoginApi.md#auth) | **GET** /login/auth/{provider} | -*LoginApi* | [**config**](docs/LoginApi.md#config) | **GET** /login/config/{provider} | -*LoginApi* | [**login**](docs/LoginApi.md#login) | **POST** /login | -*LoginApi* | [**recover**](docs/LoginApi.md#recover) | **POST** /login/recover | -*LoginApi* | [**register**](docs/LoginApi.md#register) | **POST** /login/register | -*LoginApi* | [**reset_password**](docs/LoginApi.md#reset_password) | **POST** /login/reset-password | -*LoginApi* | [**support**](docs/LoginApi.md#support) | **GET** /login/support | +*LoginApi* | [**activate**](docs/LoginApi.md#activate) | **GET** /login/activate/{activation_code} | +*LoginApi* | [**auth**](docs/LoginApi.md#auth) | **GET** /login/auth/{provider} | +*LoginApi* | [**config**](docs/LoginApi.md#config) | **GET** /login/config/{provider} | +*LoginApi* | [**login**](docs/LoginApi.md#login) | **POST** /login | +*LoginApi* | [**recover**](docs/LoginApi.md#recover) | **POST** /login/recover | +*LoginApi* | [**register**](docs/LoginApi.md#register) | **POST** /login/register | +*LoginApi* | [**reset_password**](docs/LoginApi.md#reset_password) | **POST** /login/reset-password | +*LoginApi* | [**support**](docs/LoginApi.md#support) | **GET** /login/support | *ProjectApi* | [**add_project**](docs/ProjectApi.md#add_project) | **POST** /project | Create a project *ProjectApi* | [**get_project**](docs/ProjectApi.md#get_project) | **GET** /project/{id} | Get a single project by ID *ProjectApi* | [**get_project_list**](docs/ProjectApi.md#get_project_list) | **GET** /project | Get a list of projects @@ -243,4 +243,3 @@ import ibutsu_client from ibutsu_client.apis import * from ibutsu_client.models import * ``` - diff --git a/ibutsu_client/__init__.py b/ibutsu_client/__init__.py index b3d268f..2534802 100644 --- a/ibutsu_client/__init__.py +++ b/ibutsu_client/__init__.py @@ -1,17 +1,25 @@ -# flake8: noqa - """ Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - __version__ = "2.3.0" +__all__ = [ + "ApiAttributeError", + "ApiClient", + "ApiException", + "ApiKeyError", + "ApiTypeError", + "ApiValueError", + "Configuration", + "OpenApiException", +] + # import ApiClient from ibutsu_client.api_client import ApiClient @@ -19,9 +27,11 @@ from ibutsu_client.configuration import Configuration # import exceptions -from ibutsu_client.exceptions import OpenApiException -from ibutsu_client.exceptions import ApiAttributeError -from ibutsu_client.exceptions import ApiTypeError -from ibutsu_client.exceptions import ApiValueError -from ibutsu_client.exceptions import ApiKeyError -from ibutsu_client.exceptions import ApiException +from ibutsu_client.exceptions import ( + ApiAttributeError, + ApiException, + ApiKeyError, + ApiTypeError, + ApiValueError, + OpenApiException, +) diff --git a/ibutsu_client/api/admin_project_management_api.py b/ibutsu_client/api/admin_project_management_api.py index 3e25f18..5cd310e 100644 --- a/ibutsu_client/api/admin_project_management_api.py +++ b/ibutsu_client/api/admin_project_management_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.project import Project from ibutsu_client.model.project_list import ProjectList -class AdminProjectManagementApi(object): +class AdminProjectManagementApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,277 +26,208 @@ def __init__(self, api_client=None): self.api_client = api_client self.admin_add_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/project', - 'operation_id': 'admin_add_project', - 'http_method': 'POST', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/admin/project", + "operation_id": "admin_add_project", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'project', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ + "all": [ + "project", ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "project": (Project,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "project": "body", }, - 'openapi_types': { - 'project': - (Project,), - }, - 'attribute_map': { - }, - 'location_map': { - 'project': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.admin_delete_project_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/project/{id}', - 'operation_id': 'admin_delete_project', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/admin/project/{id}", + "operation_id": "admin_delete_project", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_get_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/project/{id}', - 'operation_id': 'admin_get_project', - 'http_method': 'GET', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/admin/project/{id}", + "operation_id": "admin_get_project", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_get_project_list_endpoint = _Endpoint( settings={ - 'response_type': (ProjectList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/project', - 'operation_id': 'admin_get_project_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (ProjectList,), + "auth": ["jwt"], + "endpoint_path": "/admin/project", + "operation_id": "admin_get_project_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'page', - 'page_size', + "all": [ + "filter", + "page", + "page_size", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "page": (int,), + "page_size": (int,), }, - 'allowed_values': { + "attribute_map": { + "filter": "filter", + "page": "page", + "page_size": "pageSize", }, - 'openapi_types': { - 'filter': - ([str],), - 'page': - (int,), - 'page_size': - (int,), + "location_map": { + "filter": "query", + "page": "query", + "page_size": "query", }, - 'attribute_map': { - 'filter': 'filter', - 'page': 'page', - 'page_size': 'pageSize', + "collection_format_map": { + "filter": "multi", }, - 'location_map': { - 'filter': 'query', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_update_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/project/{id}', - 'operation_id': 'admin_update_project', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/admin/project/{id}", + "operation_id": "admin_update_project", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'project', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", + "project", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'project': - (Project,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "project": (Project,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'project': 'body', + "location_map": { + "id": "path", + "project": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def admin_add_project( - self, - **kwargs - ): - """Administration endpoint to manually add a project. Only accessible to superadmins. # noqa: E501 + def admin_add_project(self, **kwargs): + """Administration endpoint to manually add a project. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -355,39 +274,20 @@ def admin_add_project( 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["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") + 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") return self.admin_add_project_endpoint.call_with_http_info(**kwargs) - def admin_delete_project( - self, - id, - **kwargs - ): - """Administration endpoint to delete a project. Only accessible to superadmins. # noqa: E501 + def admin_delete_project(self, id, **kwargs): + """Administration endpoint to delete a project. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -435,41 +335,21 @@ def admin_delete_project( 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 + 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") + 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") + kwargs["id"] = id return self.admin_delete_project_endpoint.call_with_http_info(**kwargs) - def admin_get_project( - self, - id, - **kwargs - ): - """Administration endpoint to return a project. Only accessible to superadmins. # noqa: E501 + def admin_get_project(self, id, **kwargs): + """Administration endpoint to return a project. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -517,40 +397,21 @@ def admin_get_project( 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 + 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") + 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") + kwargs["id"] = id return self.admin_get_project_endpoint.call_with_http_info(**kwargs) - def admin_get_project_list( - self, - **kwargs - ): - """Administration endpoint to return a list of projects. Only accessible to superadmins. # noqa: E501 + def admin_get_project_list(self, **kwargs): + """Administration endpoint to return a list of projects. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -599,39 +460,20 @@ def admin_get_project_list( 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["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") + 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") return self.admin_get_project_list_endpoint.call_with_http_info(**kwargs) - def admin_update_project( - self, - id, - **kwargs - ): - """Administration endpoint to update a project. Only accessible to superadmins. # noqa: E501 + def admin_update_project(self, id, **kwargs): + """Administration endpoint to update a project. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -680,32 +522,15 @@ def admin_update_project( 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 + 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") + 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") + kwargs["id"] = id return self.admin_update_project_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/admin_user_management_api.py b/ibutsu_client/api/admin_user_management_api.py index f397266..c678ac1 100644 --- a/ibutsu_client/api/admin_user_management_api.py +++ b/ibutsu_client/api/admin_user_management_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.user import User from ibutsu_client.model.user_list import UserList -class AdminUserManagementApi(object): +class AdminUserManagementApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,277 +26,208 @@ def __init__(self, api_client=None): self.api_client = api_client self.admin_add_user_endpoint = _Endpoint( settings={ - 'response_type': (User,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/user', - 'operation_id': 'admin_add_user', - 'http_method': 'POST', - 'servers': None, + "response_type": (User,), + "auth": ["jwt"], + "endpoint_path": "/admin/user", + "operation_id": "admin_add_user", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'user', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ + "all": [ + "user", ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "user": (User,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "user": "body", }, - 'openapi_types': { - 'user': - (User,), - }, - 'attribute_map': { - }, - 'location_map': { - 'user': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.admin_delete_user_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/user/{id}', - 'operation_id': 'admin_delete_user', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/admin/user/{id}", + "operation_id": "admin_delete_user", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_get_user_endpoint = _Endpoint( settings={ - 'response_type': (User,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/user/{id}', - 'operation_id': 'admin_get_user', - 'http_method': 'GET', - 'servers': None, + "response_type": (User,), + "auth": ["jwt"], + "endpoint_path": "/admin/user/{id}", + "operation_id": "admin_get_user", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_get_user_list_endpoint = _Endpoint( settings={ - 'response_type': (UserList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/user', - 'operation_id': 'admin_get_user_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (UserList,), + "auth": ["jwt"], + "endpoint_path": "/admin/user", + "operation_id": "admin_get_user_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'page', - 'page_size', + "all": [ + "filter", + "page", + "page_size", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "page": (int,), + "page_size": (int,), }, - 'allowed_values': { + "attribute_map": { + "filter": "filter", + "page": "page", + "page_size": "pageSize", }, - 'openapi_types': { - 'filter': - ([str],), - 'page': - (int,), - 'page_size': - (int,), + "location_map": { + "filter": "query", + "page": "query", + "page_size": "query", }, - 'attribute_map': { - 'filter': 'filter', - 'page': 'page', - 'page_size': 'pageSize', + "collection_format_map": { + "filter": "multi", }, - 'location_map': { - 'filter': 'query', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.admin_update_user_endpoint = _Endpoint( settings={ - 'response_type': (User,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/admin/user/{id}', - 'operation_id': 'admin_update_user', - 'http_method': 'PUT', - 'servers': None, + "response_type": (User,), + "auth": ["jwt"], + "endpoint_path": "/admin/user/{id}", + "operation_id": "admin_update_user", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'user', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", + "user", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'user': - (User,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "user": (User,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'user': 'body', + "location_map": { + "id": "path", + "user": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def admin_add_user( - self, - **kwargs - ): - """Administration endpoint to manually add a user. Only accessible to superadmins. # noqa: E501 + def admin_add_user(self, **kwargs): + """Administration endpoint to manually add a user. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -355,39 +274,20 @@ def admin_add_user( 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["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") + 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") return self.admin_add_user_endpoint.call_with_http_info(**kwargs) - def admin_delete_user( - self, - id, - **kwargs - ): - """Administration endpoint to delete a user. Only accessible to superadmins. # noqa: E501 + def admin_delete_user(self, id, **kwargs): + """Administration endpoint to delete a user. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -435,41 +335,21 @@ def admin_delete_user( 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 + 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") + 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") + kwargs["id"] = id return self.admin_delete_user_endpoint.call_with_http_info(**kwargs) - def admin_get_user( - self, - id, - **kwargs - ): - """Administration endpoint to return a user. Only accessible to superadmins. # noqa: E501 + def admin_get_user(self, id, **kwargs): + """Administration endpoint to return a user. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -517,40 +397,21 @@ def admin_get_user( 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 + 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") + 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") + kwargs["id"] = id return self.admin_get_user_endpoint.call_with_http_info(**kwargs) - def admin_get_user_list( - self, - **kwargs - ): - """Administration endpoint to return a list of users. Only accessible to superadmins. # noqa: E501 + def admin_get_user_list(self, **kwargs): + """Administration endpoint to return a list of users. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -599,39 +460,20 @@ def admin_get_user_list( 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["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") + 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") return self.admin_get_user_list_endpoint.call_with_http_info(**kwargs) - def admin_update_user( - self, - id, - **kwargs - ): - """Administration endpoint to update a user. Only accessible to superadmins. # noqa: E501 + def admin_update_user(self, id, **kwargs): + """Administration endpoint to update a user. Only accessible to superadmins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -680,32 +522,15 @@ def admin_update_user( 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 + 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") + 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") + kwargs["id"] = id return self.admin_update_user_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/artifact_api.py b/ibutsu_client/api/artifact_api.py index ef9fade..d43a717 100644 --- a/ibutsu_client/api/artifact_api.py +++ b/ibutsu_client/api/artifact_api.py @@ -1,31 +1,25 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint +from ibutsu_client.model.artifact import Artifact +from ibutsu_client.model.artifact_list import ArtifactList +from ibutsu_client.model_utils import ( date, datetime, file_type, none_type, - validate_and_convert_types ) -from ibutsu_client.model.artifact import Artifact -from ibutsu_client.model.artifact_list import ArtifactList -class ArtifactApi(object): +class ArtifactApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,359 +32,285 @@ def __init__(self, api_client=None): self.api_client = api_client self.delete_artifact_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact/{id}', - 'operation_id': 'delete_artifact', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/artifact/{id}", + "operation_id": "delete_artifact", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.download_artifact_endpoint = _Endpoint( settings={ - 'response_type': (file_type,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact/{id}/download', - 'operation_id': 'download_artifact', - 'http_method': 'GET', - 'servers': None, + "response_type": (file_type,), + "auth": ["jwt"], + "endpoint_path": "/artifact/{id}/download", + "operation_id": "download_artifact", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'text/plain', - 'image/jpeg', - 'image/png', - 'image/gif', - 'application/octet-stream' - ], - 'content_type': [], + "accept": [ + "text/plain", + "image/jpeg", + "image/png", + "image/gif", + "application/octet-stream", + ], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_artifact_endpoint = _Endpoint( settings={ - 'response_type': (Artifact,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact/{id}', - 'operation_id': 'get_artifact', - 'http_method': 'GET', - 'servers': None, + "response_type": (Artifact,), + "auth": ["jwt"], + "endpoint_path": "/artifact/{id}", + "operation_id": "get_artifact", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_artifact_list_endpoint = _Endpoint( settings={ - 'response_type': (ArtifactList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact', - 'operation_id': 'get_artifact_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (ArtifactList,), + "auth": ["jwt"], + "endpoint_path": "/artifact", + "operation_id": "get_artifact_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'result_id', - 'run_id', - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "all": [ + "result_id", + "run_id", + "page", + "page_size", + ], + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'result_id': - (str,), - 'run_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "result_id": (str,), + "run_id": (str,), + "page": (int,), + "page_size": (int,), }, - 'attribute_map': { - 'result_id': 'resultId', - 'run_id': 'runId', - 'page': 'page', - 'page_size': 'pageSize', + "attribute_map": { + "result_id": "resultId", + "run_id": "runId", + "page": "page", + "page_size": "pageSize", }, - 'location_map': { - 'result_id': 'query', - 'run_id': 'query', - 'page': 'query', - 'page_size': 'query', + "location_map": { + "result_id": "query", + "run_id": "query", + "page": "query", + "page_size": "query", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.upload_artifact_endpoint = _Endpoint( settings={ - 'response_type': (Artifact,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact', - 'operation_id': 'upload_artifact', - 'http_method': 'POST', - 'servers': None, + "response_type": (Artifact,), + "auth": ["jwt"], + "endpoint_path": "/artifact", + "operation_id": "upload_artifact", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'filename', - 'file', - 'result_id', - 'run_id', - 'additional_metadata', - ], - 'required': [ - 'filename', - 'file', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "all": [ + "filename", + "file", + "result_id", + "run_id", + "additional_metadata", + ], + "required": [ + "filename", + "file", + ], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'filename': - (str,), - 'file': - (file_type,), - 'result_id': - (str,), - 'run_id': - (str,), - 'additional_metadata': - ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filename": (str,), + "file": (file_type,), + "result_id": (str,), + "run_id": (str,), + "additional_metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), }, - 'attribute_map': { - 'filename': 'filename', - 'file': 'file', - 'result_id': 'resultId', - 'run_id': 'runId', - 'additional_metadata': 'additionalMetadata', + "attribute_map": { + "filename": "filename", + "file": "file", + "result_id": "resultId", + "run_id": "runId", + "additional_metadata": "additionalMetadata", }, - 'location_map': { - 'filename': 'form', - 'file': 'form', - 'result_id': 'form', - 'run_id': 'form', - 'additional_metadata': 'form', + "location_map": { + "filename": "form", + "file": "form", + "result_id": "form", + "run_id": "form", + "additional_metadata": "form", }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'multipart/form-data' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, + api_client=api_client, ) self.view_artifact_endpoint = _Endpoint( settings={ - 'response_type': (file_type,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/artifact/{id}/view', - 'operation_id': 'view_artifact', - 'http_method': 'GET', - 'servers': None, + "response_type": (file_type,), + "auth": ["jwt"], + "endpoint_path": "/artifact/{id}/view", + "operation_id": "view_artifact", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'text/plain', - 'image/jpeg', - 'image/png', - 'image/gif', - 'application/octet-stream' - ], - 'content_type': [], + "accept": [ + "text/plain", + "image/jpeg", + "image/png", + "image/gif", + "application/octet-stream", + ], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def delete_artifact( - self, - id, - **kwargs - ): - """Delete an artifact # noqa: E501 + def delete_artifact(self, id, **kwargs): + """Delete an artifact This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -438,41 +358,21 @@ def delete_artifact( 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 + 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") + 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") + kwargs["id"] = id return self.delete_artifact_endpoint.call_with_http_info(**kwargs) - def download_artifact( - self, - id, - **kwargs - ): - """Download an artifact # noqa: E501 + def download_artifact(self, id, **kwargs): + """Download an artifact This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -520,41 +420,21 @@ def download_artifact( 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 + 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") + 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") + kwargs["id"] = id return self.download_artifact_endpoint.call_with_http_info(**kwargs) - def get_artifact( - self, - id, - **kwargs - ): - """Get a single artifact # noqa: E501 + def get_artifact(self, id, **kwargs): + """Get a single artifact This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -602,40 +482,21 @@ def get_artifact( 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 + 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") + 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") + kwargs["id"] = id return self.get_artifact_endpoint.call_with_http_info(**kwargs) - def get_artifact_list( - self, - **kwargs - ): - """Get a (filtered) list of artifacts # noqa: E501 + def get_artifact_list(self, **kwargs): + """Get a (filtered) list of artifacts This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -685,40 +546,20 @@ def get_artifact_list( 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["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") + 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") return self.get_artifact_list_endpoint.call_with_http_info(**kwargs) - def upload_artifact( - self, - filename, - file, - **kwargs - ): - """Uploads a test run artifact # noqa: E501 + def upload_artifact(self, filename, file, **kwargs): + """Uploads a test run artifact This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -770,43 +611,22 @@ def upload_artifact( 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['filename'] = \ - filename - kwargs['file'] = \ - file + 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") + 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") + kwargs["filename"] = filename + kwargs["file"] = file return self.upload_artifact_endpoint.call_with_http_info(**kwargs) - def view_artifact( - self, - id, - **kwargs - ): - """Stream an artifact directly to the client/browser # noqa: E501 + def view_artifact(self, id, **kwargs): + """Stream an artifact directly to the client/browser This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -854,32 +674,15 @@ def view_artifact( 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 + 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") + 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") + kwargs["id"] = id return self.view_artifact_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/dashboard_api.py b/ibutsu_client/api/dashboard_api.py index ebbe06c..e07a258 100644 --- a/ibutsu_client/api/dashboard_api.py +++ b/ibutsu_client/api/dashboard_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.dashboard import Dashboard from ibutsu_client.model.dashboard_list import DashboardList -class DashboardApi(object): +class DashboardApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,290 +26,218 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_dashboard_endpoint = _Endpoint( settings={ - 'response_type': (Dashboard,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/dashboard', - 'operation_id': 'add_dashboard', - 'http_method': 'POST', - 'servers': None, + "response_type": (Dashboard,), + "auth": ["jwt"], + "endpoint_path": "/dashboard", + "operation_id": "add_dashboard", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'dashboard', - ], - 'required': [ - 'dashboard', - ], - 'nullable': [ + "all": [ + "dashboard", ], - 'enum': [ + "required": [ + "dashboard", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "dashboard": (Dashboard,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "dashboard": "body", }, - 'openapi_types': { - 'dashboard': - (Dashboard,), - }, - 'attribute_map': { - }, - 'location_map': { - 'dashboard': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.delete_dashboard_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/dashboard/{id}', - 'operation_id': 'delete_dashboard', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/dashboard/{id}", + "operation_id": "delete_dashboard", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_dashboard_endpoint = _Endpoint( settings={ - 'response_type': (Dashboard,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/dashboard/{id}', - 'operation_id': 'get_dashboard', - 'http_method': 'GET', - 'servers': None, + "response_type": (Dashboard,), + "auth": ["jwt"], + "endpoint_path": "/dashboard/{id}", + "operation_id": "get_dashboard", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_dashboard_list_endpoint = _Endpoint( settings={ - 'response_type': (DashboardList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/dashboard', - 'operation_id': 'get_dashboard_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (DashboardList,), + "auth": ["jwt"], + "endpoint_path": "/dashboard", + "operation_id": "get_dashboard_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'project_id', - 'user_id', - 'page', - 'page_size', + "all": [ + "filter", + "project_id", + "user_id", + "page", + "page_size", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "project_id": (str,), + "user_id": (str,), + "page": (int,), + "page_size": (int,), }, - 'allowed_values': { + "attribute_map": { + "filter": "filter", + "project_id": "project_id", + "user_id": "user_id", + "page": "page", + "page_size": "pageSize", }, - 'openapi_types': { - 'filter': - ([str],), - 'project_id': - (str,), - 'user_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), + "location_map": { + "filter": "query", + "project_id": "query", + "user_id": "query", + "page": "query", + "page_size": "query", }, - 'attribute_map': { - 'filter': 'filter', - 'project_id': 'project_id', - 'user_id': 'user_id', - 'page': 'page', - 'page_size': 'pageSize', + "collection_format_map": { + "filter": "multi", }, - 'location_map': { - 'filter': 'query', - 'project_id': 'query', - 'user_id': 'query', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_dashboard_endpoint = _Endpoint( settings={ - 'response_type': (Dashboard,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/dashboard/{id}', - 'operation_id': 'update_dashboard', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Dashboard,), + "auth": ["jwt"], + "endpoint_path": "/dashboard/{id}", + "operation_id": "update_dashboard", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'dashboard', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", + "dashboard", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'dashboard': - (Dashboard,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "dashboard": (Dashboard,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'dashboard': 'body', + "location_map": { + "id": "path", + "dashboard": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_dashboard( - self, - dashboard, - **kwargs - ): - """Create a dashboard # noqa: E501 + def add_dashboard(self, dashboard, **kwargs): + """Create a dashboard This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -369,41 +285,21 @@ def add_dashboard( 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['dashboard'] = \ - dashboard + 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") + 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") + kwargs["dashboard"] = dashboard return self.add_dashboard_endpoint.call_with_http_info(**kwargs) - def delete_dashboard( - self, - id, - **kwargs - ): - """Delete a dashboard # noqa: E501 + def delete_dashboard(self, id, **kwargs): + """Delete a dashboard This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -451,41 +347,21 @@ def delete_dashboard( 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 + 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") + 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") + kwargs["id"] = id return self.delete_dashboard_endpoint.call_with_http_info(**kwargs) - def get_dashboard( - self, - id, - **kwargs - ): - """Get a single dashboard by ID # noqa: E501 + def get_dashboard(self, id, **kwargs): + """Get a single dashboard by ID This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -533,40 +409,21 @@ def get_dashboard( 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 + 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") + 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") + kwargs["id"] = id return self.get_dashboard_endpoint.call_with_http_info(**kwargs) - def get_dashboard_list( - self, - **kwargs - ): - """Get a list of dashboards # noqa: E501 + def get_dashboard_list(self, **kwargs): + """Get a list of dashboards This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -617,39 +474,20 @@ def get_dashboard_list( 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["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") + 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") return self.get_dashboard_list_endpoint.call_with_http_info(**kwargs) - def update_dashboard( - self, - id, - **kwargs - ): - """Update a dashboard # noqa: E501 + def update_dashboard(self, id, **kwargs): + """Update a dashboard This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -698,32 +536,15 @@ def update_dashboard( 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 + 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") + 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") + kwargs["id"] = id return self.update_dashboard_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/group_api.py b/ibutsu_client/api/group_api.py index 6d5d86e..2d784aa 100644 --- a/ibutsu_client/api/group_api.py +++ b/ibutsu_client/api/group_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.group import Group from ibutsu_client.model.group_list import GroupList -class GroupApi(object): +class GroupApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,226 +26,165 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_group_endpoint = _Endpoint( settings={ - 'response_type': (Group,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/group', - 'operation_id': 'add_group', - 'http_method': 'POST', - 'servers': None, + "response_type": (Group,), + "auth": ["jwt"], + "endpoint_path": "/group", + "operation_id": "add_group", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'group', - ], - 'required': [ - 'group', + "all": [ + "group", ], - 'nullable': [ + "required": [ + "group", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'group': - (Group,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "group": (Group,), }, - 'location_map': { - 'group': 'body', + "attribute_map": {}, + "location_map": { + "group": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.get_group_endpoint = _Endpoint( settings={ - 'response_type': (Group,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/group/{id}', - 'operation_id': 'get_group', - 'http_method': 'GET', - 'servers': None, + "response_type": (Group,), + "auth": ["jwt"], + "endpoint_path": "/group/{id}", + "operation_id": "get_group", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_group_list_endpoint = _Endpoint( settings={ - 'response_type': (GroupList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/group', - 'operation_id': 'get_group_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (GroupList,), + "auth": ["jwt"], + "endpoint_path": "/group", + "operation_id": "get_group_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), + "attribute_map": { + "page": "page", + "page_size": "pageSize", }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'pageSize', + "location_map": { + "page": "query", + "page_size": "query", }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_group_endpoint = _Endpoint( settings={ - 'response_type': (Group,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/group/{id}', - 'operation_id': 'update_group', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Group,), + "auth": ["jwt"], + "endpoint_path": "/group/{id}", + "operation_id": "update_group", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'group', - ], - 'required': [ - 'id', - 'group', + "all": [ + "id", + "group", ], - 'nullable': [ + "required": [ + "id", + "group", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "group": (Group,), }, - 'openapi_types': { - 'id': - (str,), - 'group': - (Group,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", + "group": "body", }, - 'location_map': { - 'id': 'path', - 'group': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_group( - self, - group, - **kwargs - ): - """Create a new group # noqa: E501 + def add_group(self, group, **kwargs): + """Create a new group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -305,41 +232,21 @@ def add_group( 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['group'] = \ - group + 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") + 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") + kwargs["group"] = group return self.add_group_endpoint.call_with_http_info(**kwargs) - def get_group( - self, - id, - **kwargs - ): - """Get a group # noqa: E501 + def get_group(self, id, **kwargs): + """Get a group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -387,40 +294,21 @@ def get_group( 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 + 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") + 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") + kwargs["id"] = id return self.get_group_endpoint.call_with_http_info(**kwargs) - def get_group_list( - self, - **kwargs - ): - """Get a list of groups # noqa: E501 + def get_group_list(self, **kwargs): + """Get a list of groups This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -468,40 +356,20 @@ def get_group_list( 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["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") + 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") return self.get_group_list_endpoint.call_with_http_info(**kwargs) - def update_group( - self, - id, - group, - **kwargs - ): - """Update a group # noqa: E501 + def update_group(self, id, group, **kwargs): + """Update a group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -550,34 +418,16 @@ def update_group( 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 - kwargs['group'] = \ - group + 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") + 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") + kwargs["id"] = id + kwargs["group"] = group return self.update_group_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/health_api.py b/ibutsu_client/api/health_api.py index 8098875..0fa1a43 100644 --- a/ibutsu_client/api/health_api.py +++ b/ibutsu_client/api/health_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.health import Health from ibutsu_client.model.health_info import HealthInfo -class HealthApi(object): +class HealthApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,142 +26,79 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_database_health_endpoint = _Endpoint( settings={ - 'response_type': (Health,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/health/database', - 'operation_id': 'get_database_health', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (Health,), + "auth": ["jwt"], + "endpoint_path": "/health/database", + "operation_id": "get_database_health", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_health_endpoint = _Endpoint( settings={ - 'response_type': (Health,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/health', - 'operation_id': 'get_health', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (Health,), + "auth": ["jwt"], + "endpoint_path": "/health", + "operation_id": "get_health", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_health_info_endpoint = _Endpoint( settings={ - 'response_type': (HealthInfo,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/health/info', - 'operation_id': 'get_health_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (HealthInfo,), + "auth": ["jwt"], + "endpoint_path": "/health/info", + "operation_id": "get_health_info", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def get_database_health( - self, - **kwargs - ): - """Get a health report for the database # noqa: E501 + def get_database_health(self, **kwargs): + """Get a health report for the database This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -219,38 +144,20 @@ def get_database_health( 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["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") + 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") return self.get_database_health_endpoint.call_with_http_info(**kwargs) - def get_health( - self, - **kwargs - ): - """Get a general health report # noqa: E501 + def get_health(self, **kwargs): + """Get a general health report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -296,38 +203,20 @@ def get_health( 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["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") + 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") return self.get_health_endpoint.call_with_http_info(**kwargs) - def get_health_info( - self, - **kwargs - ): - """Get information about the server # noqa: E501 + def get_health_info(self, **kwargs): + """Get information about the server This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -373,30 +262,14 @@ def get_health_info( 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["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") + 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") return self.get_health_info_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/import_api.py b/ibutsu_client/api/import_api.py index bb11ccb..44e6a9f 100644 --- a/ibutsu_client/api/import_api.py +++ b/ibutsu_client/api/import_api.py @@ -1,30 +1,24 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint +from ibutsu_client.model.model_import import ModelImport +from ibutsu_client.model_utils import ( date, datetime, file_type, none_type, - validate_and_convert_types ) -from ibutsu_client.model.model_import import ModelImport -class ImportApi(object): +class ImportApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -37,130 +31,98 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_import_endpoint = _Endpoint( settings={ - 'response_type': (ModelImport,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/import', - 'operation_id': 'add_import', - 'http_method': 'POST', - 'servers': None, + "response_type": (ModelImport,), + "auth": ["jwt"], + "endpoint_path": "/import", + "operation_id": "add_import", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'import_file', - 'project', - 'metadata', - 'source', + "all": [ + "import_file", + "project", + "metadata", + "source", ], - 'required': [ - 'import_file', + "required": [ + "import_file", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'import_file': - (file_type,), - 'project': - (str,), - 'metadata': - ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), - 'source': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "import_file": (file_type,), + "project": (str,), + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), + "source": (str,), }, - 'attribute_map': { - 'import_file': 'importFile', - 'project': 'project', - 'metadata': 'metadata', - 'source': 'source', + "attribute_map": { + "import_file": "importFile", + "project": "project", + "metadata": "metadata", + "source": "source", }, - 'location_map': { - 'import_file': 'form', - 'project': 'form', - 'metadata': 'form', - 'source': 'form', + "location_map": { + "import_file": "form", + "project": "form", + "metadata": "form", + "source": "form", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'multipart/form-data' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, + api_client=api_client, ) self.get_import_endpoint = _Endpoint( settings={ - 'response_type': (ModelImport,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/import/{id}', - 'operation_id': 'get_import', - 'http_method': 'GET', - 'servers': None, + "response_type": (ModelImport,), + "auth": ["jwt"], + "endpoint_path": "/import/{id}", + "operation_id": "get_import", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def add_import( - self, - import_file, - **kwargs - ): - """Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive # noqa: E501 + def add_import(self, import_file, **kwargs): + """Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -211,41 +173,21 @@ def add_import( 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['import_file'] = \ - import_file + 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") + 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") + kwargs["import_file"] = import_file return self.add_import_endpoint.call_with_http_info(**kwargs) - def get_import( - self, - id, - **kwargs - ): - """Get the status of an import # noqa: E501 + def get_import(self, id, **kwargs): + """Get the status of an import This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -293,32 +235,15 @@ def get_import( 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 + 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") + 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") + kwargs["id"] = id return self.get_import_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/login_api.py b/ibutsu_client/api/login_api.py index cc85b2c..690a826 100644 --- a/ibutsu_client/api/login_api.py +++ b/ibutsu_client/api/login_api.py @@ -1,37 +1,24 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.account_recovery import AccountRecovery from ibutsu_client.model.account_registration import AccountRegistration from ibutsu_client.model.account_reset import AccountReset from ibutsu_client.model.credentials import Credentials from ibutsu_client.model.login_config import LoginConfig -from ibutsu_client.model.login_error import LoginError from ibutsu_client.model.login_support import LoginSupport from ibutsu_client.model.login_token import LoginToken -class LoginApi(object): +class LoginApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -44,384 +31,283 @@ def __init__(self, api_client=None): self.api_client = api_client self.activate_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/login/activate/{activation_code}', - 'operation_id': 'activate', - 'http_method': 'GET', - 'servers': None, + "response_type": None, + "auth": [], + "endpoint_path": "/login/activate/{activation_code}", + "operation_id": "activate", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'activation_code', - ], - 'required': [ - 'activation_code', - ], - 'nullable': [ + "all": [ + "activation_code", ], - 'enum': [ + "required": [ + "activation_code", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "activation_code": (str,), }, - 'allowed_values': { + "attribute_map": { + "activation_code": "activation_code", }, - 'openapi_types': { - 'activation_code': - (str,), + "location_map": { + "activation_code": "path", }, - 'attribute_map': { - 'activation_code': 'activation_code', - }, - 'location_map': { - 'activation_code': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.auth_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/login/auth/{provider}', - 'operation_id': 'auth', - 'http_method': 'GET', - 'servers': None, + "response_type": None, + "auth": [], + "endpoint_path": "/login/auth/{provider}", + "operation_id": "auth", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'provider', - ], - 'required': [ - 'provider', - ], - 'nullable': [ + "all": [ + "provider", ], - 'enum': [ + "required": [ + "provider", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "provider": (str,), }, - 'allowed_values': { + "attribute_map": { + "provider": "provider", }, - 'openapi_types': { - 'provider': - (str,), + "location_map": { + "provider": "path", }, - 'attribute_map': { - 'provider': 'provider', - }, - 'location_map': { - 'provider': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.config_endpoint = _Endpoint( settings={ - 'response_type': (LoginConfig,), - 'auth': [], - 'endpoint_path': '/login/config/{provider}', - 'operation_id': 'config', - 'http_method': 'GET', - 'servers': None, + "response_type": (LoginConfig,), + "auth": [], + "endpoint_path": "/login/config/{provider}", + "operation_id": "config", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'provider', - ], - 'required': [ - 'provider', - ], - 'nullable': [ + "all": [ + "provider", ], - 'enum': [ + "required": [ + "provider", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "provider": (str,), }, - 'allowed_values': { + "attribute_map": { + "provider": "provider", }, - 'openapi_types': { - 'provider': - (str,), + "location_map": { + "provider": "path", }, - 'attribute_map': { - 'provider': 'provider', - }, - 'location_map': { - 'provider': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.login_endpoint = _Endpoint( settings={ - 'response_type': (LoginToken,), - 'auth': [], - 'endpoint_path': '/login', - 'operation_id': 'login', - 'http_method': 'POST', - 'servers': None, + "response_type": (LoginToken,), + "auth": [], + "endpoint_path": "/login", + "operation_id": "login", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'credentials', + "all": [ + "credentials", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'credentials': - (Credentials,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "credentials": (Credentials,), }, - 'attribute_map': { + "attribute_map": {}, + "location_map": { + "credentials": "body", }, - 'location_map': { - 'credentials': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.recover_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/login/recover', - 'operation_id': 'recover', - 'http_method': 'POST', - 'servers': None, + "response_type": None, + "auth": [], + "endpoint_path": "/login/recover", + "operation_id": "recover", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'account_recovery', - ], - 'required': [], - 'nullable': [ + "all": [ + "account_recovery", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "account_recovery": (AccountRecovery,), }, - 'openapi_types': { - 'account_recovery': - (AccountRecovery,), + "attribute_map": {}, + "location_map": { + "account_recovery": "body", }, - 'attribute_map': { - }, - 'location_map': { - 'account_recovery': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": [], "content_type": ["application/json"]}, + api_client=api_client, ) self.register_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/login/register', - 'operation_id': 'register', - 'http_method': 'POST', - 'servers': None, + "response_type": None, + "auth": [], + "endpoint_path": "/login/register", + "operation_id": "register", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'account_registration', - ], - 'required': [], - 'nullable': [ + "all": [ + "account_registration", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "account_registration": (AccountRegistration,), }, - 'openapi_types': { - 'account_registration': - (AccountRegistration,), + "attribute_map": {}, + "location_map": { + "account_registration": "body", }, - 'attribute_map': { - }, - 'location_map': { - 'account_registration': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.reset_password_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/login/reset-password', - 'operation_id': 'reset_password', - 'http_method': 'POST', - 'servers': None, + "response_type": None, + "auth": [], + "endpoint_path": "/login/reset-password", + "operation_id": "reset_password", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'account_reset', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ + "all": [ + "account_reset", ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_reset': - (AccountReset,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "account_reset": (AccountReset,), }, - 'location_map': { - 'account_reset': 'body', + "attribute_map": {}, + "location_map": { + "account_reset": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": [], "content_type": ["application/json"]}, + api_client=api_client, ) self.support_endpoint = _Endpoint( settings={ - 'response_type': (LoginSupport,), - 'auth': [], - 'endpoint_path': '/login/support', - 'operation_id': 'support', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, + "response_type": (LoginSupport,), + "auth": [], + "endpoint_path": "/login/support", + "operation_id": "support", + "http_method": "GET", + "servers": None, + }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def activate( - self, - activation_code, - **kwargs - ): - """activate # noqa: E501 + def activate(self, activation_code, **kwargs): + """activate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -469,41 +355,21 @@ def activate( 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['activation_code'] = \ - activation_code + 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") + 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") + kwargs["activation_code"] = activation_code return self.activate_endpoint.call_with_http_info(**kwargs) - def auth( - self, - provider, - **kwargs - ): - """auth # noqa: E501 + def auth(self, provider, **kwargs): + """auth This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -551,41 +417,21 @@ def auth( 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['provider'] = \ - provider + 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") + 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") + kwargs["provider"] = provider return self.auth_endpoint.call_with_http_info(**kwargs) - def config( - self, - provider, - **kwargs - ): - """config # noqa: E501 + def config(self, provider, **kwargs): + """config This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -633,40 +479,21 @@ def config( 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['provider'] = \ - provider + 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") + 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") + kwargs["provider"] = provider return self.config_endpoint.call_with_http_info(**kwargs) - def login( - self, - **kwargs - ): - """login # noqa: E501 + def login(self, **kwargs): + """login This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -713,38 +540,20 @@ def login( 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["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") + 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") return self.login_endpoint.call_with_http_info(**kwargs) - def recover( - self, - **kwargs - ): - """recover # noqa: E501 + def recover(self, **kwargs): + """recover This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -791,38 +600,20 @@ def recover( 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["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") + 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") return self.recover_endpoint.call_with_http_info(**kwargs) - def register( - self, - **kwargs - ): - """register # noqa: E501 + def register(self, **kwargs): + """register This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -869,38 +660,20 @@ def register( 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["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") + 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") return self.register_endpoint.call_with_http_info(**kwargs) - def reset_password( - self, - **kwargs - ): - """reset_password # noqa: E501 + def reset_password(self, **kwargs): + """reset_password This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -947,38 +720,20 @@ def reset_password( 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["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") + 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") return self.reset_password_endpoint.call_with_http_info(**kwargs) - def support( - self, - **kwargs - ): - """support # noqa: E501 + def support(self, **kwargs): + """support This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1024,30 +779,14 @@ def support( 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["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") + 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") return self.support_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/project_api.py b/ibutsu_client/api/project_api.py index fcaa456..69f3fb2 100644 --- a/ibutsu_client/api/project_api.py +++ b/ibutsu_client/api/project_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.project import Project from ibutsu_client.model.project_list import ProjectList -class ProjectApi(object): +class ProjectApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,241 +26,178 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/project', - 'operation_id': 'add_project', - 'http_method': 'POST', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/project", + "operation_id": "add_project", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'project', - ], - 'required': [ - 'project', + "all": [ + "project", ], - 'nullable': [ + "required": [ + "project", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'project': - (Project,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "project": (Project,), }, - 'location_map': { - 'project': 'body', + "attribute_map": {}, + "location_map": { + "project": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.get_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/project/{id}', - 'operation_id': 'get_project', - 'http_method': 'GET', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/project/{id}", + "operation_id": "get_project", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_project_list_endpoint = _Endpoint( settings={ - 'response_type': (ProjectList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/project', - 'operation_id': 'get_project_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (ProjectList,), + "auth": ["jwt"], + "endpoint_path": "/project", + "operation_id": "get_project_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'owner_id', - 'group_id', - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "filter", + "owner_id", + "group_id", + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "owner_id": (str,), + "group_id": (str,), + "page": (int,), + "page_size": (int,), }, - 'openapi_types': { - 'filter': - ([str],), - 'owner_id': - (str,), - 'group_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), + "attribute_map": { + "filter": "filter", + "owner_id": "ownerId", + "group_id": "groupId", + "page": "page", + "page_size": "pageSize", }, - 'attribute_map': { - 'filter': 'filter', - 'owner_id': 'ownerId', - 'group_id': 'groupId', - 'page': 'page', - 'page_size': 'pageSize', + "location_map": { + "filter": "query", + "owner_id": "query", + "group_id": "query", + "page": "query", + "page_size": "query", }, - 'location_map': { - 'filter': 'query', - 'owner_id': 'query', - 'group_id': 'query', - 'page': 'query', - 'page_size': 'query', + "collection_format_map": { + "filter": "multi", }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_project_endpoint = _Endpoint( settings={ - 'response_type': (Project,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/project/{id}', - 'operation_id': 'update_project', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Project,), + "auth": ["jwt"], + "endpoint_path": "/project/{id}", + "operation_id": "update_project", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'project', + "all": [ + "id", + "project", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'project': - (Project,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "project": (Project,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'project': 'body', + "location_map": { + "id": "path", + "project": "body", }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_project( - self, - project, - **kwargs - ): - """Create a project # noqa: E501 + def add_project(self, project, **kwargs): + """Create a project This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -320,41 +245,21 @@ def add_project( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['project'] = \ - project + 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") + 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") + kwargs["project"] = project return self.add_project_endpoint.call_with_http_info(**kwargs) - def get_project( - self, - id, - **kwargs - ): - """Get a single project by ID # noqa: E501 + def get_project(self, id, **kwargs): + """Get a single project by ID This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -402,40 +307,21 @@ def get_project( 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 + 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") + 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") + kwargs["id"] = id return self.get_project_endpoint.call_with_http_info(**kwargs) - def get_project_list( - self, - **kwargs - ): - """Get a list of projects # noqa: E501 + def get_project_list(self, **kwargs): + """Get a list of projects This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -486,39 +372,20 @@ def get_project_list( 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["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") + 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") return self.get_project_list_endpoint.call_with_http_info(**kwargs) - def update_project( - self, - id, - **kwargs - ): - """Update a project # noqa: E501 + def update_project(self, id, **kwargs): + """Update a project This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -567,32 +434,15 @@ def update_project( 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 + 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") + 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") + kwargs["id"] = id return self.update_project_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/report_api.py b/ibutsu_client/api/report_api.py index b0d29e6..be8cd7f 100644 --- a/ibutsu_client/api/report_api.py +++ b/ibutsu_client/api/report_api.py @@ -1,33 +1,24 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.get_report_types200_response_inner import GetReportTypes200ResponseInner from ibutsu_client.model.report import Report from ibutsu_client.model.report_list import ReportList from ibutsu_client.model.report_parameters import ReportParameters +from ibutsu_client.model_utils import ( + file_type, +) -class ReportApi(object): +class ReportApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -40,388 +31,294 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_report_endpoint = _Endpoint( settings={ - 'response_type': (Report,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report', - 'operation_id': 'add_report', - 'http_method': 'POST', - 'servers': None, + "response_type": (Report,), + "auth": ["jwt"], + "endpoint_path": "/report", + "operation_id": "add_report", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'report_parameters', + "all": [ + "report_parameters", ], - 'required': [ - 'report_parameters', + "required": [ + "report_parameters", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'report_parameters': - (ReportParameters,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "report_parameters": (ReportParameters,), }, - 'attribute_map': { + "attribute_map": {}, + "location_map": { + "report_parameters": "body", }, - 'location_map': { - 'report_parameters': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.delete_report_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report/{id}', - 'operation_id': 'delete_report', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/report/{id}", + "operation_id": "delete_report", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.download_report_endpoint = _Endpoint( settings={ - 'response_type': (file_type,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report/{id}/download/{filename}', - 'operation_id': 'download_report', - 'http_method': 'GET', - 'servers': None, + "response_type": (file_type,), + "auth": ["jwt"], + "endpoint_path": "/report/{id}/download/{filename}", + "operation_id": "download_report", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'filename', + "all": [ + "id", + "filename", ], - 'required': [ - 'id', - 'filename', + "required": [ + "id", + "filename", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'filename': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "filename": (str,), }, - 'attribute_map': { - 'id': 'id', - 'filename': 'filename', + "attribute_map": { + "id": "id", + "filename": "filename", }, - 'location_map': { - 'id': 'path', - 'filename': 'path', + "location_map": { + "id": "path", + "filename": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'text/plain', - 'application/csv', - 'application/json', - 'text/html', - 'application/zip' - ], - 'content_type': [], + "accept": [ + "text/plain", + "application/csv", + "application/json", + "text/html", + "application/zip", + ], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_report_endpoint = _Endpoint( settings={ - 'response_type': (Report,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report/{id}', - 'operation_id': 'get_report', - 'http_method': 'GET', - 'servers': None, + "response_type": (Report,), + "auth": ["jwt"], + "endpoint_path": "/report/{id}", + "operation_id": "get_report", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_report_list_endpoint = _Endpoint( settings={ - 'response_type': (ReportList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report', - 'operation_id': 'get_report_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (ReportList,), + "auth": ["jwt"], + "endpoint_path": "/report", + "operation_id": "get_report_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - 'project', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "all": [ + "page", + "page_size", + "project", + ], + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), - 'project': - (str,), - }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'pageSize', - 'project': 'project', - }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', - 'project': 'query', - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), + "project": (str,), + }, + "attribute_map": { + "page": "page", + "page_size": "pageSize", + "project": "project", + }, + "location_map": { + "page": "query", + "page_size": "query", + "project": "query", + }, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_report_types_endpoint = _Endpoint( settings={ - 'response_type': ([GetReportTypes200ResponseInner],), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report/types', - 'operation_id': 'get_report_types', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": ([GetReportTypes200ResponseInner],), + "auth": ["jwt"], + "endpoint_path": "/report/types", + "operation_id": "get_report_types", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.view_report_endpoint = _Endpoint( settings={ - 'response_type': (file_type,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/report/{id}/view/{filename}', - 'operation_id': 'view_report', - 'http_method': 'GET', - 'servers': None, + "response_type": (file_type,), + "auth": ["jwt"], + "endpoint_path": "/report/{id}/view/{filename}", + "operation_id": "view_report", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'filename', + "all": [ + "id", + "filename", ], - 'required': [ - 'id', - 'filename', + "required": [ + "id", + "filename", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'filename': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "filename": (str,), }, - 'attribute_map': { - 'id': 'id', - 'filename': 'filename', + "attribute_map": { + "id": "id", + "filename": "filename", }, - 'location_map': { - 'id': 'path', - 'filename': 'path', + "location_map": { + "id": "path", + "filename": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'text/plain', - 'application/csv', - 'application/json', - 'text/html', - 'application/zip' - ], - 'content_type': [], + "accept": [ + "text/plain", + "application/csv", + "application/json", + "text/html", + "application/zip", + ], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def add_report( - self, - report_parameters, - **kwargs - ): - """Create a new report # noqa: E501 + def add_report(self, report_parameters, **kwargs): + """Create a new report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -469,41 +366,21 @@ def add_report( 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['report_parameters'] = \ - report_parameters + 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") + 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") + kwargs["report_parameters"] = report_parameters return self.add_report_endpoint.call_with_http_info(**kwargs) - def delete_report( - self, - id, - **kwargs - ): - """Delete a report # noqa: E501 + def delete_report(self, id, **kwargs): + """Delete a report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -551,42 +428,21 @@ def delete_report( 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 + 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") + 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") + kwargs["id"] = id return self.delete_report_endpoint.call_with_http_info(**kwargs) - def download_report( - self, - id, - filename, - **kwargs - ): - """Download a report # noqa: E501 + def download_report(self, id, filename, **kwargs): + """Download a report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -635,43 +491,22 @@ def download_report( 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 - kwargs['filename'] = \ - filename + 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") + 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") + kwargs["id"] = id + kwargs["filename"] = filename return self.download_report_endpoint.call_with_http_info(**kwargs) - def get_report( - self, - id, - **kwargs - ): - """Get a report # noqa: E501 + def get_report(self, id, **kwargs): + """Get a report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -719,40 +554,21 @@ def get_report( 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 + 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") + 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") + kwargs["id"] = id return self.get_report_endpoint.call_with_http_info(**kwargs) - def get_report_list( - self, - **kwargs - ): - """Get a list of reports # noqa: E501 + def get_report_list(self, **kwargs): + """Get a list of reports This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -801,38 +617,20 @@ def get_report_list( 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["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") + 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") return self.get_report_list_endpoint.call_with_http_info(**kwargs) - def get_report_types( - self, - **kwargs - ): - """Get a list of report types # noqa: E501 + def get_report_types(self, **kwargs): + """Get a list of report types This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -878,40 +676,20 @@ def get_report_types( 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["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") + 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") return self.get_report_types_endpoint.call_with_http_info(**kwargs) - def view_report( - self, - id, - filename, - **kwargs - ): - """View a report # noqa: E501 + def view_report(self, id, filename, **kwargs): + """View a report This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -960,34 +738,16 @@ def view_report( 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 - kwargs['filename'] = \ - filename + 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") + 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") + kwargs["id"] = id + kwargs["filename"] = filename return self.view_report_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/result_api.py b/ibutsu_client/api/result_api.py index 829ca1d..b43a96a 100644 --- a/ibutsu_client/api/result_api.py +++ b/ibutsu_client/api/result_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.result import Result from ibutsu_client.model.result_list import ResultList -class ResultApi(object): +class ResultApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,233 +26,172 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_result_endpoint = _Endpoint( settings={ - 'response_type': (Result,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/result', - 'operation_id': 'add_result', - 'http_method': 'POST', - 'servers': None, + "response_type": (Result,), + "auth": ["jwt"], + "endpoint_path": "/result", + "operation_id": "add_result", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'result', - ], - 'required': [], - 'nullable': [ + "all": [ + "result", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'result': - (Result,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "result": (Result,), }, - 'location_map': { - 'result': 'body', + "attribute_map": {}, + "location_map": { + "result": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.get_result_endpoint = _Endpoint( settings={ - 'response_type': (Result,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/result/{id}', - 'operation_id': 'get_result', - 'http_method': 'GET', - 'servers': None, + "response_type": (Result,), + "auth": ["jwt"], + "endpoint_path": "/result/{id}", + "operation_id": "get_result", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_result_list_endpoint = _Endpoint( settings={ - 'response_type': (ResultList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/result', - 'operation_id': 'get_result_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (ResultList,), + "auth": ["jwt"], + "endpoint_path": "/result", + "operation_id": "get_result_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'estimate', - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "filter", + "estimate", + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "estimate": (bool,), + "page": (int,), + "page_size": (int,), }, - 'openapi_types': { - 'filter': - ([str],), - 'estimate': - (bool,), - 'page': - (int,), - 'page_size': - (int,), + "attribute_map": { + "filter": "filter", + "estimate": "estimate", + "page": "page", + "page_size": "pageSize", }, - 'attribute_map': { - 'filter': 'filter', - 'estimate': 'estimate', - 'page': 'page', - 'page_size': 'pageSize', + "location_map": { + "filter": "query", + "estimate": "query", + "page": "query", + "page_size": "query", }, - 'location_map': { - 'filter': 'query', - 'estimate': 'query', - 'page': 'query', - 'page_size': 'query', + "collection_format_map": { + "filter": "multi", }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_result_endpoint = _Endpoint( settings={ - 'response_type': (Result,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/result/{id}', - 'operation_id': 'update_result', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Result,), + "auth": ["jwt"], + "endpoint_path": "/result/{id}", + "operation_id": "update_result", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'result', + "all": [ + "id", + "result", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'result': - (Result,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "result": (Result,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'result': 'body', + "location_map": { + "id": "path", + "result": "body", }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_result( - self, - **kwargs - ): - """Create a test result # noqa: E501 + def add_result(self, **kwargs): + """Create a test result This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -311,39 +238,20 @@ def add_result( 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["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") + 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") return self.add_result_endpoint.call_with_http_info(**kwargs) - def get_result( - self, - id, - **kwargs - ): - """Get a single result # noqa: E501 + def get_result(self, id, **kwargs): + """Get a single result This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -391,42 +299,23 @@ def get_result( 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 + 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") + 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") + kwargs["id"] = id return self.get_result_endpoint.call_with_http_info(**kwargs) - def get_result_list( - self, - **kwargs - ): - """Get the list of results. # noqa: E501 + def get_result_list(self, **kwargs): + """Get the list of results. - The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed # noqa: E501 + The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -475,39 +364,20 @@ def get_result_list( 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["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") + 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") return self.get_result_list_endpoint.call_with_http_info(**kwargs) - def update_result( - self, - id, - **kwargs - ): - """Updates a single result # noqa: E501 + def update_result(self, id, **kwargs): + """Updates a single result This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -556,32 +426,15 @@ def update_result( 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 + 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") + 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") + kwargs["id"] = id return self.update_result_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/run_api.py b/ibutsu_client/api/run_api.py index e6cc6dd..04e1a11 100644 --- a/ibutsu_client/api/run_api.py +++ b/ibutsu_client/api/run_api.py @@ -1,32 +1,20 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.run import Run from ibutsu_client.model.run_list import RunList from ibutsu_client.model.update_run import UpdateRun -class RunApi(object): +class RunApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -39,297 +27,219 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_run_endpoint = _Endpoint( settings={ - 'response_type': (Run,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/run', - 'operation_id': 'add_run', - 'http_method': 'POST', - 'servers': None, + "response_type": (Run,), + "auth": ["jwt"], + "endpoint_path": "/run", + "operation_id": "add_run", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'run', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ + "all": [ + "run", ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "run": (Run,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "run": "body", }, - 'openapi_types': { - 'run': - (Run,), - }, - 'attribute_map': { - }, - 'location_map': { - 'run': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.bulk_update_endpoint = _Endpoint( settings={ - 'response_type': (RunList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/runs/bulk-update', - 'operation_id': 'bulk_update', - 'http_method': 'POST', - 'servers': None, + "response_type": (RunList,), + "auth": ["jwt"], + "endpoint_path": "/runs/bulk-update", + "operation_id": "bulk_update", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'update_run', - 'filter', - 'page_size', - ], - 'required': [ - 'update_run', + "all": [ + "update_run", + "filter", + "page_size", ], - 'nullable': [ + "required": [ + "update_run", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "update_run": (UpdateRun,), + "filter": ([str],), + "page_size": (int,), }, - 'openapi_types': { - 'update_run': - (UpdateRun,), - 'filter': - ([str],), - 'page_size': - (int,), + "attribute_map": { + "filter": "filter", + "page_size": "pageSize", }, - 'attribute_map': { - 'filter': 'filter', - 'page_size': 'pageSize', + "location_map": { + "update_run": "body", + "filter": "query", + "page_size": "query", }, - 'location_map': { - 'update_run': 'body', - 'filter': 'query', - 'page_size': 'query', + "collection_format_map": { + "filter": "multi", }, - 'collection_format_map': { - 'filter': 'multi', - } }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.get_run_endpoint = _Endpoint( settings={ - 'response_type': (Run,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/run/{id}', - 'operation_id': 'get_run', - 'http_method': 'GET', - 'servers': None, + "response_type": (Run,), + "auth": ["jwt"], + "endpoint_path": "/run/{id}", + "operation_id": "get_run", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_run_list_endpoint = _Endpoint( settings={ - 'response_type': (RunList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/run', - 'operation_id': 'get_run_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (RunList,), + "auth": ["jwt"], + "endpoint_path": "/run", + "operation_id": "get_run_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'estimate', - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "filter", + "estimate", + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "estimate": (bool,), + "page": (int,), + "page_size": (int,), }, - 'openapi_types': { - 'filter': - ([str],), - 'estimate': - (bool,), - 'page': - (int,), - 'page_size': - (int,), + "attribute_map": { + "filter": "filter", + "estimate": "estimate", + "page": "page", + "page_size": "pageSize", }, - 'attribute_map': { - 'filter': 'filter', - 'estimate': 'estimate', - 'page': 'page', - 'page_size': 'pageSize', + "location_map": { + "filter": "query", + "estimate": "query", + "page": "query", + "page_size": "query", }, - 'location_map': { - 'filter': 'query', - 'estimate': 'query', - 'page': 'query', - 'page_size': 'query', + "collection_format_map": { + "filter": "multi", }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_run_endpoint = _Endpoint( settings={ - 'response_type': (Run,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/run/{id}', - 'operation_id': 'update_run', - 'http_method': 'PUT', - 'servers': None, + "response_type": (Run,), + "auth": ["jwt"], + "endpoint_path": "/run/{id}", + "operation_id": "update_run", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'run', - ], - 'required': [ - 'id', - 'run', + "all": [ + "id", + "run", ], - 'nullable': [ + "required": [ + "id", + "run", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "run": (Run,), }, - 'openapi_types': { - 'id': - (str,), - 'run': - (Run,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", + "run": "body", }, - 'location_map': { - 'id': 'path', - 'run': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_run( - self, - **kwargs - ): - """Create a run # noqa: E501 + def add_run(self, **kwargs): + """Create a run This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -376,39 +286,20 @@ def add_run( 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["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") + 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") return self.add_run_endpoint.call_with_http_info(**kwargs) - def bulk_update( - self, - update_run, - **kwargs - ): - """Update multiple runs with common metadata # noqa: E501 + def bulk_update(self, update_run, **kwargs): + """Update multiple runs with common metadata This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -458,41 +349,21 @@ def bulk_update( 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['update_run'] = \ - update_run + 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") + 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") + kwargs["update_run"] = update_run return self.bulk_update_endpoint.call_with_http_info(**kwargs) - def get_run( - self, - id, - **kwargs - ): - """Get a single run by ID (uuid required) # noqa: E501 + def get_run(self, id, **kwargs): + """Get a single run by ID (uuid required) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -540,42 +411,23 @@ def get_run( 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 + 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") + 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") + kwargs["id"] = id return self.get_run_endpoint.call_with_http_info(**kwargs) - def get_run_list( - self, - **kwargs - ): - """Get a list of the test runs # noqa: E501 + def get_run_list(self, **kwargs): + """Get a list of the test runs - The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 # noqa: E501 + The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -624,40 +476,20 @@ def get_run_list( 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["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") + 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") return self.get_run_list_endpoint.call_with_http_info(**kwargs) - def update_run( - self, - id, - run, - **kwargs - ): - """Update a single run # noqa: E501 + def update_run(self, id, run, **kwargs): + """Update a single run This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -706,34 +538,16 @@ def update_run( 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 - kwargs['run'] = \ - run + 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") + 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") + kwargs["id"] = id + kwargs["run"] = run return self.update_run_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/task_api.py b/ibutsu_client/api/task_api.py index 6db402b..fbca75b 100644 --- a/ibutsu_client/api/task_api.py +++ b/ibutsu_client/api/task_api.py @@ -1,29 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint +from ibutsu_client.model_utils import ( date, datetime, - file_type, none_type, - validate_and_convert_types ) -class TaskApi(object): +class TaskApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -36,62 +29,49 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_task_endpoint = _Endpoint( settings={ - 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/task/{id}', - 'operation_id': 'get_task', - 'http_method': 'GET', - 'servers': None, + "response_type": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), + "auth": ["jwt"], + "endpoint_path": "/task/{id}", + "operation_id": "get_task", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def get_task( - self, - id, - **kwargs - ): - """Get the status or result of a task # noqa: E501 + def get_task(self, id, **kwargs): + """Get the status or result of a task This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -139,32 +119,15 @@ def get_task( 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 + 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") + 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") + kwargs["id"] = id return self.get_task_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/user_api.py b/ibutsu_client/api/user_api.py index 9d3d7f0..0dce9d3 100644 --- a/ibutsu_client/api/user_api.py +++ b/ibutsu_client/api/user_api.py @@ -1,33 +1,21 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.create_token import CreateToken from ibutsu_client.model.token import Token from ibutsu_client.model.token_list import TokenList from ibutsu_client.model.user import User -class UserApi(object): +class UserApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -40,302 +28,210 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_token_endpoint = _Endpoint( settings={ - 'response_type': (Token,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user/token', - 'operation_id': 'add_token', - 'http_method': 'POST', - 'servers': None, + "response_type": (Token,), + "auth": ["jwt"], + "endpoint_path": "/user/token", + "operation_id": "add_token", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'create_token', + "all": [ + "create_token", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "create_token": (CreateToken,), }, - 'openapi_types': { - 'create_token': - (CreateToken,), + "attribute_map": {}, + "location_map": { + "create_token": "body", }, - 'attribute_map': { - }, - 'location_map': { - 'create_token': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.delete_token_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user/token/{id}', - 'operation_id': 'delete_token', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/user/token/{id}", + "operation_id": "delete_token", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'openapi_types': { - 'id': - (str,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_current_user_endpoint = _Endpoint( settings={ - 'response_type': (User,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user', - 'operation_id': 'get_current_user', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (User,), + "auth": ["jwt"], + "endpoint_path": "/user", + "operation_id": "get_current_user", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_token_endpoint = _Endpoint( settings={ - 'response_type': (Token,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user/token/{id}', - 'operation_id': 'get_token', - 'http_method': 'GET', - 'servers': None, + "response_type": (Token,), + "auth": ["jwt"], + "endpoint_path": "/user/token/{id}", + "operation_id": "get_token", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_token_list_endpoint = _Endpoint( settings={ - 'response_type': (TokenList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user/token', - 'operation_id': 'get_token_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (TokenList,), + "auth": ["jwt"], + "endpoint_path": "/user/token", + "operation_id": "get_token_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'pageSize', + "attribute_map": { + "page": "page", + "page_size": "pageSize", }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', + "location_map": { + "page": "query", + "page_size": "query", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_current_user_endpoint = _Endpoint( settings={ - 'response_type': (User,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/user', - 'operation_id': 'update_current_user', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (User,), + "auth": ["jwt"], + "endpoint_path": "/user", + "operation_id": "update_current_user", + "http_method": "PUT", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def add_token( - self, - **kwargs - ): - """Create a token for the current user # noqa: E501 + def add_token(self, **kwargs): + """Create a token for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -382,39 +278,20 @@ def add_token( 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["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") + 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") return self.add_token_endpoint.call_with_http_info(**kwargs) - def delete_token( - self, - id, - **kwargs - ): - """Delete the token # noqa: E501 + def delete_token(self, id, **kwargs): + """Delete the token This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -462,40 +339,21 @@ def delete_token( 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 + 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") + 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") + kwargs["id"] = id return self.delete_token_endpoint.call_with_http_info(**kwargs) - def get_current_user( - self, - **kwargs - ): - """Return the user details for the current user # noqa: E501 + def get_current_user(self, **kwargs): + """Return the user details for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -541,39 +399,20 @@ def get_current_user( 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["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") + 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") return self.get_current_user_endpoint.call_with_http_info(**kwargs) - def get_token( - self, - id, - **kwargs - ): - """Retrieve a single token for the current user # noqa: E501 + def get_token(self, id, **kwargs): + """Retrieve a single token for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -621,40 +460,21 @@ def get_token( 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 + 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") + 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") + kwargs["id"] = id return self.get_token_endpoint.call_with_http_info(**kwargs) - def get_token_list( - self, - **kwargs - ): - """Return the tokens for the user # noqa: E501 + def get_token_list(self, **kwargs): + """Return the tokens for the user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -702,38 +522,20 @@ def get_token_list( 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["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") + 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") return self.get_token_list_endpoint.call_with_http_info(**kwargs) - def update_current_user( - self, - **kwargs - ): - """Return the user details for the current user # noqa: E501 + def update_current_user(self, **kwargs): + """Return the user details for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -779,30 +581,14 @@ def update_current_user( 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["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") + 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") return self.update_current_user_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/widget_api.py b/ibutsu_client/api/widget_api.py index dd3472b..e8fa3c0 100644 --- a/ibutsu_client/api/widget_api.py +++ b/ibutsu_client/api/widget_api.py @@ -1,30 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint +from ibutsu_client.model.widget_type_list import WidgetTypeList +from ibutsu_client.model_utils import ( date, datetime, - file_type, none_type, - validate_and_convert_types ) -from ibutsu_client.model.widget_type_list import WidgetTypeList -class WidgetApi(object): +class WidgetApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -37,116 +30,93 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_widget_endpoint = _Endpoint( settings={ - 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget/{id}', - 'operation_id': 'get_widget', - 'http_method': 'GET', - 'servers': None, + "response_type": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), + "auth": ["jwt"], + "endpoint_path": "/widget/{id}", + "operation_id": "get_widget", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'params', - ], - 'required': [ - 'id', + "all": [ + "id", + "params", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "params": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), }, - 'openapi_types': { - 'id': - (str,), - 'params': - ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "attribute_map": { + "id": "id", + "params": "params", }, - 'attribute_map': { - 'id': 'id', - 'params': 'params', + "location_map": { + "id": "path", + "params": "query", }, - 'location_map': { - 'id': 'path', - 'params': 'query', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_widget_types_endpoint = _Endpoint( settings={ - 'response_type': (WidgetTypeList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget/types', - 'operation_id': 'get_widget_types', - 'http_method': 'GET', - 'servers': None, + "response_type": (WidgetTypeList,), + "auth": ["jwt"], + "endpoint_path": "/widget/types", + "operation_id": "get_widget_types", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'type', - ], - 'required': [], - 'nullable': [ + "all": [ + "type", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "type": (str,), }, - 'openapi_types': { - 'type': - (str,), + "attribute_map": { + "type": "type", }, - 'attribute_map': { - 'type': 'type', + "location_map": { + "type": "query", }, - 'location_map': { - 'type': 'query', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def get_widget( - self, - id, - **kwargs - ): - """Generate data for a dashboard widget # noqa: E501 + def get_widget(self, id, **kwargs): + """Generate data for a dashboard widget This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -195,42 +165,23 @@ def get_widget( 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 + 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") + 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") + kwargs["id"] = id return self.get_widget_endpoint.call_with_http_info(**kwargs) - def get_widget_types( - self, - **kwargs - ): - """Get a list of widget types # noqa: E501 + def get_widget_types(self, **kwargs): + """Get a list of widget types - A list of widget types # noqa: E501 + A list of widget types This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -276,30 +227,14 @@ def get_widget_types( 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["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") + 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") return self.get_widget_types_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api/widget_api.py.rej b/ibutsu_client/api/widget_api.py.rej deleted file mode 100644 index eef12d2..0000000 --- a/ibutsu_client/api/widget_api.py.rej +++ /dev/null @@ -1,10 +0,0 @@ ---- ibutsu_client/api/widget_api.py -+++ ibutsu_client/api/widget_api.py -@@ -22,7 +22,6 @@ from ibutsu_client.model_utils import ( # noqa: F401 - validate_and_convert_types - ) - from ibutsu_client.model.widget_type_list import WidgetTypeList --from ibutsu_client.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType - - - class WidgetApi(object): diff --git a/ibutsu_client/api/widget_config_api.py b/ibutsu_client/api/widget_config_api.py index c4fb386..19c2fbb 100644 --- a/ibutsu_client/api/widget_config_api.py +++ b/ibutsu_client/api/widget_config_api.py @@ -1,31 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.api_client import ApiClient, Endpoint as _Endpoint -from ibutsu_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) +from ibutsu_client.api_client import ApiClient +from ibutsu_client.api_client import Endpoint as _Endpoint from ibutsu_client.model.widget_config import WidgetConfig from ibutsu_client.model.widget_config_list import WidgetConfigList -class WidgetConfigApi(object): +class WidgetConfigApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -38,277 +26,208 @@ def __init__(self, api_client=None): self.api_client = api_client self.add_widget_config_endpoint = _Endpoint( settings={ - 'response_type': (WidgetConfig,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget-config', - 'operation_id': 'add_widget_config', - 'http_method': 'POST', - 'servers': None, + "response_type": (WidgetConfig,), + "auth": ["jwt"], + "endpoint_path": "/widget-config", + "operation_id": "add_widget_config", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'widget_config', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ + "all": [ + "widget_config", ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "widget_config": (WidgetConfig,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "widget_config": "body", }, - 'openapi_types': { - 'widget_config': - (WidgetConfig,), - }, - 'attribute_map': { - }, - 'location_map': { - 'widget_config': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.delete_widget_config_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget-config/{id}', - 'operation_id': 'delete_widget_config', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["jwt"], + "endpoint_path": "/widget-config/{id}", + "operation_id": "delete_widget_config", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_widget_config_endpoint = _Endpoint( settings={ - 'response_type': (WidgetConfig,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget-config/{id}', - 'operation_id': 'get_widget_config', - 'http_method': 'GET', - 'servers': None, + "response_type": (WidgetConfig,), + "auth": ["jwt"], + "endpoint_path": "/widget-config/{id}", + "operation_id": "get_widget_config", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_widget_config_list_endpoint = _Endpoint( settings={ - 'response_type': (WidgetConfigList,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget-config', - 'operation_id': 'get_widget_config_list', - 'http_method': 'GET', - 'servers': None, + "response_type": (WidgetConfigList,), + "auth": ["jwt"], + "endpoint_path": "/widget-config", + "operation_id": "get_widget_config_list", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'filter', - 'page', - 'page_size', + "all": [ + "filter", + "page", + "page_size", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "filter": ([str],), + "page": (int,), + "page_size": (int,), }, - 'allowed_values': { + "attribute_map": { + "filter": "filter", + "page": "page", + "page_size": "pageSize", }, - 'openapi_types': { - 'filter': - ([str],), - 'page': - (int,), - 'page_size': - (int,), + "location_map": { + "filter": "query", + "page": "query", + "page_size": "query", }, - 'attribute_map': { - 'filter': 'filter', - 'page': 'page', - 'page_size': 'pageSize', + "collection_format_map": { + "filter": "multi", }, - 'location_map': { - 'filter': 'query', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - 'filter': 'multi', - } }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_widget_config_endpoint = _Endpoint( settings={ - 'response_type': (WidgetConfig,), - 'auth': [ - 'jwt' - ], - 'endpoint_path': '/widget-config/{id}', - 'operation_id': 'update_widget_config', - 'http_method': 'PUT', - 'servers': None, + "response_type": (WidgetConfig,), + "auth": ["jwt"], + "endpoint_path": "/widget-config/{id}", + "operation_id": "update_widget_config", + "http_method": "PUT", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'widget_config', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", + "widget_config", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'widget_config': - (WidgetConfig,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "widget_config": (WidgetConfig,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'widget_config': 'body', + "location_map": { + "id": "path", + "widget_config": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) - def add_widget_config( - self, - **kwargs - ): - """Create a widget configuration # noqa: E501 + def add_widget_config(self, **kwargs): + """Create a widget configuration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -355,39 +274,20 @@ def add_widget_config( 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["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") + 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") return self.add_widget_config_endpoint.call_with_http_info(**kwargs) - def delete_widget_config( - self, - id, - **kwargs - ): - """Delete a widget configuration # noqa: E501 + def delete_widget_config(self, id, **kwargs): + """Delete a widget configuration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -435,41 +335,21 @@ def delete_widget_config( 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 + 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") + 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") + kwargs["id"] = id return self.delete_widget_config_endpoint.call_with_http_info(**kwargs) - def get_widget_config( - self, - id, - **kwargs - ): - """Get a single widget configuration # noqa: E501 + def get_widget_config(self, id, **kwargs): + """Get a single widget configuration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -517,42 +397,23 @@ def get_widget_config( 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 + 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") + 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") + kwargs["id"] = id return self.get_widget_config_endpoint.call_with_http_info(**kwargs) - def get_widget_config_list( - self, - **kwargs - ): - """Get the list of widget configurations # noqa: E501 + def get_widget_config_list(self, **kwargs): + """Get the list of widget configurations - A list of widget configurations # noqa: E501 + A list of widget configurations This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -600,39 +461,20 @@ def get_widget_config_list( 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["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") + 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") return self.get_widget_config_list_endpoint.call_with_http_info(**kwargs) - def update_widget_config( - self, - id, - **kwargs - ): - """Updates a single widget configuration # noqa: E501 + def update_widget_config(self, id, **kwargs): + """Updates a single widget configuration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -681,32 +523,15 @@ def update_widget_config( 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 + 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") + 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") + kwargs["id"] = id return self.update_widget_config_endpoint.call_with_http_info(**kwargs) - diff --git a/ibutsu_client/api_client.py b/ibutsu_client/api_client.py index 8d3e08b..53ff758 100644 --- a/ibutsu_client/api_client.py +++ b/ibutsu_client/api_client.py @@ -1,32 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import json import atexit -import mimetypes -from multiprocessing.pool import ThreadPool import io +import json +import mimetypes import os import re import typing +from multiprocessing.pool import ThreadPool from urllib.parse import quote -from urllib3.fields import RequestField +from urllib3.fields import RequestField from ibutsu_client import rest from ibutsu_client.configuration import Configuration -from ibutsu_client.exceptions import ApiTypeError, ApiValueError, ApiException +from ibutsu_client.exceptions import ApiException, ApiTypeError, ApiValueError from ibutsu_client.model_utils import ( + ModelComposed, ModelNormal, ModelSimple, - ModelComposed, check_allowed_values, check_validations, date, @@ -35,11 +34,11 @@ file_type, model_to_dict, none_type, - validate_and_convert_types + validate_and_convert_types, ) -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -63,8 +62,9 @@ class ApiClient(object): _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1 + ): if configuration is None: configuration = Configuration.get_default_copy() self.configuration = configuration @@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/2.3.0/python' + self.user_agent = "OpenAPI-Generator/2.3.0/python" def __enter__(self): return self @@ -89,13 +89,13 @@ def close(self): self._pool.close() self._pool.join() self._pool = None - if hasattr(atexit, 'unregister'): + if hasattr(atexit, "unregister"): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. + avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) @@ -105,11 +105,11 @@ def pool(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -133,58 +133,57 @@ def __call_api( _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, _content_type: typing.Optional[str] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None, ): - config = self.configuration # header parameters header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) + "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) + query_params = self.parameters_to_tuples(query_params, collection_formats) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) + post_params = self.parameters_to_tuples(post_params, collection_formats) post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict)) + if header_params["Content-Type"].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, (dict)) # body if body: body = self.sanitize_for_serialization(body) # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body, - request_auths=_request_auths) + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auths=_request_auths, + ) # request url if _host is None: @@ -196,12 +195,17 @@ def __call_api( try: # perform request and return response response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, + method, + url, + query_params=query_params, + headers=header_params, + post_params=post_params, + body=body, _preload_content=_preload_content, - _request_timeout=_request_timeout) + _request_timeout=_request_timeout, + ) except ApiException as e: - e.body = e.body.decode('utf-8') + e.body = e.body.decode("utf-8") raise e self.last_response = response_data @@ -209,33 +213,28 @@ def __call_api( return_data = response_data if not _preload_content: - return (return_data) + return return_data return return_data # deserialize response data if response_type: if response_type != (file_type,): encoding = "utf-8" - content_type = response_data.getheader('content-type') + content_type = response_data.getheader("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) if match: encoding = match.group(1) response_data.data = response_data.data.decode(encoding) - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) + return_data = self.deserialize(response_data, response_type, _check_type) else: return_data = None if _return_http_data_only: - return (return_data) + return return_data else: - return (return_data, response_data.status, - response_data.getheaders()) + return (return_data, response_data.status, response_data.getheaders()) def parameters_to_multipart(self, params, collection_types): """Get parameters as list of tuples, formatting as json if value is collection_types @@ -246,10 +245,11 @@ def parameters_to_multipart(self, params, collection_types): """ new_params = [] if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + collection_types = dict + for k, v in params.items() if isinstance(params, dict) else params: if isinstance( - v, collection_types): # v is instance of collection_type, formatting as application/json + v, collection_types + ): # v is instance of collection_type, formatting as application/json v = json.dumps(v, ensure_ascii=False).encode("utf-8") field = RequestField(k, v) field.make_multipart(content_type="application/json; charset=utf-8") @@ -274,10 +274,9 @@ def sanitize_for_serialization(cls, obj): """ if isinstance(obj, (ModelNormal, ModelComposed)): return { - key: cls.sanitize_for_serialization(val) for key, - val in model_to_dict( - obj, - serialize=True).items()} + key: cls.sanitize_for_serialization(val) + for key, val in model_to_dict(obj, serialize=True).items() + } elif isinstance(obj, io.IOBase): return cls.get_file_data_and_close_file(obj) elif isinstance(obj, (str, int, float, none_type, bool)): @@ -290,9 +289,7 @@ def sanitize_for_serialization(cls, obj): return [cls.sanitize_for_serialization(item) for item in obj] if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError( - 'Unable to prepare type {} for serialization'.format( - obj.__class__.__name__)) + raise ApiValueError(f"Unable to prepare type {obj.__class__.__name__} for serialization") def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. @@ -318,8 +315,9 @@ def deserialize(self, response, response_type, _check_type): # save response body into a tmp file and return the instance if response_type == (file_type,): content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) + return deserialize_file( + response.data, self.configuration, content_disposition=content_disposition + ) # fetch data from response object try: @@ -332,10 +330,10 @@ def deserialize(self, response, response_type, _check_type): deserialized_data = validate_and_convert_types( received_data, response_type, - ['received_data'], + ["received_data"], True, _check_type, - configuration=self.configuration + configuration=self.configuration, ) return deserialized_data @@ -358,7 +356,7 @@ def call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None, ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -418,86 +416,130 @@ def call_api( then the method will return the response directly. """ if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type, _request_auths=_request_auths) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type, None, _request_auths)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): + return self.__call_api( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _check_type, + _request_auths=_request_auths, + ) + + return self.pool.apply_async( + self.__call_api, + ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _check_type, + None, + _request_auths, + ), + ) + + def request( + self, + method, + url, + query_params=None, + headers=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) + return self.rest_client.GET( + url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers, + ) elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) + return self.rest_client.HEAD( + url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers, + ) elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.OPTIONS( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.POST( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.PUT( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.PATCH( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.DELETE( + url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) else: raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." + "http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`." ) def parameters_to_tuples(self, params, collection_formats): @@ -510,22 +552,21 @@ def parameters_to_tuples(self, params, collection_formats): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -536,9 +577,9 @@ def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: file_instance.close() return file_data - def files_parameters(self, - files: typing.Optional[typing.Dict[str, - typing.List[io.IOBase]]] = None): + def files_parameters( + self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None + ): """Builds form parameters. :param files: None or a dict with key=param_name and @@ -564,10 +605,8 @@ def files_parameters(self, ) filename = os.path.basename(file_instance.name) filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([param_name, tuple([filename, filedata, mimetype])])) return params @@ -582,10 +621,10 @@ def select_header_accept(self, accepts): accepts = [x.lower() for x in accepts] - if 'application/json' in accepts: - return 'application/json' + if "application/json" in accepts: + return "application/json" else: - return ', '.join(accepts) + return ", ".join(accepts) def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. @@ -600,18 +639,21 @@ def select_header_content_type(self, content_types, method=None, body=None): content_types = [x.lower() for x in content_types] - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + if ( + method == "PATCH" + and "application/json-patch+json" in content_types + and isinstance(body, list) + ): + return "application/json-patch+json" - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' + if "application/json" in content_types or "*/*" in content_types: + return "application/json" else: return content_types[0] - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, request_auths=None): + def update_params_for_auth( + self, headers, queries, auth_settings, resource_path, method, body, request_auths=None + ): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -630,32 +672,39 @@ def update_params_for_auth(self, headers, queries, auth_settings, if request_auths: for auth_setting in request_auths: self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) + headers, queries, resource_path, method, body, auth_setting + ) return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) + headers, queries, resource_path, method, body, auth_setting + ) def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["key"] + "=" + auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): +class Endpoint: + def __init__( + self, + settings=None, + params_map=None, + root_map=None, + headers_map=None, + api_client=None, + callable=None, + ): """Creates an endpoint Args: @@ -691,61 +740,59 @@ def __init__(self, settings=None, params_map=None, root_map=None, """ self.settings = settings self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming', - '_request_auths' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] + self.params_map["all"].extend( + [ + "async_req", + "_host_index", + "_preload_content", + "_request_timeout", + "_return_http_data_only", + "_check_input_type", + "_check_return_type", + "_content_type", + "_spec_property_naming", + "_request_auths", + ] + ) + self.params_map["nullable"].extend(["_request_timeout"]) + self.validations = root_map["validations"] + self.allowed_values = root_map["allowed_values"] + self.openapi_types = root_map["openapi_types"] extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str), - '_request_auths': (none_type, list) + "async_req": (bool,), + "_host_index": (none_type, int), + "_preload_content": (bool,), + "_request_timeout": (none_type, float, (float,), [float], int, (int,), [int]), + "_return_http_data_only": (bool,), + "_check_input_type": (bool,), + "_check_return_type": (bool,), + "_spec_property_naming": (bool,), + "_content_type": (none_type, str), + "_request_auths": (none_type, list), } self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] + self.attribute_map = root_map["attribute_map"] + self.location_map = root_map["location_map"] + self.collection_format_map = root_map["collection_format_map"] self.headers_map = headers_map self.api_client = api_client self.callable = callable def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: + for param in self.params_map["enum"]: if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) + check_allowed_values(self.allowed_values, (param,), kwargs[param]) - for param in self.params_map['validation']: + for param in self.params_map["validation"]: if param in kwargs: check_validations( self.validations, (param,), kwargs[param], - configuration=self.api_client.configuration + configuration=self.api_client.configuration, ) - if kwargs['_check_input_type'] is False: + if kwargs["_check_input_type"] is False: return for key, value in kwargs.items(): @@ -753,21 +800,21 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + kwargs["_spec_property_naming"], + kwargs["_check_input_type"], + configuration=self.api_client.configuration, ) kwargs[key] = fixed_val def __gather_params(self, kwargs): params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] + "body": None, + "collection_format": {}, + "file": {}, + "form": [], + "header": {}, + "path": {}, + "query": [], } for param_name, param_value in kwargs.items(): @@ -775,30 +822,28 @@ def __gather_params(self, kwargs): if param_location is None: continue if param_location: - if param_location == 'body': - params['body'] = param_value + if param_location == "body": + params["body"] = param_value continue base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): + if param_location == "form" and self.openapi_types[param_name] == (file_type,): + params["file"][base_name] = [param_value] + elif param_location == "form" and self.openapi_types[param_name] == ([file_type],): # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: + params["file"][base_name] = param_value + elif param_location in {"form", "query"}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: + if param_location not in {"form", "query"}: params[param_location][base_name] = param_value collection_format = self.collection_format_map.get(param_name) if collection_format: - params['collection_format'][base_name] = collection_format + params["collection_format"][base_name] = collection_format return params def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called + """This method is invoked when endpoints are called Example: api_instance = AdminProjectManagementApi() @@ -811,86 +856,90 @@ def __call__(self, *args, **kwargs): return self.callable(self, *args, **kwargs) def call_with_http_info(self, **kwargs): - try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] + index = ( + self.api_client.configuration.server_operation_index.get( + self.settings["operation_id"], self.api_client.configuration.server_index + ) + if kwargs["_host_index"] is None + else kwargs["_host_index"] + ) server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables + self.settings["operation_id"], self.api_client.configuration.server_variables ) _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + index, variables=server_variables, servers=self.settings["servers"] ) except IndexError: - if self.settings['servers']: + if self.settings["servers"]: raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) + "Invalid host index. Must be 0 <= index < %s" % len(self.settings["servers"]) ) _host = None for key, value in kwargs.items(): - if key not in self.params_map['all']: + if key not in self.params_map["all"]: raise ApiTypeError( "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) + " to method `%s`" % (key, self.settings["operation_id"]) ) # only throw this nullable ApiValueError if _check_input_type # is False, if _check_input_type==True we catch this case # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): + if ( + key not in self.params_map["nullable"] + and value is None + and kwargs["_check_input_type"] is False + ): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) + " when calling `%s`" % (key, self.settings["operation_id"]) ) - for key in self.params_map['required']: - if key not in kwargs.keys(): + for key in self.params_map["required"]: + if key not in kwargs: raise ApiValueError( "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) + "`%s`" % (key, self.settings["operation_id"]) ) self.__validate_inputs(kwargs) params = self.__gather_params(kwargs) - accept_headers_list = self.headers_map['accept'] + accept_headers_list = self.headers_map["accept"] if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + params["header"]["Accept"] = self.api_client.select_header_accept(accept_headers_list) - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] + if kwargs.get("_content_type"): + params["header"]["Content-Type"] = kwargs["_content_type"] else: - content_type_headers_list = self.headers_map['content_type'] + content_type_headers_list = self.headers_map["content_type"] if content_type_headers_list: - if params['body'] != "": + if params["body"] != "": content_types_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) + content_type_headers_list, self.settings["http_method"], params["body"] + ) if content_types_list: - params['header']['Content-Type'] = content_types_list + params["header"]["Content-Type"] = content_types_list return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], + self.settings["endpoint_path"], + self.settings["http_method"], + params["path"], + params["query"], + params["header"], + body=params["body"], + post_params=params["form"], + files=params["file"], + response_type=self.settings["response_type"], + auth_settings=self.settings["auth"], + async_req=kwargs["async_req"], + _check_type=kwargs["_check_return_type"], + _return_http_data_only=kwargs["_return_http_data_only"], + _preload_content=kwargs["_preload_content"], + _request_timeout=kwargs["_request_timeout"], _host=_host, - _request_auths=kwargs['_request_auths'], - collection_formats=params['collection_format']) + _request_auths=kwargs["_request_auths"], + collection_formats=params["collection_format"], + ) diff --git a/ibutsu_client/apis/__init__.py b/ibutsu_client/apis/__init__.py index 55cf69f..195e850 100644 --- a/ibutsu_client/apis/__init__.py +++ b/ibutsu_client/apis/__init__.py @@ -1,6 +1,3 @@ - -# flake8: noqa - # Import all APIs into this package. # If you have many APIs here with many many models used in each API this may # raise a `RecursionError`. @@ -13,6 +10,25 @@ # import sys # sys.setrecursionlimit(n) +__all__ = [ + "AdminProjectManagementApi", + "AdminUserManagementApi", + "ArtifactApi", + "DashboardApi", + "GroupApi", + "HealthApi", + "ImportApi", + "LoginApi", + "ProjectApi", + "ReportApi", + "ResultApi", + "RunApi", + "TaskApi", + "UserApi", + "WidgetApi", + "WidgetConfigApi", +] + # Import APIs into API package: from ibutsu_client.api.admin_project_management_api import AdminProjectManagementApi from ibutsu_client.api.admin_user_management_api import AdminUserManagementApi diff --git a/ibutsu_client/configuration.py b/ibutsu_client/configuration.py index 8b41ba2..09572ef 100644 --- a/ibutsu_client/configuration.py +++ b/ibutsu_client/configuration.py @@ -1,30 +1,37 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import copy import logging import multiprocessing import sys +from http import client as http_client + import urllib3 -from http import client as http_client from ibutsu_client.exceptions import ApiValueError - JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } -class Configuration(object): + +class Configuration: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -81,18 +88,23 @@ class Configuration(object): _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - access_token=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + access_token=None, + username=None, + password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor""" self._base_path = "/api" if host is None else host """Default Base url """ @@ -135,7 +147,7 @@ def __init__(self, host=None, """ self.logger["package_logger"] = logging.getLogger("ibutsu_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -186,7 +198,7 @@ def __init__(self, host=None, self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = None @@ -203,7 +215,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -214,12 +226,11 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) + if name == "disabled_client_side_validations": + s = set(filter(None, value.split(","))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) + raise ApiValueError(f"Invalid keyword: '{v}''") self._disabled_client_side_validations = s @classmethod @@ -345,7 +356,7 @@ def get_api_key_with_prefix(self, identifier, alias=None): if key: prefix = self.api_key_prefix.get(identifier) if prefix: - return "%s %s" % (prefix, key) + return f"{prefix} {key}" else: return key @@ -360,9 +371,7 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") def auth_settings(self): """Gets Auth Settings dict for api client. @@ -371,12 +380,12 @@ def auth_settings(self): """ auth = {} if self.access_token is not None: - auth['jwt'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["jwt"] = { + "type": "bearer", + "in": "header", + "format": "JWT", + "key": "Authorization", + "value": "Bearer " + self.access_token, } return auth @@ -385,12 +394,13 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 2.3.0\n"\ - "SDK Package Version: 2.3.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + f"OS: {sys.platform}\n" + f"Python Version: {sys.version}\n" + "Version of the API: 2.3.0\n" + "SDK Package Version: 2.3.0" + ) def get_host_settings(self): """Gets an array of host settings @@ -399,8 +409,8 @@ def get_host_settings(self): """ return [ { - 'url': "/api", - 'description': "No description provided", + "url": "/api", + "description": "No description provided", } ] @@ -421,23 +431,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): server = servers[index] except IndexError: raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + f"Invalid index {index} when selecting the host settings. " + f"Must be less than {len(servers)}" + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + "The variable `{}` in the host URL has invalid value {}. Must be {}.".format( + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) diff --git a/ibutsu_client/exceptions.py b/ibutsu_client/exceptions.py index fedb14a..514a872 100644 --- a/ibutsu_client/exceptions.py +++ b/ibutsu_client/exceptions.py @@ -1,10 +1,10 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ @@ -13,9 +13,8 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -37,8 +36,8 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, self.key_type = key_type full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiValueError(OpenApiException, ValueError): @@ -55,8 +54,8 @@ def __init__(self, msg, path_to_item=None): self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiAttributeError(OpenApiException, AttributeError): @@ -74,8 +73,8 @@ def __init__(self, msg, path_to_item=None): self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiKeyError(OpenApiException, KeyError): @@ -91,12 +90,11 @@ def __init__(self, msg, path_to_item=None): self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): if http_resp: self.status = http_resp.status @@ -111,40 +109,34 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "Status Code: {0}\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = f"Status Code: {self.status}\nReason: {self.reason}\n" if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += f"HTTP response headers: {self.headers}\n" if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + error_message += f"HTTP response body: {self.body}\n" return error_message class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) + super().__init__(status, reason, http_resp) class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) + super().__init__(status, reason, http_resp) class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + super().__init__(status, reason, http_resp) class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + super().__init__(status, reason, http_resp) def render_path(path_to_item): @@ -152,7 +144,7 @@ def render_path(path_to_item): result = "" for pth in path_to_item: if isinstance(pth, int): - result += "[{0}]".format(pth) + result += f"[{pth}]" else: - result += "['{0}']".format(pth) + result += f"['{pth}']" return result diff --git a/ibutsu_client/model/account_recovery.py b/ibutsu_client/model/account_recovery.py index 3b2bc26..2630557 100644 --- a/ibutsu_client/model/account_recovery.py +++ b/ibutsu_client/model/account_recovery.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class AccountRecovery(ModelNormal): @@ -54,11 +44,9 @@ class AccountRecovery(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,26 +79,24 @@ def openapi_types(): and the value is attribute type. """ return { - 'email': (str,), # noqa: E501 + "email": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'email': 'email', # noqa: E501 + "email": "email", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, email, *args, **kwargs): """AccountRecovery - a model defined in OpenAPI Args: @@ -139,11 +135,11 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 _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', ()) + _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) @@ -153,7 +149,8 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,26 +167,28 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 self.email = email 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, email, *args, **kwargs): # noqa: E501 + def __init__(self, email, *args, **kwargs): """AccountRecovery - a model defined in OpenAPI Args: @@ -228,11 +227,11 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 _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', ()) + _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: @@ -240,7 +239,8 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -257,13 +257,17 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 self.email = email 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: + 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.") + 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/ibutsu_client/model/account_registration.py b/ibutsu_client/model/account_registration.py index 4a5ceb7..ce52752 100644 --- a/ibutsu_client/model/account_registration.py +++ b/ibutsu_client/model/account_registration.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class AccountRegistration(ModelNormal): @@ -54,11 +44,9 @@ class AccountRegistration(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'email': (str,), # noqa: E501 - 'password': (str,), # noqa: E501 + "email": (str,), + "password": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'email': 'email', # noqa: E501 - 'password': 'password', # noqa: E501 + "email": "email", + "password": "password", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, email, password, *args, **kwargs): """AccountRegistration - a model defined in OpenAPI Args: @@ -142,11 +138,11 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 _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', ()) + _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) @@ -156,7 +152,8 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,26 +171,28 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 self.email = email self.password = password 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, email, password, *args, **kwargs): # noqa: E501 + def __init__(self, email, password, *args, **kwargs): """AccountRegistration - a model defined in OpenAPI Args: @@ -233,11 +232,11 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 _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', ()) + _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: @@ -245,7 +244,8 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +263,17 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 self.email = email self.password = password 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: + 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.") + 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/ibutsu_client/model/account_reset.py b/ibutsu_client/model/account_reset.py index 7f2b48b..fa4caac 100644 --- a/ibutsu_client/model/account_reset.py +++ b/ibutsu_client/model/account_reset.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class AccountReset(ModelNormal): @@ -54,11 +44,9 @@ class AccountReset(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'activation_code': (str,), # noqa: E501 - 'password': (str,), # noqa: E501 + "activation_code": (str,), + "password": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'activation_code': 'activation_code', # noqa: E501 - 'password': 'password', # noqa: E501 + "activation_code": "activation_code", + "password": "password", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, activation_code, password, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, activation_code, password, *args, **kwargs): """AccountReset - a model defined in OpenAPI Args: @@ -142,11 +138,11 @@ def _from_openapi_data(cls, activation_code, password, *args, **kwargs): # noqa _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', ()) + _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) @@ -156,7 +152,8 @@ def _from_openapi_data(cls, activation_code, password, *args, **kwargs): # noqa kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,26 +171,28 @@ def _from_openapi_data(cls, activation_code, password, *args, **kwargs): # noqa self.activation_code = activation_code self.password = password 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, activation_code, password, *args, **kwargs): # noqa: E501 + def __init__(self, activation_code, password, *args, **kwargs): """AccountReset - a model defined in OpenAPI Args: @@ -233,11 +232,11 @@ def __init__(self, activation_code, password, *args, **kwargs): # noqa: E501 _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', ()) + _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: @@ -245,7 +244,8 @@ def __init__(self, activation_code, password, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +263,17 @@ def __init__(self, activation_code, password, *args, **kwargs): # noqa: E501 self.activation_code = activation_code self.password = password 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: + 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.") + 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/ibutsu_client/model/artifact.py b/ibutsu_client/model/artifact.py index 1339528..86e74ed 100644 --- a/ibutsu_client/model/artifact.py +++ b/ibutsu_client/model/artifact.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Artifact(ModelNormal): @@ -54,11 +44,9 @@ class Artifact(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,36 +79,36 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'result_id': (str,), # noqa: E501 - 'run_id': (str,), # noqa: E501 - 'filename': (str,), # noqa: E501 - 'additional_metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'upload_date': (str,), # noqa: E501 + "id": (str,), + "result_id": (str,), + "run_id": (str,), + "filename": (str,), + "additional_metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), + "upload_date": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'result_id': 'result_id', # noqa: E501 - 'run_id': 'run_id', # noqa: E501 - 'filename': 'filename', # noqa: E501 - 'additional_metadata': 'additional_metadata', # noqa: E501 - 'upload_date': 'upload_date', # noqa: E501 + "id": "id", + "result_id": "result_id", + "run_id": "run_id", + "filename": "filename", + "additional_metadata": "additional_metadata", + "upload_date": "upload_date", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Artifact - a model defined in OpenAPI Keyword Args: @@ -144,19 +142,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the artifact. [optional] # noqa: E501 - result_id (str): ID of test result to attach artifact to. [optional] # noqa: E501 - run_id (str): ID of test run to attach artifact to. [optional] # noqa: E501 - filename (str): ID of pet to update. [optional] # noqa: E501 - additional_metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional data to pass to server. [optional] # noqa: E501 - upload_date (str): The date this artifact was uploaded. [optional] # noqa: E501 + id (str): Unique ID of the artifact. [optional] + result_id (str): ID of test result to attach artifact to. [optional] + run_id (str): ID of test run to attach artifact to. [optional] + filename (str): ID of pet to update. [optional] + additional_metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional data to pass to server. [optional] + upload_date (str): The date this artifact was uploaded. [optional] """ - _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', ()) + _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) @@ -166,7 +164,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,26 +181,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Artifact - a model defined in OpenAPI Keyword Args: @@ -235,19 +236,19 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the artifact. [optional] # noqa: E501 - result_id (str): ID of test result to attach artifact to. [optional] # noqa: E501 - run_id (str): ID of test run to attach artifact to. [optional] # noqa: E501 - filename (str): ID of pet to update. [optional] # noqa: E501 - additional_metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional data to pass to server. [optional] # noqa: E501 - upload_date (str): The date this artifact was uploaded. [optional] # noqa: E501 + id (str): Unique ID of the artifact. [optional] + result_id (str): ID of test result to attach artifact to. [optional] + run_id (str): ID of test run to attach artifact to. [optional] + filename (str): ID of pet to update. [optional] + additional_metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional data to pass to server. [optional] + upload_date (str): The date this artifact was uploaded. [optional] """ - _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', ()) + _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: @@ -255,7 +256,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -271,13 +273,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/artifact_list.py b/ibutsu_client/model/artifact_list.py index b794a91..c86930e 100644 --- a/ibutsu_client/model/artifact_list.py +++ b/ibutsu_client/model/artifact_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.artifact import Artifact from ibutsu_client.model.pagination import Pagination - globals()['Artifact'] = Artifact - globals()['Pagination'] = Pagination + + globals()["Artifact"] = Artifact + globals()["Pagination"] = Pagination class ArtifactList(ModelNormal): @@ -60,11 +52,9 @@ class ArtifactList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'artifacts': ([Artifact],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "artifacts": ([Artifact],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'artifacts': 'artifacts', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "artifacts": "artifacts", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ArtifactList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - artifacts ([Artifact]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + artifacts ([Artifact]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ArtifactList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - artifacts ([Artifact]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + artifacts ([Artifact]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/create_token.py b/ibutsu_client/model/create_token.py index 36149a1..82e1b6f 100644 --- a/ibutsu_client/model/create_token.py +++ b/ibutsu_client/model/create_token.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class CreateToken(ModelNormal): @@ -54,11 +44,9 @@ class CreateToken(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,29 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'expires': (str, none_type,), # noqa: E501 + "name": (str,), + "expires": ( + str, + none_type, + ), } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'expires': 'expires', # noqa: E501 + "name": "name", + "expires": "expires", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, name, expires, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, name, expires, *args, **kwargs): """CreateToken - a model defined in OpenAPI Args: @@ -142,11 +141,11 @@ def _from_openapi_data(cls, name, expires, *args, **kwargs): # noqa: E501 _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', ()) + _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) @@ -156,7 +155,8 @@ def _from_openapi_data(cls, name, expires, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,26 +174,28 @@ def _from_openapi_data(cls, name, expires, *args, **kwargs): # noqa: E501 self.name = name self.expires = expires 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, name, expires, *args, **kwargs): # noqa: E501 + def __init__(self, name, expires, *args, **kwargs): """CreateToken - a model defined in OpenAPI Args: @@ -233,11 +235,11 @@ def __init__(self, name, expires, *args, **kwargs): # noqa: E501 _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', ()) + _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: @@ -245,7 +247,8 @@ def __init__(self, name, expires, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +266,17 @@ def __init__(self, name, expires, *args, **kwargs): # noqa: E501 self.name = name self.expires = expires 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: + 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.") + 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/ibutsu_client/model/credentials.py b/ibutsu_client/model/credentials.py index 71aa798..47e223a 100644 --- a/ibutsu_client/model/credentials.py +++ b/ibutsu_client/model/credentials.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Credentials(ModelNormal): @@ -54,11 +44,9 @@ class Credentials(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'email': (str,), # noqa: E501 - 'password': (str,), # noqa: E501 + "email": (str,), + "password": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'email': 'email', # noqa: E501 - 'password': 'password', # noqa: E501 + "email": "email", + "password": "password", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, email, password, *args, **kwargs): """Credentials - a model defined in OpenAPI Args: @@ -142,11 +138,11 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 _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', ()) + _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) @@ -156,7 +152,8 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,26 +171,28 @@ def _from_openapi_data(cls, email, password, *args, **kwargs): # noqa: E501 self.email = email self.password = password 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, email, password, *args, **kwargs): # noqa: E501 + def __init__(self, email, password, *args, **kwargs): """Credentials - a model defined in OpenAPI Args: @@ -233,11 +232,11 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 _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', ()) + _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: @@ -245,7 +244,8 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +263,17 @@ def __init__(self, email, password, *args, **kwargs): # noqa: E501 self.email = email self.password = password 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: + 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.") + 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/ibutsu_client/model/dashboard.py b/ibutsu_client/model/dashboard.py index 930f2fe..e000c6e 100644 --- a/ibutsu_client/model/dashboard.py +++ b/ibutsu_client/model/dashboard.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Dashboard(ModelNormal): @@ -54,11 +44,9 @@ class Dashboard(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,36 +79,34 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'filters': (str,), # noqa: E501 - 'project_id': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 + "id": (str,), + "title": (str,), + "description": (str,), + "filters": (str,), + "project_id": (str,), + "user_id": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'filters': 'filters', # noqa: E501 - 'project_id': 'project_id', # noqa: E501 - 'user_id': 'user_id', # noqa: E501 + "id": "id", + "title": "title", + "description": "description", + "filters": "filters", + "project_id": "project_id", + "user_id": "user_id", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Dashboard - a model defined in OpenAPI Keyword Args: @@ -144,19 +140,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the dashboard. [optional] # noqa: E501 - title (str): The title of the dashboard. [optional] # noqa: E501 - description (str): A basic description of the dashboard. [optional] # noqa: E501 - filters (str): An optional set of filters. [optional] # noqa: E501 - project_id (str): The ID of the project this dashboard is associated with. [optional] # noqa: E501 - user_id (str): The ID of a user this dashboard might be associated with. [optional] # noqa: E501 + id (str): Unique ID of the dashboard. [optional] + title (str): The title of the dashboard. [optional] + description (str): A basic description of the dashboard. [optional] + filters (str): An optional set of filters. [optional] + project_id (str): The ID of the project this dashboard is associated with. [optional] + user_id (str): The ID of a user this dashboard might be associated with. [optional] """ - _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', ()) + _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) @@ -166,7 +162,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,26 +179,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Dashboard - a model defined in OpenAPI Keyword Args: @@ -235,19 +234,19 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the dashboard. [optional] # noqa: E501 - title (str): The title of the dashboard. [optional] # noqa: E501 - description (str): A basic description of the dashboard. [optional] # noqa: E501 - filters (str): An optional set of filters. [optional] # noqa: E501 - project_id (str): The ID of the project this dashboard is associated with. [optional] # noqa: E501 - user_id (str): The ID of a user this dashboard might be associated with. [optional] # noqa: E501 + id (str): Unique ID of the dashboard. [optional] + title (str): The title of the dashboard. [optional] + description (str): A basic description of the dashboard. [optional] + filters (str): An optional set of filters. [optional] + project_id (str): The ID of the project this dashboard is associated with. [optional] + user_id (str): The ID of a user this dashboard might be associated with. [optional] """ - _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', ()) + _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: @@ -255,7 +254,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -271,13 +271,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/dashboard_list.py b/ibutsu_client/model/dashboard_list.py index a434602..5459194 100644 --- a/ibutsu_client/model/dashboard_list.py +++ b/ibutsu_client/model/dashboard_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.dashboard import Dashboard from ibutsu_client.model.pagination import Pagination - globals()['Dashboard'] = Dashboard - globals()['Pagination'] = Pagination + + globals()["Dashboard"] = Dashboard + globals()["Pagination"] = Pagination class DashboardList(ModelNormal): @@ -60,11 +52,9 @@ class DashboardList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'dashboards': ([Dashboard],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "dashboards": ([Dashboard],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'dashboards': 'dashboards', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "dashboards": "dashboards", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """DashboardList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dashboards ([Dashboard]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + dashboards ([Dashboard]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """DashboardList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dashboards ([Dashboard]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + dashboards ([Dashboard]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/get_report_types200_response_inner.py b/ibutsu_client/model/get_report_types200_response_inner.py index d092741..f9e67cd 100644 --- a/ibutsu_client/model/get_report_types200_response_inner.py +++ b/ibutsu_client/model/get_report_types200_response_inner.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class GetReportTypes200ResponseInner(ModelNormal): @@ -54,11 +44,9 @@ class GetReportTypes200ResponseInner(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'type': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 + "type": (str,), + "name": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'type': 'type', # noqa: E501 - 'name': 'name', # noqa: E501 + "type": "type", + "name": "name", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """GetReportTypes200ResponseInner - a model defined in OpenAPI Keyword Args: @@ -136,15 +132,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): The machine-readable name of report type. [optional] # noqa: E501 - name (str): The human-readable name of report type. [optional] # noqa: E501 + type (str): The machine-readable name of report type. [optional] + name (str): The human-readable name of report type. [optional] """ - _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', ()) + _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) @@ -154,7 +150,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,26 +167,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """GetReportTypes200ResponseInner - a model defined in OpenAPI Keyword Args: @@ -223,15 +222,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): The machine-readable name of report type. [optional] # noqa: E501 - name (str): The human-readable name of report type. [optional] # noqa: E501 + type (str): The machine-readable name of report type. [optional] + name (str): The human-readable name of report type. [optional] """ - _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', ()) + _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: @@ -239,7 +238,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -255,13 +255,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/group.py b/ibutsu_client/model/group.py index d3eacf0..79ffd69 100644 --- a/ibutsu_client/model/group.py +++ b/ibutsu_client/model/group.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Group(ModelNormal): @@ -54,11 +44,9 @@ class Group(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 + "id": (str,), + "name": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 + "id": "id", + "name": "name", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Group - a model defined in OpenAPI Keyword Args: @@ -136,15 +132,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the group. [optional] # noqa: E501 - name (str): The name of the group. [optional] # noqa: E501 + id (str): Unique ID of the group. [optional] + name (str): The name of the group. [optional] """ - _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', ()) + _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) @@ -154,7 +150,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,26 +167,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Group - a model defined in OpenAPI Keyword Args: @@ -223,15 +222,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the group. [optional] # noqa: E501 - name (str): The name of the group. [optional] # noqa: E501 + id (str): Unique ID of the group. [optional] + name (str): The name of the group. [optional] """ - _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', ()) + _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: @@ -239,7 +238,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -255,13 +255,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/group_list.py b/ibutsu_client/model/group_list.py index 8d0f8b3..fc30a54 100644 --- a/ibutsu_client/model/group_list.py +++ b/ibutsu_client/model/group_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.group import Group from ibutsu_client.model.pagination import Pagination - globals()['Group'] = Group - globals()['Pagination'] = Pagination + + globals()["Group"] = Group + globals()["Pagination"] = Pagination class GroupList(ModelNormal): @@ -60,11 +52,9 @@ class GroupList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'groups': ([Group],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "groups": ([Group],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'groups': 'groups', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "groups": "groups", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """GroupList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - groups ([Group]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + groups ([Group]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """GroupList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - groups ([Group]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + groups ([Group]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/health.py b/ibutsu_client/model/health.py index bcbddaf..7e10176 100644 --- a/ibutsu_client/model/health.py +++ b/ibutsu_client/model/health.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Health(ModelNormal): @@ -54,11 +44,9 @@ class Health(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'status': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + "status": (str,), + "message": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'status': 'status', # noqa: E501 - 'message': 'message', # noqa: E501 + "status": "status", + "message": "message", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Health - a model defined in OpenAPI Keyword Args: @@ -136,15 +132,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - status (str): The status of the database, one of \"OK\", \"Error\", \"Pending\". [optional] # noqa: E501 - message (str): A message to explain the current status. [optional] # noqa: E501 + status (str): The status of the database, one of \"OK\", \"Error\", \"Pending\". [optional] + message (str): A message to explain the current status. [optional] """ - _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', ()) + _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) @@ -154,7 +150,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,26 +167,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Health - a model defined in OpenAPI Keyword Args: @@ -223,15 +222,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - status (str): The status of the database, one of \"OK\", \"Error\", \"Pending\". [optional] # noqa: E501 - message (str): A message to explain the current status. [optional] # noqa: E501 + status (str): The status of the database, one of \"OK\", \"Error\", \"Pending\". [optional] + message (str): A message to explain the current status. [optional] """ - _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', ()) + _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: @@ -239,7 +238,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -255,13 +255,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/health_info.py b/ibutsu_client/model/health_info.py index 3699fef..1d9529d 100644 --- a/ibutsu_client/model/health_info.py +++ b/ibutsu_client/model/health_info.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class HealthInfo(ModelNormal): @@ -54,11 +44,9 @@ class HealthInfo(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,30 +79,28 @@ def openapi_types(): and the value is attribute type. """ return { - 'frontend': (str,), # noqa: E501 - 'backend': (str,), # noqa: E501 - 'api_ui': (str,), # noqa: E501 + "frontend": (str,), + "backend": (str,), + "api_ui": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'frontend': 'frontend', # noqa: E501 - 'backend': 'backend', # noqa: E501 - 'api_ui': 'api_ui', # noqa: E501 + "frontend": "frontend", + "backend": "backend", + "api_ui": "api_ui", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """HealthInfo - a model defined in OpenAPI Keyword Args: @@ -138,16 +134,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - frontend (str): The URL of the frontend. [optional] # noqa: E501 - backend (str): The URL of the backend. [optional] # noqa: E501 - api_ui (str): The URL to the UI for the API. [optional] # noqa: E501 + frontend (str): The URL of the frontend. [optional] + backend (str): The URL of the backend. [optional] + api_ui (str): The URL to the UI for the API. [optional] """ - _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', ()) + _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) @@ -157,7 +153,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -173,26 +170,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """HealthInfo - a model defined in OpenAPI Keyword Args: @@ -226,16 +225,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - frontend (str): The URL of the frontend. [optional] # noqa: E501 - backend (str): The URL of the backend. [optional] # noqa: E501 - api_ui (str): The URL to the UI for the API. [optional] # noqa: E501 + frontend (str): The URL of the frontend. [optional] + backend (str): The URL of the backend. [optional] + api_ui (str): The URL to the UI for the API. [optional] """ - _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', ()) + _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: @@ -243,7 +242,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -259,13 +259,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/login_config.py b/ibutsu_client/model/login_config.py index c9898d2..332b330 100644 --- a/ibutsu_client/model/login_config.py +++ b/ibutsu_client/model/login_config.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class LoginConfig(ModelNormal): @@ -54,11 +44,9 @@ class LoginConfig(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,30 +79,28 @@ def openapi_types(): and the value is attribute type. """ return { - 'client_id': (str,), # noqa: E501 - 'redirect_uri': (str,), # noqa: E501 - 'scope': (str,), # noqa: E501 + "client_id": (str,), + "redirect_uri": (str,), + "scope": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'redirect_uri': 'redirect_uri', # noqa: E501 - 'scope': 'scope', # noqa: E501 + "client_id": "client_id", + "redirect_uri": "redirect_uri", + "scope": "scope", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """LoginConfig - a model defined in OpenAPI Keyword Args: @@ -138,16 +134,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - client_id (str): The client ID for the provider. [optional] # noqa: E501 - redirect_uri (str): The redirect URI for the provider to call back. [optional] # noqa: E501 - scope (str): The OAuth2 permission scope. [optional] # noqa: E501 + client_id (str): The client ID for the provider. [optional] + redirect_uri (str): The redirect URI for the provider to call back. [optional] + scope (str): The OAuth2 permission scope. [optional] """ - _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', ()) + _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) @@ -157,7 +153,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -173,26 +170,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """LoginConfig - a model defined in OpenAPI Keyword Args: @@ -226,16 +225,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - client_id (str): The client ID for the provider. [optional] # noqa: E501 - redirect_uri (str): The redirect URI for the provider to call back. [optional] # noqa: E501 - scope (str): The OAuth2 permission scope. [optional] # noqa: E501 + client_id (str): The client ID for the provider. [optional] + redirect_uri (str): The redirect URI for the provider to call back. [optional] + scope (str): The OAuth2 permission scope. [optional] """ - _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', ()) + _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: @@ -243,7 +242,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -259,13 +259,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/login_error.py b/ibutsu_client/model/login_error.py index f36c511..98c60fd 100644 --- a/ibutsu_client/model/login_error.py +++ b/ibutsu_client/model/login_error.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class LoginError(ModelNormal): @@ -54,11 +44,9 @@ class LoginError(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,28 +79,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + "code": (str,), + "message": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'code': 'code', # noqa: E501 - 'message': 'message', # noqa: E501 + "code": "code", + "message": "message", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """LoginError - a model defined in OpenAPI Keyword Args: @@ -136,15 +132,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (str): An error code generated by the server. [optional] # noqa: E501 - message (str): The error message that corresponds with the error code. [optional] # noqa: E501 + code (str): An error code generated by the server. [optional] + message (str): The error message that corresponds with the error code. [optional] """ - _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', ()) + _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) @@ -154,7 +150,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,26 +167,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """LoginError - a model defined in OpenAPI Keyword Args: @@ -223,15 +222,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (str): An error code generated by the server. [optional] # noqa: E501 - message (str): The error message that corresponds with the error code. [optional] # noqa: E501 + code (str): An error code generated by the server. [optional] + message (str): The error message that corresponds with the error code. [optional] """ - _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', ()) + _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: @@ -239,7 +238,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -255,13 +255,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/login_support.py b/ibutsu_client/model/login_support.py index e4e32bf..2a8d598 100644 --- a/ibutsu_client/model/login_support.py +++ b/ibutsu_client/model/login_support.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class LoginSupport(ModelNormal): @@ -54,11 +44,9 @@ class LoginSupport(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,36 +79,34 @@ def openapi_types(): and the value is attribute type. """ return { - 'user': (bool,), # noqa: E501 - 'keycloak': (bool,), # noqa: E501 - 'google': (bool,), # noqa: E501 - 'github': (bool,), # noqa: E501 - 'facebook': (bool,), # noqa: E501 - 'gitlab': (bool,), # noqa: E501 + "user": (bool,), + "keycloak": (bool,), + "google": (bool,), + "github": (bool,), + "facebook": (bool,), + "gitlab": (bool,), } @cached_property def discriminator(): return None - attribute_map = { - 'user': 'user', # noqa: E501 - 'keycloak': 'keycloak', # noqa: E501 - 'google': 'google', # noqa: E501 - 'github': 'github', # noqa: E501 - 'facebook': 'facebook', # noqa: E501 - 'gitlab': 'gitlab', # noqa: E501 + "user": "user", + "keycloak": "keycloak", + "google": "google", + "github": "github", + "facebook": "facebook", + "gitlab": "gitlab", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """LoginSupport - a model defined in OpenAPI Keyword Args: @@ -144,19 +140,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - user (bool): Flag to see if email/password login is available. [optional] # noqa: E501 - keycloak (bool): Flag to see if Keycloak login is available. [optional] # noqa: E501 - google (bool): Flag to see if Google login is available. [optional] # noqa: E501 - github (bool): Flag to see if GitHub login is available. [optional] # noqa: E501 - facebook (bool): Flag to see if Facebook login is available. [optional] # noqa: E501 - gitlab (bool): Flag to see if GitLab login is available. [optional] # noqa: E501 + user (bool): Flag to see if email/password login is available. [optional] + keycloak (bool): Flag to see if Keycloak login is available. [optional] + google (bool): Flag to see if Google login is available. [optional] + github (bool): Flag to see if GitHub login is available. [optional] + facebook (bool): Flag to see if Facebook login is available. [optional] + gitlab (bool): Flag to see if GitLab login is available. [optional] """ - _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', ()) + _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) @@ -166,7 +162,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,26 +179,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """LoginSupport - a model defined in OpenAPI Keyword Args: @@ -235,19 +234,19 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - user (bool): Flag to see if email/password login is available. [optional] # noqa: E501 - keycloak (bool): Flag to see if Keycloak login is available. [optional] # noqa: E501 - google (bool): Flag to see if Google login is available. [optional] # noqa: E501 - github (bool): Flag to see if GitHub login is available. [optional] # noqa: E501 - facebook (bool): Flag to see if Facebook login is available. [optional] # noqa: E501 - gitlab (bool): Flag to see if GitLab login is available. [optional] # noqa: E501 + user (bool): Flag to see if email/password login is available. [optional] + keycloak (bool): Flag to see if Keycloak login is available. [optional] + google (bool): Flag to see if Google login is available. [optional] + github (bool): Flag to see if GitHub login is available. [optional] + facebook (bool): Flag to see if Facebook login is available. [optional] + gitlab (bool): Flag to see if GitLab login is available. [optional] """ - _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', ()) + _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: @@ -255,7 +254,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -271,13 +271,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/login_token.py b/ibutsu_client/model/login_token.py index ed2e467..55360e8 100644 --- a/ibutsu_client/model/login_token.py +++ b/ibutsu_client/model/login_token.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class LoginToken(ModelNormal): @@ -54,11 +44,9 @@ class LoginToken(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,26 +79,24 @@ def openapi_types(): and the value is attribute type. """ return { - 'token': (str,), # noqa: E501 + "token": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'token': 'token', # noqa: E501 + "token": "token", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """LoginToken - a model defined in OpenAPI Keyword Args: @@ -134,14 +130,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - token (str): The JWT token returned from a successful login. [optional] # noqa: E501 + token (str): The JWT token returned from a successful login. [optional] """ - _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', ()) + _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) @@ -151,7 +147,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -167,26 +164,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """LoginToken - a model defined in OpenAPI Keyword Args: @@ -220,14 +219,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - token (str): The JWT token returned from a successful login. [optional] # noqa: E501 + token (str): The JWT token returned from a successful login. [optional] """ - _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', ()) + _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: @@ -235,7 +234,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -251,13 +251,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/model_import.py b/ibutsu_client/model/model_import.py index 90f01c5..f57cb1a 100644 --- a/ibutsu_client/model/model_import.py +++ b/ibutsu_client/model/model_import.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class ModelImport(ModelNormal): @@ -54,11 +44,9 @@ class ModelImport(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,34 +79,32 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'status': (str,), # noqa: E501 - 'filename': (str,), # noqa: E501 - 'format': (str,), # noqa: E501 - 'run_id': (str,), # noqa: E501 + "id": (str,), + "status": (str,), + "filename": (str,), + "format": (str,), + "run_id": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'status': 'status', # noqa: E501 - 'filename': 'filename', # noqa: E501 - 'format': 'format', # noqa: E501 - 'run_id': 'run_id', # noqa: E501 + "id": "id", + "status": "status", + "filename": "filename", + "format": "format", + "run_id": "run_id", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ModelImport - a model defined in OpenAPI Keyword Args: @@ -142,18 +138,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The database ID of the import. [optional] # noqa: E501 - status (str): The current status of the import, can be one of \"pending\", \"running\", \"done\". [optional] # noqa: E501 - filename (str): The name of the file that was uploaded. [optional] # noqa: E501 - format (str): The format of the file uploaded. [optional] # noqa: E501 - run_id (str): The ID of the run from the import. [optional] # noqa: E501 + id (str): The database ID of the import. [optional] + status (str): The current status of the import, can be one of \"pending\", \"running\", \"done\". [optional] + filename (str): The name of the file that was uploaded. [optional] + format (str): The format of the file uploaded. [optional] + run_id (str): The ID of the run from the import. [optional] """ - _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', ()) + _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) @@ -163,7 +159,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -179,26 +176,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ModelImport - a model defined in OpenAPI Keyword Args: @@ -232,18 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The database ID of the import. [optional] # noqa: E501 - status (str): The current status of the import, can be one of \"pending\", \"running\", \"done\". [optional] # noqa: E501 - filename (str): The name of the file that was uploaded. [optional] # noqa: E501 - format (str): The format of the file uploaded. [optional] # noqa: E501 - run_id (str): The ID of the run from the import. [optional] # noqa: E501 + id (str): The database ID of the import. [optional] + status (str): The current status of the import, can be one of \"pending\", \"running\", \"done\". [optional] + filename (str): The name of the file that was uploaded. [optional] + format (str): The format of the file uploaded. [optional] + run_id (str): The ID of the run from the import. [optional] """ - _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', ()) + _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: @@ -251,7 +250,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -267,13 +267,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/pagination.py b/ibutsu_client/model/pagination.py index ce9aa56..352fedc 100644 --- a/ibutsu_client/model/pagination.py +++ b/ibutsu_client/model/pagination.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Pagination(ModelNormal): @@ -54,11 +44,9 @@ class Pagination(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,32 +79,30 @@ def openapi_types(): and the value is attribute type. """ return { - 'page': (int,), # noqa: E501 - 'page_size': (int,), # noqa: E501 - 'total_pages': (int,), # noqa: E501 - 'total_items': (int,), # noqa: E501 + "page": (int,), + "page_size": (int,), + "total_pages": (int,), + "total_items": (int,), } @cached_property def discriminator(): return None - attribute_map = { - 'page': 'page', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'total_pages': 'totalPages', # noqa: E501 - 'total_items': 'totalItems', # noqa: E501 + "page": "page", + "page_size": "pageSize", + "total_pages": "totalPages", + "total_items": "totalItems", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Pagination - a model defined in OpenAPI Keyword Args: @@ -140,17 +136,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - page (int): The current page number. [optional] # noqa: E501 - page_size (int): The number of items per page. [optional] # noqa: E501 - total_pages (int): The total number of pages. [optional] # noqa: E501 - total_items (int): The total number of items for this query. [optional] # noqa: E501 + page (int): The current page number. [optional] + page_size (int): The number of items per page. [optional] + total_pages (int): The total number of pages. [optional] + total_items (int): The total number of items for this query. [optional] """ - _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', ()) + _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) @@ -160,7 +156,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -176,26 +173,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Pagination - a model defined in OpenAPI Keyword Args: @@ -229,17 +228,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - page (int): The current page number. [optional] # noqa: E501 - page_size (int): The number of items per page. [optional] # noqa: E501 - total_pages (int): The total number of pages. [optional] # noqa: E501 - total_items (int): The total number of items for this query. [optional] # noqa: E501 + page (int): The current page number. [optional] + page_size (int): The number of items per page. [optional] + total_pages (int): The total number of pages. [optional] + total_items (int): The total number of items for this query. [optional] """ - _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', ()) + _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: @@ -247,7 +246,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +263,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/project.py b/ibutsu_client/model/project.py index 0367d10..181a243 100644 --- a/ibutsu_client/model/project.py +++ b/ibutsu_client/model/project.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Project(ModelNormal): @@ -54,11 +44,9 @@ class Project(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,34 +79,38 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'owner_id': (str, none_type,), # noqa: E501 - 'group_id': (str, none_type,), # noqa: E501 + "id": (str,), + "name": (str,), + "title": (str,), + "owner_id": ( + str, + none_type, + ), + "group_id": ( + str, + none_type, + ), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'title': 'title', # noqa: E501 - 'owner_id': 'owner_id', # noqa: E501 - 'group_id': 'group_id', # noqa: E501 + "id": "id", + "name": "name", + "title": "title", + "owner_id": "owner_id", + "group_id": "group_id", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Project - a model defined in OpenAPI Keyword Args: @@ -142,18 +144,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the project. [optional] # noqa: E501 - name (str): The machine name of the project. [optional] # noqa: E501 - title (str): The human-readable title of the project. [optional] # noqa: E501 - owner_id (str, none_type): The ID of the owner of this project. [optional] # noqa: E501 - group_id (str, none_type): The ID of the group of this project. [optional] # noqa: E501 + id (str): Unique ID of the project. [optional] + name (str): The machine name of the project. [optional] + title (str): The human-readable title of the project. [optional] + owner_id (str, none_type): The ID of the owner of this project. [optional] + group_id (str, none_type): The ID of the group of this project. [optional] """ - _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', ()) + _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) @@ -163,7 +165,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -179,26 +182,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Project - a model defined in OpenAPI Keyword Args: @@ -232,18 +237,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the project. [optional] # noqa: E501 - name (str): The machine name of the project. [optional] # noqa: E501 - title (str): The human-readable title of the project. [optional] # noqa: E501 - owner_id (str, none_type): The ID of the owner of this project. [optional] # noqa: E501 - group_id (str, none_type): The ID of the group of this project. [optional] # noqa: E501 + id (str): Unique ID of the project. [optional] + name (str): The machine name of the project. [optional] + title (str): The human-readable title of the project. [optional] + owner_id (str, none_type): The ID of the owner of this project. [optional] + group_id (str, none_type): The ID of the group of this project. [optional] """ - _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', ()) + _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: @@ -251,7 +256,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -267,13 +273,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/project_list.py b/ibutsu_client/model/project_list.py index 30ecb2b..ae071d3 100644 --- a/ibutsu_client/model/project_list.py +++ b/ibutsu_client/model/project_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.project import Project - globals()['Pagination'] = Pagination - globals()['Project'] = Project + + globals()["Pagination"] = Pagination + globals()["Project"] = Project class ProjectList(ModelNormal): @@ -60,11 +52,9 @@ class ProjectList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'projects': ([Project],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "projects": ([Project],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'projects': 'projects', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "projects": "projects", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ProjectList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - projects ([Project]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + projects ([Project]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ProjectList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - projects ([Project]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + projects ([Project]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/report.py b/ibutsu_client/model/report.py index 146e1e9..c0611cc 100644 --- a/ibutsu_client/model/report.py +++ b/ibutsu_client/model/report.py @@ -1,37 +1,29 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.report_parameters import ReportParameters - globals()['ReportParameters'] = ReportParameters + + globals()["ReportParameters"] = ReportParameters class Report(ModelNormal): @@ -58,11 +50,9 @@ class Report(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -71,7 +61,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -87,40 +87,38 @@ def openapi_types(): """ lazy_import() return { - 'id': (str,), # noqa: E501 - 'filename': (str,), # noqa: E501 - 'mimetype': (str,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'download_url': (str,), # noqa: E501 - 'view_url': (str,), # noqa: E501 - 'parameters': (ReportParameters,), # noqa: E501 - 'status': (str,), # noqa: E501 + "id": (str,), + "filename": (str,), + "mimetype": (str,), + "url": (str,), + "download_url": (str,), + "view_url": (str,), + "parameters": (ReportParameters,), + "status": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'filename': 'filename', # noqa: E501 - 'mimetype': 'mimetype', # noqa: E501 - 'url': 'url', # noqa: E501 - 'download_url': 'download_url', # noqa: E501 - 'view_url': 'view_url', # noqa: E501 - 'parameters': 'parameters', # noqa: E501 - 'status': 'status', # noqa: E501 + "id": "id", + "filename": "filename", + "mimetype": "mimetype", + "url": "url", + "download_url": "download_url", + "view_url": "view_url", + "parameters": "parameters", + "status": "status", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Report - a model defined in OpenAPI Keyword Args: @@ -154,21 +152,21 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the report. [optional] # noqa: E501 - filename (str): The filename of the report. [optional] # noqa: E501 - mimetype (str): The mime type of the downloadable file. [optional] # noqa: E501 - url (str): The URL to the downloadable report (deprecated). [optional] # noqa: E501 - download_url (str): The URL to the downloadable report. [optional] # noqa: E501 - view_url (str): The URL to the viewable report. [optional] # noqa: E501 - parameters (ReportParameters): [optional] # noqa: E501 - status (str): The status of the report, one of \"pending\", \"running\", \"done\". [optional] # noqa: E501 + id (str): Unique ID of the report. [optional] + filename (str): The filename of the report. [optional] + mimetype (str): The mime type of the downloadable file. [optional] + url (str): The URL to the downloadable report (deprecated). [optional] + download_url (str): The URL to the downloadable report. [optional] + view_url (str): The URL to the viewable report. [optional] + parameters (ReportParameters): [optional] + status (str): The status of the report, one of \"pending\", \"running\", \"done\". [optional] """ - _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', ()) + _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) @@ -178,7 +176,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -194,26 +193,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Report - a model defined in OpenAPI Keyword Args: @@ -247,21 +248,21 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the report. [optional] # noqa: E501 - filename (str): The filename of the report. [optional] # noqa: E501 - mimetype (str): The mime type of the downloadable file. [optional] # noqa: E501 - url (str): The URL to the downloadable report (deprecated). [optional] # noqa: E501 - download_url (str): The URL to the downloadable report. [optional] # noqa: E501 - view_url (str): The URL to the viewable report. [optional] # noqa: E501 - parameters (ReportParameters): [optional] # noqa: E501 - status (str): The status of the report, one of \"pending\", \"running\", \"done\". [optional] # noqa: E501 + id (str): Unique ID of the report. [optional] + filename (str): The filename of the report. [optional] + mimetype (str): The mime type of the downloadable file. [optional] + url (str): The URL to the downloadable report (deprecated). [optional] + download_url (str): The URL to the downloadable report. [optional] + view_url (str): The URL to the viewable report. [optional] + parameters (ReportParameters): [optional] + status (str): The status of the report, one of \"pending\", \"running\", \"done\". [optional] """ - _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', ()) + _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: @@ -269,7 +270,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -285,13 +287,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/report_list.py b/ibutsu_client/model/report_list.py index b27e9a1..3ffbc51 100644 --- a/ibutsu_client/model/report_list.py +++ b/ibutsu_client/model/report_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.report import Report - globals()['Pagination'] = Pagination - globals()['Report'] = Report + + globals()["Pagination"] = Pagination + globals()["Report"] = Report class ReportList(ModelNormal): @@ -60,11 +52,9 @@ class ReportList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'reports': ([Report],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "reports": ([Report],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'reports': 'reports', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "reports": "reports", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ReportList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reports ([Report]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + reports ([Report]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ReportList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reports ([Report]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + reports ([Report]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/report_parameters.py b/ibutsu_client/model/report_parameters.py index 5e39215..d5f1af6 100644 --- a/ibutsu_client/model/report_parameters.py +++ b/ibutsu_client/model/report_parameters.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class ReportParameters(ModelNormal): @@ -54,11 +44,9 @@ class ReportParameters(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,30 +79,28 @@ def openapi_types(): and the value is attribute type. """ return { - 'type': (str,), # noqa: E501 - 'filter': (str,), # noqa: E501 - 'source': (str,), # noqa: E501 + "type": (str,), + "filter": (str,), + "source": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'type': 'type', # noqa: E501 - 'filter': 'filter', # noqa: E501 - 'source': 'source', # noqa: E501 + "type": "type", + "filter": "filter", + "source": "source", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ReportParameters - a model defined in OpenAPI Keyword Args: @@ -138,16 +134,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): The type of report to generate. [optional] # noqa: E501 - filter (str): A regular expression to filter test results by. [optional] # noqa: E501 - source (str): The source of the test results. [optional] # noqa: E501 + type (str): The type of report to generate. [optional] + filter (str): A regular expression to filter test results by. [optional] + source (str): The source of the test results. [optional] """ - _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', ()) + _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) @@ -157,7 +153,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -173,26 +170,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ReportParameters - a model defined in OpenAPI Keyword Args: @@ -226,16 +225,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): The type of report to generate. [optional] # noqa: E501 - filter (str): A regular expression to filter test results by. [optional] # noqa: E501 - source (str): The source of the test results. [optional] # noqa: E501 + type (str): The type of report to generate. [optional] + filter (str): A regular expression to filter test results by. [optional] + source (str): The source of the test results. [optional] """ - _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', ()) + _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: @@ -243,7 +242,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -259,13 +259,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/result.py b/ibutsu_client/model/result.py index 6398b66..fde2bd7 100644 --- a/ibutsu_client/model/result.py +++ b/ibutsu_client/model/result.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Result(ModelNormal): @@ -55,20 +45,19 @@ class Result(ModelNormal): """ allowed_values = { - ('result',): { - 'PASSED': "passed", - 'FAILED': "failed", - 'ERROR': "error", - 'SKIPPED': "skipped", - 'XPASSED': "xpassed", - 'XFAILED': "xfailed", - 'MANUAL': "manual", - 'BLOCKED': "blocked", + ("result",): { + "PASSED": "passed", + "FAILED": "failed", + "ERROR": "error", + "SKIPPED": "skipped", + "XPASSED": "xpassed", + "XFAILED": "xfailed", + "MANUAL": "manual", + "BLOCKED": "blocked", }, } - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -76,7 +65,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -91,48 +90,58 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'test_id': (str,), # noqa: E501 - 'start_time': (str,), # noqa: E501 - 'duration': (float,), # noqa: E501 - 'result': (str,), # noqa: E501 - 'component': (str, none_type,), # noqa: E501 - 'env': (str, none_type,), # noqa: E501 - 'run_id': (str, none_type,), # noqa: E501 - 'project_id': (str, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'source': (str,), # noqa: E501 + "id": (str,), + "test_id": (str,), + "start_time": (str,), + "duration": (float,), + "result": (str,), + "component": ( + str, + none_type, + ), + "env": ( + str, + none_type, + ), + "run_id": ( + str, + none_type, + ), + "project_id": ( + str, + none_type, + ), + "metadata": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "params": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "source": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'test_id': 'test_id', # noqa: E501 - 'start_time': 'start_time', # noqa: E501 - 'duration': 'duration', # noqa: E501 - 'result': 'result', # noqa: E501 - 'component': 'component', # noqa: E501 - 'env': 'env', # noqa: E501 - 'run_id': 'run_id', # noqa: E501 - 'project_id': 'project_id', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'params': 'params', # noqa: E501 - 'source': 'source', # noqa: E501 + "id": "id", + "test_id": "test_id", + "start_time": "start_time", + "duration": "duration", + "result": "result", + "component": "component", + "env": "env", + "run_id": "run_id", + "project_id": "project_id", + "metadata": "metadata", + "params": "params", + "source": "source", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Result - a model defined in OpenAPI Keyword Args: @@ -166,25 +175,25 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the test result. [optional] # noqa: E501 - test_id (str): Unique id. [optional] # noqa: E501 - start_time (str): Timestamp of starttime.. [optional] # noqa: E501 - duration (float): Duration of test in seconds.. [optional] # noqa: E501 - result (str): Status of result.. [optional] # noqa: E501 - component (str, none_type): A component. [optional] # noqa: E501 - env (str, none_type): The environment which is being tested. [optional] # noqa: E501 - run_id (str, none_type): The run this result is associated with. [optional] # noqa: E501 - project_id (str, none_type): The project this run is associated with. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - source (str): Where the data came from (useful for filtering). [optional] # noqa: E501 + id (str): Unique ID of the test result. [optional] + test_id (str): Unique id. [optional] + start_time (str): Timestamp of starttime.. [optional] + duration (float): Duration of test in seconds.. [optional] + result (str): Status of result.. [optional] + component (str, none_type): A component. [optional] + env (str, none_type): The environment which is being tested. [optional] + run_id (str, none_type): The run this result is associated with. [optional] + project_id (str, none_type): The project this run is associated with. [optional] + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] + params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] + source (str): Where the data came from (useful for filtering). [optional] """ - _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', ()) + _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) @@ -194,7 +203,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -210,26 +220,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Result - a model defined in OpenAPI Keyword Args: @@ -263,25 +275,25 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the test result. [optional] # noqa: E501 - test_id (str): Unique id. [optional] # noqa: E501 - start_time (str): Timestamp of starttime.. [optional] # noqa: E501 - duration (float): Duration of test in seconds.. [optional] # noqa: E501 - result (str): Status of result.. [optional] # noqa: E501 - component (str, none_type): A component. [optional] # noqa: E501 - env (str, none_type): The environment which is being tested. [optional] # noqa: E501 - run_id (str, none_type): The run this result is associated with. [optional] # noqa: E501 - project_id (str, none_type): The project this run is associated with. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - source (str): Where the data came from (useful for filtering). [optional] # noqa: E501 + id (str): Unique ID of the test result. [optional] + test_id (str): Unique id. [optional] + start_time (str): Timestamp of starttime.. [optional] + duration (float): Duration of test in seconds.. [optional] + result (str): Status of result.. [optional] + component (str, none_type): A component. [optional] + env (str, none_type): The environment which is being tested. [optional] + run_id (str, none_type): The run this result is associated with. [optional] + project_id (str, none_type): The project this run is associated with. [optional] + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] + params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] + source (str): Where the data came from (useful for filtering). [optional] """ - _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', ()) + _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: @@ -289,7 +301,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -305,13 +318,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/result_list.py b/ibutsu_client/model/result_list.py index b637942..850fc5c 100644 --- a/ibutsu_client/model/result_list.py +++ b/ibutsu_client/model/result_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.result import Result - globals()['Pagination'] = Pagination - globals()['Result'] = Result + + globals()["Pagination"] = Pagination + globals()["Result"] = Result class ResultList(ModelNormal): @@ -60,11 +52,9 @@ class ResultList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'results': ([Result],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "results": ([Result],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'results': 'results', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "results": "results", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """ResultList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - results ([Result]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + results ([Result]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """ResultList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - results ([Result]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + results ([Result]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/run.py b/ibutsu_client/model/run.py index 3dc1623..e9cc467 100644 --- a/ibutsu_client/model/run.py +++ b/ibutsu_client/model/run.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Run(ModelNormal): @@ -54,11 +44,9 @@ class Run(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,44 +79,57 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'created': (str,), # noqa: E501 - 'duration': (float,), # noqa: E501 - 'source': (str, none_type,), # noqa: E501 - 'start_time': (str,), # noqa: E501 - 'component': (str, none_type,), # noqa: E501 - 'env': (str, none_type,), # noqa: E501 - 'project_id': (str, none_type,), # noqa: E501 - 'summary': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + "id": (str,), + "created": (str,), + "duration": (float,), + "source": ( + str, + none_type, + ), + "start_time": (str,), + "component": ( + str, + none_type, + ), + "env": ( + str, + none_type, + ), + "project_id": ( + str, + none_type, + ), + "summary": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'created': 'created', # noqa: E501 - 'duration': 'duration', # noqa: E501 - 'source': 'source', # noqa: E501 - 'start_time': 'start_time', # noqa: E501 - 'component': 'component', # noqa: E501 - 'env': 'env', # noqa: E501 - 'project_id': 'project_id', # noqa: E501 - 'summary': 'summary', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 + "id": "id", + "created": "created", + "duration": "duration", + "source": "source", + "start_time": "start_time", + "component": "component", + "env": "env", + "project_id": "project_id", + "summary": "summary", + "metadata": "metadata", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """Run - a model defined in OpenAPI Keyword Args: @@ -152,23 +163,23 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the test run. [optional] # noqa: E501 - created (str): The time this record was created. [optional] # noqa: E501 - duration (float): Duration of tests in seconds. [optional] # noqa: E501 - source (str, none_type): A source for this test run. [optional] # noqa: E501 - start_time (str): The time the test run started. [optional] # noqa: E501 - component (str, none_type): A component. [optional] # noqa: E501 - env (str, none_type): The environment which is being tested. [optional] # noqa: E501 - project_id (str, none_type): The project this run is associated with. [optional] # noqa: E501 - summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A summary of the test results. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Extra metadata for this run. [optional] # noqa: E501 + id (str): Unique ID of the test run. [optional] + created (str): The time this record was created. [optional] + duration (float): Duration of tests in seconds. [optional] + source (str, none_type): A source for this test run. [optional] + start_time (str): The time the test run started. [optional] + component (str, none_type): A component. [optional] + env (str, none_type): The environment which is being tested. [optional] + project_id (str, none_type): The project this run is associated with. [optional] + summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A summary of the test results. [optional] + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Extra metadata for this run. [optional] """ - _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', ()) + _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) @@ -178,7 +189,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -194,26 +206,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """Run - a model defined in OpenAPI Keyword Args: @@ -247,23 +261,23 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): Unique ID of the test run. [optional] # noqa: E501 - created (str): The time this record was created. [optional] # noqa: E501 - duration (float): Duration of tests in seconds. [optional] # noqa: E501 - source (str, none_type): A source for this test run. [optional] # noqa: E501 - start_time (str): The time the test run started. [optional] # noqa: E501 - component (str, none_type): A component. [optional] # noqa: E501 - env (str, none_type): The environment which is being tested. [optional] # noqa: E501 - project_id (str, none_type): The project this run is associated with. [optional] # noqa: E501 - summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A summary of the test results. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Extra metadata for this run. [optional] # noqa: E501 + id (str): Unique ID of the test run. [optional] + created (str): The time this record was created. [optional] + duration (float): Duration of tests in seconds. [optional] + source (str, none_type): A source for this test run. [optional] + start_time (str): The time the test run started. [optional] + component (str, none_type): A component. [optional] + env (str, none_type): The environment which is being tested. [optional] + project_id (str, none_type): The project this run is associated with. [optional] + summary ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A summary of the test results. [optional] + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Extra metadata for this run. [optional] """ - _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', ()) + _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: @@ -271,7 +285,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -287,13 +302,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/run_list.py b/ibutsu_client/model/run_list.py index 3d66366..0ed1776 100644 --- a/ibutsu_client/model/run_list.py +++ b/ibutsu_client/model/run_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.run import Run - globals()['Pagination'] = Pagination - globals()['Run'] = Run + + globals()["Pagination"] = Pagination + globals()["Run"] = Run class RunList(ModelNormal): @@ -60,11 +52,9 @@ class RunList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'runs': ([Run],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "runs": ([Run],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'runs': 'runs', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "runs": "runs", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """RunList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - runs ([Run]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + runs ([Run]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """RunList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - runs ([Run]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + runs ([Run]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/token.py b/ibutsu_client/model/token.py index 56d8a35..d6a2fa0 100644 --- a/ibutsu_client/model/token.py +++ b/ibutsu_client/model/token.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class Token(ModelNormal): @@ -54,11 +44,9 @@ class Token(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,34 +79,35 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'token': (str,), # noqa: E501 - 'expires': (str, none_type,), # noqa: E501 + "id": (str,), + "user_id": (str,), + "name": (str,), + "token": (str,), + "expires": ( + str, + none_type, + ), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'user_id': 'user_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'token': 'token', # noqa: E501 - 'expires': 'expires', # noqa: E501 + "id": "id", + "user_id": "user_id", + "name": "name", + "token": "token", + "expires": "expires", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, user_id, name, token, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, id, user_id, name, token, *args, **kwargs): """Token - a model defined in OpenAPI Args: @@ -148,14 +147,14 @@ def _from_openapi_data(cls, id, user_id, name, token, *args, **kwargs): # noqa: Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - expires (str, none_type): The date and time when this token expires. [optional] # noqa: E501 + expires (str, none_type): The date and time when this token expires. [optional] """ - _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', ()) + _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) @@ -165,7 +164,8 @@ def _from_openapi_data(cls, id, user_id, name, token, *args, **kwargs): # noqa: kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -185,26 +185,28 @@ def _from_openapi_data(cls, id, user_id, name, token, *args, **kwargs): # noqa: self.name = name self.token = token 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, id, user_id, name, token, *args, **kwargs): # noqa: E501 + def __init__(self, id, user_id, name, token, *args, **kwargs): """Token - a model defined in OpenAPI Args: @@ -244,14 +246,14 @@ def __init__(self, id, user_id, name, token, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - expires (str, none_type): The date and time when this token expires. [optional] # noqa: E501 + expires (str, none_type): The date and time when this token expires. [optional] """ - _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', ()) + _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: @@ -259,7 +261,8 @@ def __init__(self, id, user_id, name, token, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -279,13 +282,17 @@ def __init__(self, id, user_id, name, token, *args, **kwargs): # noqa: E501 self.name = name self.token = token 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: + 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.") + 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/ibutsu_client/model/token_list.py b/ibutsu_client/model/token_list.py index cc1e4e2..99e0d8a 100644 --- a/ibutsu_client/model/token_list.py +++ b/ibutsu_client/model/token_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.token import Token - globals()['Pagination'] = Pagination - globals()['Token'] = Token + + globals()["Pagination"] = Pagination + globals()["Token"] = Token class TokenList(ModelNormal): @@ -60,11 +52,9 @@ class TokenList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'tokens': ([Token],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "tokens": ([Token],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'tokens': 'tokens', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "tokens": "tokens", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """TokenList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - tokens ([Token]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + tokens ([Token]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """TokenList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - tokens ([Token]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + tokens ([Token]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/update_run.py b/ibutsu_client/model/update_run.py index dd9cf2d..f7637e1 100644 --- a/ibutsu_client/model/update_run.py +++ b/ibutsu_client/model/update_run.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class UpdateRun(ModelNormal): @@ -54,11 +44,9 @@ class UpdateRun(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,26 +79,24 @@ def openapi_types(): and the value is attribute type. """ return { - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "metadata": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), } @cached_property def discriminator(): return None - attribute_map = { - 'metadata': 'metadata', # noqa: E501 + "metadata": "metadata", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """UpdateRun - a model defined in OpenAPI Keyword Args: @@ -134,14 +130,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra data for this run. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra data for this run. [optional] """ - _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', ()) + _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) @@ -151,7 +147,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -167,26 +164,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """UpdateRun - a model defined in OpenAPI Keyword Args: @@ -220,14 +219,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra data for this run. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra data for this run. [optional] """ - _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', ()) + _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: @@ -235,7 +234,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -251,13 +251,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/user.py b/ibutsu_client/model/user.py index 290790a..ae5759c 100644 --- a/ibutsu_client/model/user.py +++ b/ibutsu_client/model/user.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class User(ModelNormal): @@ -54,11 +44,9 @@ class User(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,36 +79,40 @@ def openapi_types(): and the value is attribute type. """ return { - 'email': (str,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'name': (str, none_type,), # noqa: E501 - 'is_superadmin': (bool,), # noqa: E501 - 'is_active': (bool,), # noqa: E501 - 'group_id': (str, none_type,), # noqa: E501 + "email": (str,), + "id": (str,), + "name": ( + str, + none_type, + ), + "is_superadmin": (bool,), + "is_active": (bool,), + "group_id": ( + str, + none_type, + ), } @cached_property def discriminator(): return None - attribute_map = { - 'email': 'email', # noqa: E501 - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'is_superadmin': 'is_superadmin', # noqa: E501 - 'is_active': 'is_active', # noqa: E501 - 'group_id': 'group_id', # noqa: E501 + "email": "email", + "id": "id", + "name": "name", + "is_superadmin": "is_superadmin", + "is_active": "is_active", + "group_id": "group_id", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, email, *args, **kwargs): """User - a model defined in OpenAPI Args: @@ -147,18 +149,18 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The ID of the user. [optional] # noqa: E501 - name (str, none_type): The user's name. [optional] # noqa: E501 - is_superadmin (bool): Flag to show if a user is a super-admin. [optional] # noqa: E501 - is_active (bool): Flag to show if the user is active. [optional] # noqa: E501 - group_id (str, none_type): The ID of the group of this project. [optional] # noqa: E501 + id (str): The ID of the user. [optional] + name (str, none_type): The user's name. [optional] + is_superadmin (bool): Flag to show if a user is a super-admin. [optional] + is_active (bool): Flag to show if the user is active. [optional] + group_id (str, none_type): The ID of the group of this project. [optional] """ - _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', ()) + _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) @@ -168,7 +170,8 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -185,26 +188,28 @@ def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 self.email = email 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: + 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', - ]) + required_properties = { + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + } @convert_js_args_to_python_args - def __init__(self, email, *args, **kwargs): # noqa: E501 + def __init__(self, email, *args, **kwargs): """User - a model defined in OpenAPI Args: @@ -241,18 +246,18 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The ID of the user. [optional] # noqa: E501 - name (str, none_type): The user's name. [optional] # noqa: E501 - is_superadmin (bool): Flag to show if a user is a super-admin. [optional] # noqa: E501 - is_active (bool): Flag to show if the user is active. [optional] # noqa: E501 - group_id (str, none_type): The ID of the group of this project. [optional] # noqa: E501 + id (str): The ID of the user. [optional] + name (str, none_type): The user's name. [optional] + is_superadmin (bool): Flag to show if a user is a super-admin. [optional] + is_active (bool): Flag to show if the user is active. [optional] + group_id (str, none_type): The ID of the group of this project. [optional] """ - _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', ()) + _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: @@ -260,7 +265,8 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -277,13 +283,17 @@ def __init__(self, email, *args, **kwargs): # noqa: E501 self.email = email 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: + 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.") + 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/ibutsu_client/model/user_list.py b/ibutsu_client/model/user_list.py index 094cd41..90406b5 100644 --- a/ibutsu_client/model/user_list.py +++ b/ibutsu_client/model/user_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.user import User - globals()['Pagination'] = Pagination - globals()['User'] = User + + globals()["Pagination"] = Pagination + globals()["User"] = User class UserList(ModelNormal): @@ -60,11 +52,9 @@ class UserList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'users': ([User],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "users": ([User],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'users': 'users', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "users": "users", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """UserList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - users ([User]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + users ([User]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """UserList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - users ([User]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + users ([User]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/widget_config.py b/ibutsu_client/model/widget_config.py index 3e24634..6e7cc4d 100644 --- a/ibutsu_client/model/widget_config.py +++ b/ibutsu_client/model/widget_config.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class WidgetConfig(ModelNormal): @@ -54,11 +44,9 @@ class WidgetConfig(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,38 +79,36 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'widget': (str,), # noqa: E501 - 'project_id': (str,), # noqa: E501 - 'weight': (int,), # noqa: E501 - 'params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'title': (str,), # noqa: E501 + "id": (str,), + "type": (str,), + "widget": (str,), + "project_id": (str,), + "weight": (int,), + "params": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + "title": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'widget': 'widget', # noqa: E501 - 'project_id': 'project_id', # noqa: E501 - 'weight': 'weight', # noqa: E501 - 'params': 'params', # noqa: E501 - 'title': 'title', # noqa: E501 + "id": "id", + "type": "type", + "widget": "widget", + "project_id": "project_id", + "weight": "weight", + "params": "params", + "title": "title", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """WidgetConfig - a model defined in OpenAPI Keyword Args: @@ -146,20 +142,20 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The internal ID of the WidgetConfig. [optional] # noqa: E501 - type (str): The type of widget, one of either \"widget\" or \"view\". [optional] # noqa: E501 - widget (str): The widget to render, from the list at /widget/types. [optional] # noqa: E501 - project_id (str): The project ID for which the widget is designed. [optional] # noqa: E501 - weight (int): The weighting for the widget, lower weight means it will display first. [optional] # noqa: E501 - params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A dictionary of parameters to send to the widget. [optional] # noqa: E501 - title (str): The title shown on the widget or page. [optional] # noqa: E501 + id (str): The internal ID of the WidgetConfig. [optional] + type (str): The type of widget, one of either \"widget\" or \"view\". [optional] + widget (str): The widget to render, from the list at /widget/types. [optional] + project_id (str): The project ID for which the widget is designed. [optional] + weight (int): The weighting for the widget, lower weight means it will display first. [optional] + params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A dictionary of parameters to send to the widget. [optional] + title (str): The title shown on the widget or page. [optional] """ - _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', ()) + _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) @@ -169,7 +165,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -185,26 +182,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """WidgetConfig - a model defined in OpenAPI Keyword Args: @@ -238,20 +237,20 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The internal ID of the WidgetConfig. [optional] # noqa: E501 - type (str): The type of widget, one of either \"widget\" or \"view\". [optional] # noqa: E501 - widget (str): The widget to render, from the list at /widget/types. [optional] # noqa: E501 - project_id (str): The project ID for which the widget is designed. [optional] # noqa: E501 - weight (int): The weighting for the widget, lower weight means it will display first. [optional] # noqa: E501 - params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A dictionary of parameters to send to the widget. [optional] # noqa: E501 - title (str): The title shown on the widget or page. [optional] # noqa: E501 + id (str): The internal ID of the WidgetConfig. [optional] + type (str): The type of widget, one of either \"widget\" or \"view\". [optional] + widget (str): The widget to render, from the list at /widget/types. [optional] + project_id (str): The project ID for which the widget is designed. [optional] + weight (int): The weighting for the widget, lower weight means it will display first. [optional] + params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A dictionary of parameters to send to the widget. [optional] + title (str): The title shown on the widget or page. [optional] """ - _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', ()) + _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: @@ -259,7 +258,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -275,13 +275,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/widget_config_list.py b/ibutsu_client/model/widget_config_list.py index d6091bf..a38d303 100644 --- a/ibutsu_client/model/widget_config_list.py +++ b/ibutsu_client/model/widget_config_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.widget_config import WidgetConfig - globals()['Pagination'] = Pagination - globals()['WidgetConfig'] = WidgetConfig + + globals()["Pagination"] = Pagination + globals()["WidgetConfig"] = WidgetConfig class WidgetConfigList(ModelNormal): @@ -60,11 +52,9 @@ class WidgetConfigList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'widgets': ([WidgetConfig],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "widgets": ([WidgetConfig],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'widgets': 'widgets', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "widgets": "widgets", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """WidgetConfigList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - widgets ([WidgetConfig]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + widgets ([WidgetConfig]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """WidgetConfigList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - widgets ([WidgetConfig]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + widgets ([WidgetConfig]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/widget_param.py b/ibutsu_client/model/widget_param.py index 2a7ad20..1c09c59 100644 --- a/ibutsu_client/model/widget_param.py +++ b/ibutsu_client/model/widget_param.py @@ -1,33 +1,23 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError - class WidgetParam(ModelNormal): @@ -54,11 +44,9 @@ class WidgetParam(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -66,7 +54,17 @@ 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 """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -81,30 +79,28 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 + "name": (str,), + "description": (str,), + "type": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'description': 'description', # noqa: E501 - 'type': 'type', # noqa: E501 + "name": "name", + "description": "description", + "type": "type", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """WidgetParam - a model defined in OpenAPI Keyword Args: @@ -138,16 +134,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The name of the parameter to supply to the widget. [optional] # noqa: E501 - description (str): A friendly description of the parameter. [optional] # noqa: E501 - type (str): The type of parameter (string, integer, etc). [optional] # noqa: E501 + name (str): The name of the parameter to supply to the widget. [optional] + description (str): A friendly description of the parameter. [optional] + type (str): The type of parameter (string, integer, etc). [optional] """ - _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', ()) + _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) @@ -157,7 +153,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -173,26 +170,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """WidgetParam - a model defined in OpenAPI Keyword Args: @@ -226,16 +225,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The name of the parameter to supply to the widget. [optional] # noqa: E501 - description (str): A friendly description of the parameter. [optional] # noqa: E501 - type (str): The type of parameter (string, integer, etc). [optional] # noqa: E501 + name (str): The name of the parameter to supply to the widget. [optional] + description (str): A friendly description of the parameter. [optional] + type (str): The type of parameter (string, integer, etc). [optional] """ - _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', ()) + _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: @@ -243,7 +242,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -259,13 +259,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/widget_type.py b/ibutsu_client/model/widget_type.py index 44af1be..0d6b450 100644 --- a/ibutsu_client/model/widget_type.py +++ b/ibutsu_client/model/widget_type.py @@ -1,37 +1,29 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.widget_param import WidgetParam - globals()['WidgetParam'] = WidgetParam + + globals()["WidgetParam"] = WidgetParam class WidgetType(ModelNormal): @@ -58,11 +50,9 @@ class WidgetType(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -71,7 +61,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -87,34 +87,32 @@ def openapi_types(): """ lazy_import() return { - 'id': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'params': ([WidgetParam],), # noqa: E501 - 'type': (str,), # noqa: E501 + "id": (str,), + "title": (str,), + "description": (str,), + "params": ([WidgetParam],), + "type": (str,), } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'params': 'params', # noqa: E501 - 'type': 'type', # noqa: E501 + "id": "id", + "title": "title", + "description": "description", + "params": "params", + "type": "type", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """WidgetType - a model defined in OpenAPI Keyword Args: @@ -148,18 +146,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): A unique identifier for this widget type. [optional] # noqa: E501 - title (str): The title of the widget, for users to see. [optional] # noqa: E501 - description (str): A helpful description of this widget type. [optional] # noqa: E501 - params ([WidgetParam]): A dictionary or map of parameters to values. [optional] # noqa: E501 - type (str): The type of widget (widget, view). [optional] # noqa: E501 + id (str): A unique identifier for this widget type. [optional] + title (str): The title of the widget, for users to see. [optional] + description (str): A helpful description of this widget type. [optional] + params ([WidgetParam]): A dictionary or map of parameters to values. [optional] + type (str): The type of widget (widget, view). [optional] """ - _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', ()) + _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) @@ -169,7 +167,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -185,26 +184,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """WidgetType - a model defined in OpenAPI Keyword Args: @@ -238,18 +239,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): A unique identifier for this widget type. [optional] # noqa: E501 - title (str): The title of the widget, for users to see. [optional] # noqa: E501 - description (str): A helpful description of this widget type. [optional] # noqa: E501 - params ([WidgetParam]): A dictionary or map of parameters to values. [optional] # noqa: E501 - type (str): The type of widget (widget, view). [optional] # noqa: E501 + id (str): A unique identifier for this widget type. [optional] + title (str): The title of the widget, for users to see. [optional] + description (str): A helpful description of this widget type. [optional] + params ([WidgetParam]): A dictionary or map of parameters to values. [optional] + type (str): The type of widget (widget, view). [optional] """ - _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', ()) + _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: @@ -257,7 +258,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,13 +275,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model/widget_type_list.py b/ibutsu_client/model/widget_type_list.py index d933792..88b93a9 100644 --- a/ibutsu_client/model/widget_type_list.py +++ b/ibutsu_client/model/widget_type_list.py @@ -1,39 +1,31 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import re # noqa: F401 -import sys # noqa: F401 - -from ibutsu_client.model_utils import ( # noqa: F401 +from ibutsu_client.exceptions import ApiAttributeError +from ibutsu_client.model_utils import ( ApiTypeError, - ModelComposed, ModelNormal, - ModelSimple, + OpenApiModel, 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 ibutsu_client.exceptions import ApiAttributeError def lazy_import(): from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.widget_type import WidgetType - globals()['Pagination'] = Pagination - globals()['WidgetType'] = WidgetType + + globals()["Pagination"] = Pagination + globals()["WidgetType"] = WidgetType class WidgetTypeList(ModelNormal): @@ -60,11 +52,9 @@ class WidgetTypeList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -73,7 +63,17 @@ def additional_properties_type(): 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 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) _nullable = False @@ -89,28 +89,26 @@ def openapi_types(): """ lazy_import() return { - 'types': ([WidgetType],), # noqa: E501 - 'pagination': (Pagination,), # noqa: E501 + "types": ([WidgetType],), + "pagination": (Pagination,), } @cached_property def discriminator(): return None - attribute_map = { - 'types': 'types', # noqa: E501 - 'pagination': 'pagination', # noqa: E501 + "types": "types", + "pagination": "pagination", } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): """WidgetTypeList - a model defined in OpenAPI Keyword Args: @@ -144,15 +142,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - types ([WidgetType]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + types ([WidgetType]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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) @@ -162,7 +160,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -178,26 +177,28 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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: + 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', - ]) + required_properties = { + "_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 + def __init__(self, *args, **kwargs): """WidgetTypeList - a model defined in OpenAPI Keyword Args: @@ -231,15 +232,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - types ([WidgetType]): [optional] # noqa: E501 - pagination (Pagination): [optional] # noqa: E501 + types ([WidgetType]): [optional] + pagination (Pagination): [optional] """ - _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', ()) + _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: @@ -247,7 +248,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 kwargs.update(arg) else: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,13 +265,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 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: + 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.") + 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/ibutsu_client/model_utils.py b/ibutsu_client/model_utils.py index 8a4f70f..4c124db 100644 --- a/ibutsu_client/model_utils.py +++ b/ibutsu_client/model_utils.py @@ -1,15 +1,12 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy import inspect import io import os @@ -17,12 +14,14 @@ import re import tempfile import uuid +from copy import deepcopy +from datetime import date, datetime from dateutil.parser import parse from ibutsu_client.exceptions import ( - ApiKeyError, ApiAttributeError, + ApiKeyError, ApiTypeError, ApiValueError, ) @@ -33,6 +32,7 @@ def convert_js_args_to_python_args(fn): from functools import wraps + @wraps(fn) def wrapped_init(_self, *args, **kwargs): """ @@ -40,20 +40,21 @@ def wrapped_init(_self, *args, **kwargs): parameter of a class method. During generation, `self` attributes are mapped to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. """ - spec_property_naming = kwargs.get('_spec_property_naming', False) + spec_property_naming = kwargs.get("_spec_property_naming", False) if spec_property_naming: kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) + kwargs, _self if isinstance(_self, type) else _self.__class__ + ) return fn(_self, *args, **kwargs) + return wrapped_init -class cached_property(object): +class cached_property: # this caches the result of the function call for fn with no inputs # use this as a decorator on function methods that you want converted # into cached properties - result_key = '_results' + result_key = "_results" def __init__(self, fn): self._fn = fn @@ -83,15 +84,12 @@ def allows_single_value_input(cls): - null TODO: lru_cache this """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: return True elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return any(allows_single_value_input(c) for c in cls._composed_schemas["oneOf"]) return False @@ -109,11 +107,11 @@ def composed_model_input_classes(cls): else: return get_discriminated_classes(cls) elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return [] if cls.discriminator is None: input_classes = [] - for c in cls._composed_schemas['oneOf']: + for c in cls._composed_schemas["oneOf"]: input_classes.extend(composed_model_input_classes(c)) return input_classes else: @@ -121,7 +119,7 @@ def composed_model_input_classes(cls): return [] -class OpenApiModel(object): +class OpenApiModel: """The base class for all OpenAPIModels""" def set_attribute(self, name, value): @@ -136,45 +134,33 @@ def set_attribute(self, name, value): required_types_mixed = self.openapi_types[name] elif self.additional_properties_type is None: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item + f"{type(self).__name__} has no attribute '{name}'", path_to_item ) elif self.additional_properties_type is not None: required_types_mixed = self.additional_properties_type if get_simple_class(name) != str: error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True + var_name=name, var_value=name, valid_classes=(str,), key_type=True ) raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True + error_msg, path_to_item=path_to_item, valid_classes=(str,), key_type=True ) if self._check_type: value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), value, - self._configuration + required_types_mixed, + path_to_item, + self._spec_property_naming, + self._check_type, + configuration=self._configuration, ) - self.__dict__['_data_store'][name] = value + if (name,) in self.allowed_values: + check_allowed_values(self.allowed_values, (name,), value) + if (name,) in self.validations: + check_validations(self.validations, (name,), value, self._configuration) + self.__dict__["_data_store"][name] = value def __repr__(self): """For `print` and `pprint`""" @@ -211,7 +197,6 @@ def __deepcopy__(self, memo): setattr(new_inst, k, deepcopy(v, memo)) return new_inst - def __new__(cls, *args, **kwargs): # this function uses the discriminator to # pick a new schema/class to instantiate because a discriminator @@ -228,11 +213,8 @@ def __new__(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -249,7 +231,7 @@ def __new__(cls, *args, **kwargs): # through Animal's discriminator because we passed in # _visited_composed_classes = (Animal,) - return super(OpenApiModel, cls).__new__(cls) + return super().__new__(cls) # Get the name and value of the discriminator property. # The discriminator name is obtained from the discriminator meta-data @@ -262,28 +244,26 @@ def __new__(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" + % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get("_path_to_item", ()) + disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" + % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -303,21 +283,21 @@ def __new__(cls, *args, **kwargs): # but we know we know that we already have Dog # because it is in visited_composed_classes # so make Animal here - return super(OpenApiModel, cls).__new__(cls) + return super().__new__(cls) # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get( + "oneOf", () + ) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst = super().__new__(cls) self_inst.__init__(*args, **kwargs) if kwargs.get("_spec_property_naming", False): @@ -347,11 +327,8 @@ def _new_from_openapi_data(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -381,28 +358,26 @@ def _new_from_openapi_data(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" + % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get("_path_to_item", ()) + disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" + % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -427,13 +402,13 @@ def _new_from_openapi_data(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get( + "oneOf", () + ) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = cls._from_openapi_data(*args, **kwargs) @@ -459,7 +434,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -467,9 +442,8 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + f"{type(self).__name__} has no attribute '{name}'", + [e for e in [self._path_to_item, name] if e], ) def __contains__(self, name): @@ -477,7 +451,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_str(self): """Returns the string representation of the model""" @@ -488,8 +462,8 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - this_val = self._data_store['value'] - that_val = other._data_store['value'] + this_val = self._data_store["value"] + that_val = other._data_store["value"] types = set() types.add(this_val.__class__) types.add(that_val.__class__) @@ -514,7 +488,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -522,9 +496,8 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + f"{type(self).__name__} has no attribute '{name}'", + [e for e in [self._path_to_item, name] if e], ) def __contains__(self, name): @@ -532,7 +505,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_dict(self): """Returns the model properties as a dict""" @@ -617,9 +590,8 @@ def __setitem__(self, name, value): """ if name not in self.openapi_types: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + f"{type(self).__name__} has no attribute '{name}'", + [e for e in [self._path_to_item, name] if e], ) # attribute must be set on self and composed instances self.set_attribute(name, value) @@ -627,7 +599,7 @@ def __setitem__(self, name, value): setattr(model_instance, name, value) if name not in self._var_name_to_model_instances: # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + self.__dict__["_var_name_to_model_instances"][name] = self._composed_instances + [self] return None __unset_attribute_value__ = object() @@ -657,10 +629,10 @@ def get(self, name, default=None): return values[0] elif len_values > 1: raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " + f"Values stored for property {name} in {type(self).__name__} differ when looking " "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] + "the same", + [e for e in [self._path_to_item, name] if e], ) def __getitem__(self, name): @@ -668,9 +640,8 @@ def __getitem__(self, name): value = self.get(name, self.__unset_attribute_value__) if value is self.__unset_attribute_value__: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + f"{type(self).__name__} has no attribute '{name}'", + [e for e in [self._path_to_item, name] if e], ) return value @@ -681,7 +652,8 @@ def __contains__(self, name): return name in self.__dict__ model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) + name, self._additional_properties_model_instances + ) if model_instances: for model_instance in model_instances: @@ -720,7 +692,7 @@ def __eq__(self, other): ModelComposed: 0, ModelNormal: 1, ModelSimple: 2, - none_type: 3, # The type of 'None'. + none_type: 3, # The type of 'None'. list: 4, dict: 5, float: 6, @@ -729,7 +701,7 @@ def __eq__(self, other): datetime: 9, date: 10, str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. } # these are used to limit what type conversions we try to do @@ -786,7 +758,7 @@ def __eq__(self, other): (str, date), # (int, str), # (float, str), - (str, file_type) + (str, file_type), ), } @@ -843,41 +815,26 @@ def check_allowed_values(allowed_values, input_variable_path, input_values): are checking to see if they are in allowed_values """ these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), + if isinstance(input_values, list) and not set(input_values).issubset( + set(these_allowed_values) + ): + invalid_values = (", ".join(map(str, set(input_values) - set(these_allowed_values))),) raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) + "Invalid values for `%s` [%s], must be a subset of [%s]" + % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) + elif isinstance(input_values, dict) and not set(input_values.keys()).issubset( + set(these_allowed_values) + ): + invalid_values = ", ".join(map(str, set(input_values.keys()) - set(these_allowed_values))) raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) + "Invalid keys in `%s` [%s], must be a subset of [%s]" + % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): + elif not isinstance(input_values, (list, dict)) and input_values not in these_allowed_values: raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) + "Invalid value for `%s` (%s), must be one of %s" + % (input_variable_path[0], input_values, these_allowed_values) ) @@ -891,14 +848,14 @@ def is_json_validation_enabled(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) + return ( + configuration is None + or not hasattr(configuration, "_disabled_client_side_validations") + or schema_keyword not in configuration._disabled_client_side_validations + ) -def check_validations( - validations, input_variable_path, input_values, - configuration=None): +def check_validations(validations, input_variable_path, input_values, configuration=None): """Raises an exception if the input_values are invalid Args: @@ -913,66 +870,60 @@ def check_validations( return current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): + if ( + is_json_validation_enabled("multipleOf", configuration) + and "multiple_of" in current_validations + and isinstance(input_values, (int, float)) + and not (float(input_values) / current_validations["multiple_of"]).is_integer() + ): # Note 'multipleOf' will be as good as the floating point arithmetic. raise ApiValueError( "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) + "`%s`" % (input_variable_path[0], current_validations["multiple_of"]) ) - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): + if ( + is_json_validation_enabled("maxLength", configuration) + and "max_length" in current_validations + and len(input_values) > current_validations["max_length"] + ): raise ApiValueError( "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) + "`%s`" % (input_variable_path[0], current_validations["max_length"]) ) - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): + if ( + is_json_validation_enabled("minLength", configuration) + and "min_length" in current_validations + and len(input_values) < current_validations["min_length"] + ): raise ApiValueError( "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) + "`%s`" % (input_variable_path[0], current_validations["min_length"]) ) - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): + if ( + is_json_validation_enabled("maxItems", configuration) + and "max_items" in current_validations + and len(input_values) > current_validations["max_items"] + ): raise ApiValueError( "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) + "equal to `%s`" % (input_variable_path[0], current_validations["max_items"]) ) - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): + if ( + is_json_validation_enabled("minItems", configuration) + and "min_items" in current_validations + and len(input_values) < current_validations["min_items"] + ): raise ValueError( "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) + "equal to `%s`" % (input_variable_path[0], current_validations["min_items"]) ) - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): + items = ("exclusive_maximum", "inclusive_maximum", "exclusive_minimum", "inclusive_minimum") + if any(item in current_validations for item in items): if isinstance(input_values, list): max_val = max(input_values) min_val = min(input_values) @@ -983,61 +934,59 @@ def check_validations( max_val = input_values min_val = input_values - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): + if ( + is_json_validation_enabled("exclusiveMaximum", configuration) + and "exclusive_maximum" in current_validations + and max_val >= current_validations["exclusive_maximum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value less than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): + if ( + is_json_validation_enabled("maximum", configuration) + and "inclusive_maximum" in current_validations + and max_val > current_validations["inclusive_maximum"] + ): raise ApiValueError( "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) + "`%s`" % (input_variable_path[0], current_validations["inclusive_maximum"]) ) - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): + if ( + is_json_validation_enabled("exclusiveMinimum", configuration) + and "exclusive_minimum" in current_validations + and min_val <= current_validations["exclusive_minimum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value greater than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): + if ( + is_json_validation_enabled("minimum", configuration) + and "inclusive_minimum" in current_validations + and min_val < current_validations["inclusive_minimum"] + ): raise ApiValueError( "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) + "to `%s`" % (input_variable_path[0], current_validations["inclusive_minimum"]) ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + flags = current_validations.get("regex", {}).get("flags", 0) + if ( + is_json_validation_enabled("pattern", configuration) + and "regex" in current_validations + and not re.search(current_validations["regex"]["pattern"], input_values, flags=flags) + ): + err_msg = r"Invalid value for `{}`, must match regular expression `{}`".format( input_variable_path[0], - current_validations['regex']['pattern'] + current_validations["regex"]["pattern"], ) if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) + err_msg = rf"{err_msg} with flags=`{flags}`" raise ApiValueError(err_msg) @@ -1058,28 +1007,25 @@ def index_getter(class_or_instance): return COERCION_INDEX_BY_TYPE[list] elif isinstance(class_or_instance, dict): return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelComposed): return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelNormal): return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelSimple): return COERCION_INDEX_BY_TYPE[ModelSimple] elif class_or_instance in COERCION_INDEX_BY_TYPE: return COERCION_INDEX_BY_TYPE[class_or_instance] raise ApiValueError("Unsupported type: %s" % class_or_instance) sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) + required_types, key=lambda class_or_instance: index_getter(class_or_instance) ) return sorted_types -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): +def remove_uncoercible( + required_types_classes, current_item, spec_property_naming, must_convert=True +): """Only keeps the type conversions that are possible Args: @@ -1118,9 +1064,9 @@ def remove_uncoercible(required_types_classes, current_item, spec_property_namin continue class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: + if ( + must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming] + ) or class_pair in UPCONVERSION_TYPE_PAIRS: results_classes.append(required_type_class) return results_classes @@ -1135,7 +1081,7 @@ def get_discriminated_classes(cls): if is_type_nullable(cls): possible_classes.append(cls) for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + if hasattr(discr_cls, "discriminator") and discr_cls.discriminator is not None: possible_classes.extend(get_discriminated_classes(discr_cls)) else: possible_classes.append(discr_cls) @@ -1147,7 +1093,7 @@ def get_possible_classes(cls, from_server_context): possible_classes = [cls] if from_server_context: return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: + if hasattr(cls, "discriminator") and cls.discriminator is not None: possible_classes = [] possible_classes.extend(get_discriminated_classes(cls)) elif issubclass(cls, ModelComposed): @@ -1203,11 +1149,10 @@ def change_keys_js_to_python(input_dict, model_class): document). """ - if getattr(model_class, 'attribute_map', None) is None: + if getattr(model_class, "attribute_map", None) is None: return input_dict output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} + reversed_attr_map = {value: key for key, value in model_class.attribute_map.items()} for javascript_key, value in input_dict.items(): python_key = reversed_attr_map.get(javascript_key) if python_key is None: @@ -1223,13 +1168,10 @@ def get_type_error(var_value, path_to_item, valid_classes, key_type=False): var_name=path_to_item[-1], var_value=var_value, valid_classes=valid_classes, - key_type=key_type + key_type=key_type, ) return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type + error_msg, path_to_item=path_to_item, valid_classes=valid_classes, key_type=key_type ) @@ -1255,11 +1197,11 @@ def deserialize_primitive(data, klass, path_to_item): # The string should be in iso8601 datetime format. parsed_datetime = parse(data) date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 + parsed_datetime.hour == 0 + and parsed_datetime.minute == 0 + and parsed_datetime.second == 0 + and parsed_datetime.tzinfo is None + and 8 <= len(data) <= 10 ) if date_only: raise ValueError("This is a date, not a datetime") @@ -1273,21 +1215,17 @@ def deserialize_primitive(data, klass, path_to_item): if isinstance(data, str) and klass == float: if str(converted_value) != data: # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') + raise ValueError("This is not a float") return converted_value except (OverflowError, ValueError) as ex: # parse can raise OverflowError raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item + f"{additional_message}Failed to parse {data!r} as {klass.__name__}", + path_to_item=path_to_item, ) from ex -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): +def get_discriminator_class(model_class, discr_name, discr_value, cls_visited): """Returns the child class specified by the discriminator. Args: @@ -1323,22 +1261,25 @@ def get_discriminator_class(model_class, # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig # if we try to make BasquePig from mammal, we need to travel through # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) + descendant_classes = model_class._composed_schemas.get( + "oneOf", () + ) + model_class._composed_schemas.get("anyOf", ()) + ancestor_classes = model_class._composed_schemas.get("allOf", ()) possible_classes = descendant_classes + ancestor_classes for cls in possible_classes: # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: + if hasattr(cls, "discriminator") and cls.discriminator is not None: used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) + cls, discr_name, discr_value, cls_visited + ) if used_model_class is not None: return used_model_class return used_model_class -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): +def deserialize_model( + model_data, model_class, path_to_item, check_type, configuration, spec_property_naming +): """Deserializes model_data to model instance. Args: @@ -1362,10 +1303,12 @@ def deserialize_model(model_data, model_class, path_to_item, check_type, ApiKeyError """ - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) + kw_args = dict( + _check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming, + ) if issubclass(model_class, ModelSimple): return model_class._new_from_openapi_data(model_data, **kw_args) @@ -1401,9 +1344,7 @@ def deserialize_file(response_data, configuration, content_disposition=None): os.remove(path) if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition, flags=re.I) if filename is not None: filename = filename.group(1) else: @@ -1414,16 +1355,23 @@ def deserialize_file(response_data, configuration, content_disposition=None): with open(path, "wb") as f: if isinstance(response_data, str): # change str to bytes so we can write it - response_data = response_data.encode('utf-8') + response_data = response_data.encode("utf-8") f.write(response_data) f = open(path, "rb") return f -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): +def attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=True, +): """ Args: input_value (any): the data to convert @@ -1449,23 +1397,27 @@ def attempt_convert_item(input_value, valid_classes, path_to_item, """ valid_classes_ordered = order_response_types(valid_classes) valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) + valid_classes_ordered, input_value, spec_property_naming + ) if not valid_classes_coercible or key_type: # we do not handle keytype errors, json will take care # of this for us if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) + raise get_type_error(input_value, path_to_item, valid_classes, key_type=key_type) for valid_class in valid_classes_coercible: try: if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) + return deserialize_model( + input_value, + valid_class, + path_to_item, + check_type, + configuration, + spec_property_naming, + ) elif valid_class == file_type: return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) + return deserialize_primitive(input_value, valid_class, path_to_item) except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: if must_convert: raise conversion_exc @@ -1497,10 +1449,10 @@ def is_type_nullable(input_type): return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): + for t in input_type._composed_schemas.get("oneOf", ()): if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): + for t in input_type._composed_schemas.get("anyOf", ()): if is_type_nullable(t): return True return False @@ -1516,13 +1468,22 @@ def is_valid_type(input_class_simple, valid_classes): Returns: bool """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + if issubclass(input_class_simple, OpenApiModel) and valid_classes == ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ): return True valid_type = input_class_simple in valid_classes if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): + issubclass(input_class_simple, OpenApiModel) or input_class_simple is none_type + ): for valid_class in valid_classes: if input_class_simple is none_type and is_type_nullable(valid_class): # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. @@ -1530,17 +1491,21 @@ def is_valid_type(input_class_simple, valid_classes): if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): continue discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) + discriminator_classes = valid_class.discriminator[discr_propertyname_py].values() valid_type = is_valid_type(input_class_simple, discriminator_classes) if valid_type: return True return valid_type -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): +def validate_and_convert_types( + input_value, + required_types_mixed, + path_to_item, + spec_property_naming, + _check_type, + configuration=None, +): """Raises a TypeError is there is a problem, otherwise returns value Args: @@ -1575,9 +1540,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): + if configuration or (input_class_simple == dict and dict not in valid_classes): # if input_value is not valid_type try to convert it converted_instance = attempt_convert_item( input_value, @@ -1587,18 +1550,18 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=True, - check_type=_check_type + check_type=_check_type, ) return converted_instance else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) + raise get_type_error(input_value, path_to_item, valid_classes, key_type=False) # input_value's type is in valid_classes if len(valid_classes) > 1 and configuration: # there are valid classes which are not the current class valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) + valid_classes, input_value, spec_property_naming, must_convert=False + ) if valid_classes_coercible: converted_instance = attempt_convert_item( input_value, @@ -1608,7 +1571,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=False, - check_type=_check_type + check_type=_check_type, ) return converted_instance @@ -1616,9 +1579,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, # all types are of the required types and there are no more inner # variables left to look at return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) + inner_required_types = child_req_types_by_current_type.get(type(input_value)) if inner_required_types is None: # for this type, there are not more inner variables left to look at return input_value @@ -1635,7 +1596,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) elif isinstance(input_value, dict): if input_value == {}: @@ -1645,15 +1606,14 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path = list(path_to_item) inner_path.append(inner_key) if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) + raise get_type_error(inner_key, inner_path, valid_classes, key_type=True) input_value[inner_key] = validate_and_convert_types( inner_val, inner_required_types, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) return input_value @@ -1671,10 +1631,12 @@ def model_to_dict(model_instance, serialize=True): """ result = {} - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item + def extract_item(item): + return ( + (item[0], model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], "_data_store") + else item + ) model_instances = [model_instance] if model_instance._composed_schemas: @@ -1705,21 +1667,15 @@ def extract_item(item): return ( elif isinstance(v, ModelSimple): res.append(v.value) elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) + res.append(dict(map(extract_item, v.items()))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) + result[attr] = dict(map(extract_item, value.items())) elif isinstance(value, ModelSimple): result[attr] = value.value - elif hasattr(value, '_data_store'): + elif hasattr(value, "_data_store"): result[attr] = model_to_dict(value, serialize=serialize) else: result[attr] = value @@ -1737,8 +1693,7 @@ def extract_item(item): return ( return result -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): +def type_error_message(var_value=None, var_name=None, valid_classes=None, key_type=None): """ Keyword Args: var_value (any): the variable which has the type_error @@ -1749,31 +1704,25 @@ def type_error_message(var_value=None, var_name=None, valid_classes=None, True if it is a key in a dict False if our item is an item in a list """ - key_or_value = 'value' + key_or_value = "value" if key_type: - key_or_value = 'key' + key_or_value = "key" valid_classes_phrase = get_valid_classes_phrase(valid_classes) msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) + f"Invalid type for variable '{var_name}'. Required {key_or_value} type {valid_classes_phrase} and " + f"passed type was {type(var_value).__name__}" ) return msg def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ + """Returns a string phrase describing what types are allowed""" all_classes = list(input_classes) all_classes = sorted(all_classes, key=lambda cls: cls.__name__) all_class_names = [cls.__name__ for cls in all_classes] if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) + return f"is {all_class_names[0]}" + return "is one of [{}]".format(", ".join(all_class_names)) def get_allof_instances(self, model_args, constant_args): @@ -1794,10 +1743,9 @@ def get_allof_instances(self, model_args, constant_args): composed_instances (list) """ composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - + for allof_class in self._composed_schemas["allOf"]: try: - if constant_args.get('_spec_property_naming'): + if constant_args.get("_spec_property_naming"): allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) else: allof_instance = allof_class(**model_args, **constant_args) @@ -1806,12 +1754,8 @@ def get_allof_instances(self, model_args, constant_args): raise ApiValueError( "Invalid inputs given to generate an instance of '%s'. The " "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) + "schema '%s'. Error=%s" + % (allof_class.__name__, allof_class.__name__, self.__class__.__name__, str(ex)) ) from ex return composed_instances @@ -1844,13 +1788,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): Returns oneof_instance (instance) """ - if len(cls._composed_schemas['oneOf']) == 0: + if len(cls._composed_schemas["oneOf"]) == 0: return None oneof_instances = [] # Iterate over each oneOf schema and determine if the input data # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: + for oneof_class in cls._composed_schemas["oneOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if oneof_class is none_type: @@ -1862,26 +1806,28 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): try: if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): + if constant_kwargs.get("_spec_property_naming"): oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) + **model_kwargs, **constant_kwargs + ) else: oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) else: if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): + if constant_kwargs.get("_spec_property_naming"): oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) + model_arg, **constant_kwargs + ) else: oneof_instance = oneof_class(model_arg, **constant_kwargs) elif oneof_class in PRIMITIVE_TYPES: oneof_instance = validate_and_convert_types( model_arg, (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] + constant_kwargs["_path_to_item"], + constant_kwargs["_spec_property_naming"], + constant_kwargs["_check_type"], + configuration=constant_kwargs["_configuration"], ) oneof_instances.append(oneof_instance) except Exception: @@ -1889,14 +1835,12 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): if len(oneof_instances) == 0: raise ApiValueError( "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ + "of the oneOf schemas matched the input data." % cls.__name__ ) elif len(oneof_instances) > 1: raise ApiValueError( "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ + "oneOf schemas matched the inputs, but a max of one is allowed." % cls.__name__ ) return oneof_instances[0] @@ -1916,10 +1860,10 @@ def get_anyof_instances(self, model_args, constant_args): anyof_instances (list) """ anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: + if len(self._composed_schemas["anyOf"]) == 0: return anyof_instances - for anyof_class in self._composed_schemas['anyOf']: + for anyof_class in self._composed_schemas["anyOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if anyof_class is none_type: @@ -1928,7 +1872,7 @@ def get_anyof_instances(self, model_args, constant_args): continue try: - if constant_args.get('_spec_property_naming'): + if constant_args.get("_spec_property_naming"): anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) else: anyof_instance = anyof_class(**model_args, **constant_args) @@ -1938,8 +1882,7 @@ def get_anyof_instances(self, model_args, constant_args): if len(anyof_instances) == 0: raise ApiValueError( "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ + "anyOf schemas matched the inputs." % self.__class__.__name__ ) return anyof_instances @@ -1953,7 +1896,7 @@ def get_discarded_args(self, composed_instances, model_args): # arguments passed to self were already converted to python names # before __init__ was called for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: + if instance.__class__ in self._composed_schemas["allOf"]: try: keys = instance.to_dict().keys() discarded_keys = model_args - keys @@ -2047,12 +1990,12 @@ def validate_get_composed_info(constant_args, model_args, self): for prop_name in model_args: if prop_name not in discarded_args: var_name_to_model_instances[prop_name] = [self] + list( - filter( - lambda x: prop_name in x.openapi_types, composed_instances)) + filter(lambda x: prop_name in x.openapi_types, composed_instances) + ) return [ composed_instances, var_name_to_model_instances, additional_properties_model_instances, - discarded_args + discarded_args, ] diff --git a/ibutsu_client/models/__init__.py b/ibutsu_client/models/__init__.py index 7c7a967..af15935 100644 --- a/ibutsu_client/models/__init__.py +++ b/ibutsu_client/models/__init__.py @@ -1,5 +1,3 @@ -# flake8: noqa - # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError @@ -9,6 +7,48 @@ # import sys # sys.setrecursionlimit(n) +__all__ = [ + "AccountRecovery", + "AccountRegistration", + "AccountReset", + "Artifact", + "ArtifactList", + "CreateToken", + "Credentials", + "Dashboard", + "DashboardList", + "GetReportTypes200ResponseInner", + "Group", + "GroupList", + "Health", + "HealthInfo", + "LoginConfig", + "LoginError", + "LoginSupport", + "LoginToken", + "ModelImport", + "Pagination", + "Project", + "ProjectList", + "Report", + "ReportList", + "ReportParameters", + "Result", + "ResultList", + "Run", + "RunList", + "Token", + "TokenList", + "UpdateRun", + "User", + "UserList", + "WidgetConfig", + "WidgetConfigList", + "WidgetParam", + "WidgetType", + "WidgetTypeList", +] + from ibutsu_client.model.account_recovery import AccountRecovery from ibutsu_client.model.account_registration import AccountRegistration from ibutsu_client.model.account_reset import AccountReset diff --git a/ibutsu_client/rest.py b/ibutsu_client/rest.py index 06659b7..c17967a 100644 --- a/ibutsu_client/rest.py +++ b/ibutsu_client/rest.py @@ -1,32 +1,36 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import io +import ipaddress import json import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse +from urllib.parse import urlencode, urlparse from urllib.request import proxy_bypass_environment -import urllib3 -import ipaddress -from ibutsu_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +import urllib3 +from ibutsu_client.exceptions import ( + ApiException, + ApiValueError, + ForbiddenException, + NotFoundException, + ServiceException, + UnauthorizedException, +) logger = logging.getLogger(__name__) class RESTResponse(io.IOBase): - def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -42,14 +46,13 @@ def getheader(self, name, default=None): return self.urllib3_response.getheader(name, default) -class RESTClientObject(object): - +class RESTClientObject: def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 + # maxsize is the number of requests to host that are allowed in parallel + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # cert_reqs if configuration.verify_ssl: @@ -59,13 +62,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = configuration.assert_hostname if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + addition_pool_args["retries"] = configuration.retries if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + addition_pool_args["socket_options"] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -75,7 +78,8 @@ def __init__(self, configuration, pools_size=4, maxsize=None): # https pool manager if configuration.proxy and not should_bypass_proxies( - configuration.host, no_proxy=configuration.no_proxy or ''): + configuration.host, no_proxy=configuration.no_proxy or "" + ): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, @@ -85,7 +89,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, - **addition_pool_args + **addition_pool_args, ) else: self.pool_manager = urllib3.PoolManager( @@ -95,12 +99,20 @@ def __init__(self, configuration, pools_size=4, maxsize=None): ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, - **addition_pool_args + **addition_pool_args, ) - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + def request( + self, + method, + url, + query_params=None, + headers=None, + body=None, + post_params=None, + _preload_content=True, + _request_timeout=None, + ): """Perform requests. :param method: http request method @@ -120,76 +132,80 @@ def request(self, method, url, query_params=None, headers=None, (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) + raise ApiValueError("body parameter cannot be used with post_params parameter.") post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: + timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' + if (method != "DELETE") and ("Content-Type" not in headers): + headers["Content-Type"] = "application/json" if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', - headers['Content-Type'], re.IGNORECASE)): + url += "?" + urlencode(query_params) + if ("Content-Type" not in headers) or ( + re.search("json", headers["Content-Type"], re.IGNORECASE) + ): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + ) + elif headers["Content-Type"] == "application/x-www-form-urlencoded": r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + ) + elif headers["Content-Type"] == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + ) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( - method, url, + method, + url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -198,13 +214,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers, + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = f"{type(e).__name__}\n{e!s}" raise ApiException(status=0, reason=msg) if _preload_content: @@ -230,77 +249,139 @@ def request(self, method, url, query_params=None, headers=None, return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + def GET( + self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None + ): + return self.request( + "GET", + url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params, + ) + + def HEAD( + self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None + ): + return self.request( + "HEAD", + url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params, + ) + + def OPTIONS( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "OPTIONS", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def DELETE( + self, + url, + headers=None, + query_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "DELETE", + url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def POST( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "POST", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def PUT( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "PUT", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def PATCH( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "PATCH", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + # end of class RESTClientObject def is_ipv4(target): - """ Test if IPv4 address or not - """ + """Test if IPv4 address or not""" try: chk = ipaddress.IPv4Address(target) return True @@ -309,8 +390,7 @@ def is_ipv4(target): def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ + """Test if target belongs to given IPv4 network""" try: nw = ipaddress.IPv4Network(net) ip = ipaddress.IPv4Address(target) @@ -324,29 +404,27 @@ def in_ipv4net(target, net): def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies + """Yet another requests.should_bypass_proxies Test if proxies should not be used for a particular url. """ parsed = urlparse(url) # special cases - if parsed.hostname in [None, '']: + if parsed.hostname in [None, ""]: return True # special cases - if no_proxy in [None, '']: + if no_proxy in [None, ""]: return False - if no_proxy == '*': + if no_proxy == "*": return True - no_proxy = no_proxy.lower().replace(' ', ''); - entries = ( - host for host in no_proxy.split(',') if host - ) + no_proxy = no_proxy.lower().replace(" ", "") + entries = (host for host in no_proxy.split(",") if host) if is_ipv4(parsed.hostname): for item in entries: if in_ipv4net(parsed.hostname, item): return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) + return proxy_bypass_environment(parsed.hostname, {"no": no_proxy}) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0cd87d1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,224 @@ +[project] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Testing", +] +dependencies = [ + "urllib3>=1.25.3", + "python-dateutil>=2.5.3", +] +description = "A system to store and query test results" +dynamic = ["version"] +license = "MIT" +maintainers = [{name = "OpenAPI Generator community"}, {name = "Ibutsu Team"}] +name = "ibutsu-client" +readme = "README.md" +requires-python = ">=3.8" +keywords = ["OpenAPI", "OpenAPI-Generator", "Ibutsu API", "testing", "results"] + +[project.urls] +Source = "https://github.com/ibutsu/ibutsu-client-python" +Tracker = "https://github.com/ibutsu/ibutsu-client-python/issues" + +[dependency-groups] +test = [ + "pytest", + "pytest-cov", + "coverage[toml]", +] +dev = [ + "pre-commit", + "mypy", + "types-python-dateutil", +] + +[build-system] +build-backend = "hatchling.build" +requires = [ + "hatchling>=1.3.1", + "hatch-vcs", +] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.targets.sdist] +include = ["/ibutsu_client", "/test", "/docs", "/requirements.txt", "/test-requirements.txt"] + +[tool.hatch.build.targets.wheel] +packages = ["/ibutsu_client"] + +[tool.hatch.envs.hatch-test] +extra-dependencies = ["ibutsu-client[test]"] + +[[tool.hatch.envs.hatch-test.matrix]] +python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + +[tool.hatch.envs.test] +dependencies = [ + "pytest", + "pytest-cov", + "coverage[toml]", +] + +[tool.mypy] +# Enable strict mode for maximum type safety +strict = true + +# Additional strict settings +warn_redundant_casts = true +warn_unused_ignores = true +warn_return_any = true +warn_unreachable = true +strict_equality = true +no_implicit_reexport = true + +# Override for generated client code - be more lenient +[[tool.mypy.overrides]] +module = ["ibutsu_client.*"] +ignore_missing_imports = true +follow_imports = "skip" +# Generated code may not follow strict typing +disallow_untyped_defs = false +disallow_incomplete_defs = false +check_untyped_defs = false +disallow_untyped_calls = false +disallow_untyped_decorators = false +warn_return_any = false +warn_unused_ignores = false +no_implicit_reexport = false + +# Override for tests directory - be more lenient with pytest functions +[[tool.mypy.overrides]] +module = ["test.*"] +# Allow untyped function definitions for pytest functions +disallow_untyped_defs = false +# Allow incomplete type definitions in tests +disallow_incomplete_defs = false +# Don't require return type annotations for test functions +check_untyped_defs = false +# Allow untyped calls in tests for simplicity +disallow_untyped_calls = false +# Allow untyped decorators (common in pytest) +disallow_untyped_decorators = false + +[tool.pytest.ini_options] +testpaths = ["test"] +# Only collect test classes from actual test files, not from imported modules +python_classes = ["Test*"] +python_files = ["test_*.py", "*_test.py"] + +[tool.coverage.run] +source = ["ibutsu_client"] +branch = true +omit = [ + "*/test/*", + "*/test_*", + "*/conftest.py", + "*/__pycache__/*", + "*/venv/*", + "*/.venv/*", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "if self.debug:", + "if settings.DEBUG", + "raise AssertionError", + "raise NotImplementedError", + "if 0:", + "if __name__ == .__main__.:", + "class .*\\bProtocol\\):", + "@(abc\\.)?abstractmethod", + "TYPE_CHECKING", +] +show_missing = true +precision = 2 +skip_covered = false + +[tool.coverage.html] +directory = "htmlcov" + +[tool.coverage.xml] +output = "coverage.xml" + +[tool.ruff] +line-length = 99 +target-version = "py38" + +[tool.ruff.lint] +extend-select = [ + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "ERA", # eradicate + "I", # isort + "N", # pep8-naming + "PIE", # flake8-pie + "PGH", # pygrep-hooks + "RUF", # Ruff-specific + "SIM", # flake8-simplify + "TCH", # flake8-type-checking + "TID", # flake8-tidy-imports + "UP", # pyupgrade +] +ignore = [ + "B905", # `zip()` without an explicit `strict=` parameter + "N806", # Variable in function should be lowercase - conflicts with generated API code + "N815", # Variable in class scope should not be mixedCase - conflicts with generated API code +] + +[tool.ruff.lint.per-file-ignores] +"test/**" = [ + "S101", # Use of assert detected + "N802", # Function name should be lowercase - test methods + "ERA001", # Found commented-out code - test comments +] +"ibutsu_client/**" = [ + "N802", # Function name should be lowercase - generated code + "N803", # Argument name should be lowercase - generated code + "N806", # Variable should be lowercase - generated code + "N815", # Variable should not be mixedCase - generated code + "N816", # Variable should not be mixedCase - generated code + "PGH004", # Use specific rule codes when using `ruff: noqa` - generated code + "SIM102", # Use a single `if` statement - generated code patterns + "SIM103", # Return the condition directly - generated code patterns + "SIM108", # Use ternary operator - generated code patterns + "SIM101", # Multiple isinstance calls - generated code patterns + "RUF015", # Prefer next(iter()) over single element slice - generated code + "RUF005", # Consider iterable unpacking - generated code patterns + "UP030", # Use implicit references for positional format fields - generated code + "UP031", # Use format specifiers instead of percent format - generated code + "E721", # Use `is` and `is not` for type comparisons - generated code + "B904", # Within except clause, raise exceptions with from - generated code + "F841", # Local variable assigned but never used - generated code + "RUF012", # Mutable class attributes should be annotated with ClassVar - generated code + "F821", # Undefined name - circular imports in generated code + "C408", # Unnecessary dict() call - generated code patterns + "SIM115", # Use context manager for opening files - generated code patterns + "ERA001", # Found commented-out code - generated code comments + "N801", # Class name should use CapWords - generated code utilities + "RUF002", # Docstring contains ambiguous unicode characters - generated code + "C409", # Unnecessary list literal passed to tuple() - generated code patterns + "N818", # Exception name should be named with an Error suffix - generated code +] +"setup.py" = [ + "ERA001", # Found commented-out code - setup file comments +] + +[tool.ruff.lint.isort] +known-first-party = ["ibutsu_client"] diff --git a/regenerate-client.sh b/regenerate-client.sh index 62af61a..48fdebc 100755 --- a/regenerate-client.sh +++ b/regenerate-client.sh @@ -120,7 +120,7 @@ if [[ "$CAN_COMMIT" = true ]]; then echo "done, new branch created: $BRANCH_NAME" if [[ "$CAN_PUSH" = true ]]; then echo -n "Pushing up to origin/$BRANCH_NAME..." - git push -q origin $BRANCH_NAME + git push -q origin $BRANCH_NAME git checkout master if [[ "$CAN_DELETE" = true ]]; then git branch -D $BRANCH_NAME diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 96947f6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/setup.py b/setup.py deleted file mode 100644 index 6093633..0000000 --- a/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -""" - Ibutsu API - - A system to store and query test results # noqa: E501 - - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech -""" - - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "ibutsu-client" -VERSION = "2.3.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", -] - -setup( - name=NAME, - version=VERSION, - description="Ibutsu API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/ibutsu/ibutsu-client-python", - keywords=["OpenAPI", "OpenAPI-Generator", "Ibutsu API"], - python_requires=">=3.6", - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description="""\ - A system to store and query test results # noqa: E501 - """ -) diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index bb4f22b..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pytest-cov>=2.8.1 diff --git a/test/test_account_recovery.py b/test/test_account_recovery.py index 6325d8e..1e989ec 100644 --- a/test/test_account_recovery.py +++ b/test/test_account_recovery.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.account_recovery import AccountRecovery - class TestAccountRecovery(unittest.TestCase): """AccountRecovery unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testAccountRecovery(self): """Test AccountRecovery""" # FIXME: construct object with mandatory attributes with example values - # model = AccountRecovery() # noqa: E501 - pass + # model = AccountRecovery() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_account_registration.py b/test/test_account_registration.py index bc9d20c..3c46884 100644 --- a/test/test_account_registration.py +++ b/test/test_account_registration.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.account_registration import AccountRegistration - class TestAccountRegistration(unittest.TestCase): """AccountRegistration unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testAccountRegistration(self): """Test AccountRegistration""" # FIXME: construct object with mandatory attributes with example values - # model = AccountRegistration() # noqa: E501 - pass + # model = AccountRegistration() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_account_reset.py b/test/test_account_reset.py index 81e0513..ff0dfc4 100644 --- a/test/test_account_reset.py +++ b/test/test_account_reset.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.account_reset import AccountReset - class TestAccountReset(unittest.TestCase): """AccountReset unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testAccountReset(self): """Test AccountReset""" # FIXME: construct object with mandatory attributes with example values - # model = AccountReset() # noqa: E501 - pass + # model = AccountReset() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_admin_project_management_api.py b/test/test_admin_project_management_api.py index e80bed1..30d7fbc 100644 --- a/test/test_admin_project_management_api.py +++ b/test/test_admin_project_management_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.admin_project_management_api import AdminProjectManagementApi # noqa: E501 +from ibutsu_client.api.admin_project_management_api import AdminProjectManagementApi class TestAdminProjectManagementApi(unittest.TestCase): """AdminProjectManagementApi unit test stubs""" def setUp(self): - self.api = AdminProjectManagementApi() # noqa: E501 + self.api = AdminProjectManagementApi() def tearDown(self): pass @@ -26,38 +24,33 @@ def tearDown(self): def test_admin_add_project(self): """Test case for admin_add_project - Administration endpoint to manually add a project. Only accessible to superadmins. # noqa: E501 + Administration endpoint to manually add a project. Only accessible to superadmins. """ - pass def test_admin_delete_project(self): """Test case for admin_delete_project - Administration endpoint to delete a project. Only accessible to superadmins. # noqa: E501 + Administration endpoint to delete a project. Only accessible to superadmins. """ - pass def test_admin_get_project(self): """Test case for admin_get_project - Administration endpoint to return a project. Only accessible to superadmins. # noqa: E501 + Administration endpoint to return a project. Only accessible to superadmins. """ - pass def test_admin_get_project_list(self): """Test case for admin_get_project_list - Administration endpoint to return a list of projects. Only accessible to superadmins. # noqa: E501 + Administration endpoint to return a list of projects. Only accessible to superadmins. """ - pass def test_admin_update_project(self): """Test case for admin_update_project - Administration endpoint to update a project. Only accessible to superadmins. # noqa: E501 + Administration endpoint to update a project. Only accessible to superadmins. """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_admin_user_management_api.py b/test/test_admin_user_management_api.py index 32522cd..dca44c7 100644 --- a/test/test_admin_user_management_api.py +++ b/test/test_admin_user_management_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.admin_user_management_api import AdminUserManagementApi # noqa: E501 +from ibutsu_client.api.admin_user_management_api import AdminUserManagementApi class TestAdminUserManagementApi(unittest.TestCase): """AdminUserManagementApi unit test stubs""" def setUp(self): - self.api = AdminUserManagementApi() # noqa: E501 + self.api = AdminUserManagementApi() def tearDown(self): pass @@ -26,38 +24,33 @@ def tearDown(self): def test_admin_add_user(self): """Test case for admin_add_user - Administration endpoint to manually add a user. Only accessible to superadmins. # noqa: E501 + Administration endpoint to manually add a user. Only accessible to superadmins. """ - pass def test_admin_delete_user(self): """Test case for admin_delete_user - Administration endpoint to delete a user. Only accessible to superadmins. # noqa: E501 + Administration endpoint to delete a user. Only accessible to superadmins. """ - pass def test_admin_get_user(self): """Test case for admin_get_user - Administration endpoint to return a user. Only accessible to superadmins. # noqa: E501 + Administration endpoint to return a user. Only accessible to superadmins. """ - pass def test_admin_get_user_list(self): """Test case for admin_get_user_list - Administration endpoint to return a list of users. Only accessible to superadmins. # noqa: E501 + Administration endpoint to return a list of users. Only accessible to superadmins. """ - pass def test_admin_update_user(self): """Test case for admin_update_user - Administration endpoint to update a user. Only accessible to superadmins. # noqa: E501 + Administration endpoint to update a user. Only accessible to superadmins. """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_artifact.py b/test/test_artifact.py index c69a718..b5d0a7e 100644 --- a/test/test_artifact.py +++ b/test/test_artifact.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.artifact import Artifact - class TestArtifact(unittest.TestCase): """Artifact unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testArtifact(self): """Test Artifact""" # FIXME: construct object with mandatory attributes with example values - # model = Artifact() # noqa: E501 - pass + # model = Artifact() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_artifact_api.py b/test/test_artifact_api.py index f01ca16..d02f5aa 100644 --- a/test/test_artifact_api.py +++ b/test/test_artifact_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.artifact_api import ArtifactApi # noqa: E501 +from ibutsu_client.api.artifact_api import ArtifactApi class TestArtifactApi(unittest.TestCase): """ArtifactApi unit test stubs""" def setUp(self): - self.api = ArtifactApi() # noqa: E501 + self.api = ArtifactApi() def tearDown(self): pass @@ -26,45 +24,39 @@ def tearDown(self): def test_delete_artifact(self): """Test case for delete_artifact - Delete an artifact # noqa: E501 + Delete an artifact """ - pass def test_download_artifact(self): """Test case for download_artifact - Download an artifact # noqa: E501 + Download an artifact """ - pass def test_get_artifact(self): """Test case for get_artifact - Get a single artifact # noqa: E501 + Get a single artifact """ - pass def test_get_artifact_list(self): """Test case for get_artifact_list - Get a (filtered) list of artifacts # noqa: E501 + Get a (filtered) list of artifacts """ - pass def test_upload_artifact(self): """Test case for upload_artifact - Uploads a test run artifact # noqa: E501 + Uploads a test run artifact """ - pass def test_view_artifact(self): """Test case for view_artifact - Stream an artifact directly to the client/browser # noqa: E501 + Stream an artifact directly to the client/browser """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_artifact_list.py b/test/test_artifact_list.py index 030c365..116e775 100644 --- a/test/test_artifact_list.py +++ b/test/test_artifact_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.artifact import Artifact from ibutsu_client.model.pagination import Pagination -globals()['Artifact'] = Artifact -globals()['Pagination'] = Pagination -from ibutsu_client.model.artifact_list import ArtifactList + +globals()["Artifact"] = Artifact +globals()["Pagination"] = Pagination class TestArtifactList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testArtifactList(self): """Test ArtifactList""" # FIXME: construct object with mandatory attributes with example values - # model = ArtifactList() # noqa: E501 - pass + # model = ArtifactList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_create_token.py b/test/test_create_token.py index 62ba186..77dfcd5 100644 --- a/test/test_create_token.py +++ b/test/test_create_token.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.create_token import CreateToken - class TestCreateToken(unittest.TestCase): """CreateToken unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testCreateToken(self): """Test CreateToken""" # FIXME: construct object with mandatory attributes with example values - # model = CreateToken() # noqa: E501 - pass + # model = CreateToken() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_credentials.py b/test/test_credentials.py index 569abab..bd832e4 100644 --- a/test/test_credentials.py +++ b/test/test_credentials.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.credentials import Credentials - class TestCredentials(unittest.TestCase): """Credentials unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testCredentials(self): """Test Credentials""" # FIXME: construct object with mandatory attributes with example values - # model = Credentials() # noqa: E501 - pass + # model = Credentials() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_dashboard.py b/test/test_dashboard.py index 3414746..b3fa67c 100644 --- a/test/test_dashboard.py +++ b/test/test_dashboard.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.dashboard import Dashboard - class TestDashboard(unittest.TestCase): """Dashboard unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testDashboard(self): """Test Dashboard""" # FIXME: construct object with mandatory attributes with example values - # model = Dashboard() # noqa: E501 - pass + # model = Dashboard() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_dashboard_api.py b/test/test_dashboard_api.py index 893c2c4..bcc0612 100644 --- a/test/test_dashboard_api.py +++ b/test/test_dashboard_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.dashboard_api import DashboardApi # noqa: E501 +from ibutsu_client.api.dashboard_api import DashboardApi class TestDashboardApi(unittest.TestCase): """DashboardApi unit test stubs""" def setUp(self): - self.api = DashboardApi() # noqa: E501 + self.api = DashboardApi() def tearDown(self): pass @@ -26,38 +24,33 @@ def tearDown(self): def test_add_dashboard(self): """Test case for add_dashboard - Create a dashboard # noqa: E501 + Create a dashboard """ - pass def test_delete_dashboard(self): """Test case for delete_dashboard - Delete a dashboard # noqa: E501 + Delete a dashboard """ - pass def test_get_dashboard(self): """Test case for get_dashboard - Get a single dashboard by ID # noqa: E501 + Get a single dashboard by ID """ - pass def test_get_dashboard_list(self): """Test case for get_dashboard_list - Get a list of dashboards # noqa: E501 + Get a list of dashboards """ - pass def test_update_dashboard(self): """Test case for update_dashboard - Update a dashboard # noqa: E501 + Update a dashboard """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_dashboard_list.py b/test/test_dashboard_list.py index 240e30f..d62ac6b 100644 --- a/test/test_dashboard_list.py +++ b/test/test_dashboard_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.dashboard import Dashboard from ibutsu_client.model.pagination import Pagination -globals()['Dashboard'] = Dashboard -globals()['Pagination'] = Pagination -from ibutsu_client.model.dashboard_list import DashboardList + +globals()["Dashboard"] = Dashboard +globals()["Pagination"] = Pagination class TestDashboardList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testDashboardList(self): """Test DashboardList""" # FIXME: construct object with mandatory attributes with example values - # model = DashboardList() # noqa: E501 - pass + # model = DashboardList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_get_report_types200_response_inner.py b/test/test_get_report_types200_response_inner.py index e8870d3..d5f4c14 100644 --- a/test/test_get_report_types200_response_inner.py +++ b/test/test_get_report_types200_response_inner.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.get_report_types200_response_inner import GetReportTypes200ResponseInner - class TestGetReportTypes200ResponseInner(unittest.TestCase): """GetReportTypes200ResponseInner unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testGetReportTypes200ResponseInner(self): """Test GetReportTypes200ResponseInner""" # FIXME: construct object with mandatory attributes with example values - # model = GetReportTypes200ResponseInner() # noqa: E501 - pass + # model = GetReportTypes200ResponseInner() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_group.py b/test/test_group.py index 7edf22a..2fa099c 100644 --- a/test/test_group.py +++ b/test/test_group.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.group import Group - class TestGroup(unittest.TestCase): """Group unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testGroup(self): """Test Group""" # FIXME: construct object with mandatory attributes with example values - # model = Group() # noqa: E501 - pass + # model = Group() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_group_api.py b/test/test_group_api.py index 29e8cc5..7b7d700 100644 --- a/test/test_group_api.py +++ b/test/test_group_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.group_api import GroupApi # noqa: E501 +from ibutsu_client.api.group_api import GroupApi class TestGroupApi(unittest.TestCase): """GroupApi unit test stubs""" def setUp(self): - self.api = GroupApi() # noqa: E501 + self.api = GroupApi() def tearDown(self): pass @@ -26,31 +24,27 @@ def tearDown(self): def test_add_group(self): """Test case for add_group - Create a new group # noqa: E501 + Create a new group """ - pass def test_get_group(self): """Test case for get_group - Get a group # noqa: E501 + Get a group """ - pass def test_get_group_list(self): """Test case for get_group_list - Get a list of groups # noqa: E501 + Get a list of groups """ - pass def test_update_group(self): """Test case for update_group - Update a group # noqa: E501 + Update a group """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_group_list.py b/test/test_group_list.py index c3e29c0..76017b0 100644 --- a/test/test_group_list.py +++ b/test/test_group_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.group import Group from ibutsu_client.model.pagination import Pagination -globals()['Group'] = Group -globals()['Pagination'] = Pagination -from ibutsu_client.model.group_list import GroupList + +globals()["Group"] = Group +globals()["Pagination"] = Pagination class TestGroupList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testGroupList(self): """Test GroupList""" # FIXME: construct object with mandatory attributes with example values - # model = GroupList() # noqa: E501 - pass + # model = GroupList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_health.py b/test/test_health.py index f9a859a..da95941 100644 --- a/test/test_health.py +++ b/test/test_health.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.health import Health - class TestHealth(unittest.TestCase): """Health unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testHealth(self): """Test Health""" # FIXME: construct object with mandatory attributes with example values - # model = Health() # noqa: E501 - pass + # model = Health() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_health_api.py b/test/test_health_api.py index 003720b..08a027f 100644 --- a/test/test_health_api.py +++ b/test/test_health_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.health_api import HealthApi # noqa: E501 +from ibutsu_client.api.health_api import HealthApi class TestHealthApi(unittest.TestCase): """HealthApi unit test stubs""" def setUp(self): - self.api = HealthApi() # noqa: E501 + self.api = HealthApi() def tearDown(self): pass @@ -26,24 +24,21 @@ def tearDown(self): def test_get_database_health(self): """Test case for get_database_health - Get a health report for the database # noqa: E501 + Get a health report for the database """ - pass def test_get_health(self): """Test case for get_health - Get a general health report # noqa: E501 + Get a general health report """ - pass def test_get_health_info(self): """Test case for get_health_info - Get information about the server # noqa: E501 + Get information about the server """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_health_info.py b/test/test_health_info.py index 4342123..80fcd34 100644 --- a/test/test_health_info.py +++ b/test/test_health_info.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.health_info import HealthInfo - class TestHealthInfo(unittest.TestCase): """HealthInfo unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testHealthInfo(self): """Test HealthInfo""" # FIXME: construct object with mandatory attributes with example values - # model = HealthInfo() # noqa: E501 - pass + # model = HealthInfo() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_import_api.py b/test/test_import_api.py index 6c147a4..555149e 100644 --- a/test/test_import_api.py +++ b/test/test_import_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.import_api import ImportApi # noqa: E501 +from ibutsu_client.api.import_api import ImportApi class TestImportApi(unittest.TestCase): """ImportApi unit test stubs""" def setUp(self): - self.api = ImportApi() # noqa: E501 + self.api = ImportApi() def tearDown(self): pass @@ -26,17 +24,15 @@ def tearDown(self): def test_add_import(self): """Test case for add_import - Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive # noqa: E501 + Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive """ - pass def test_get_import(self): """Test case for get_import - Get the status of an import # noqa: E501 + Get the status of an import """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_login_api.py b/test/test_login_api.py index a77d16c..2b9a6a6 100644 --- a/test/test_login_api.py +++ b/test/test_login_api.py @@ -1,76 +1,50 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.login_api import LoginApi # noqa: E501 +from ibutsu_client.api.login_api import LoginApi class TestLoginApi(unittest.TestCase): """LoginApi unit test stubs""" def setUp(self): - self.api = LoginApi() # noqa: E501 + self.api = LoginApi() def tearDown(self): pass def test_activate(self): - """Test case for activate - - """ - pass + """Test case for activate""" def test_auth(self): - """Test case for auth - - """ - pass + """Test case for auth""" def test_config(self): - """Test case for config - - """ - pass + """Test case for config""" def test_login(self): - """Test case for login - - """ - pass + """Test case for login""" def test_recover(self): - """Test case for recover - - """ - pass + """Test case for recover""" def test_register(self): - """Test case for register - - """ - pass + """Test case for register""" def test_reset_password(self): - """Test case for reset_password - - """ - pass + """Test case for reset_password""" def test_support(self): - """Test case for support - - """ - pass + """Test case for support""" -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_login_config.py b/test/test_login_config.py index 01f4bb4..0cfd354 100644 --- a/test/test_login_config.py +++ b/test/test_login_config.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.login_config import LoginConfig - class TestLoginConfig(unittest.TestCase): """LoginConfig unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testLoginConfig(self): """Test LoginConfig""" # FIXME: construct object with mandatory attributes with example values - # model = LoginConfig() # noqa: E501 - pass + # model = LoginConfig() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_login_error.py b/test/test_login_error.py index 01bd442..a88daf4 100644 --- a/test/test_login_error.py +++ b/test/test_login_error.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.login_error import LoginError - class TestLoginError(unittest.TestCase): """LoginError unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testLoginError(self): """Test LoginError""" # FIXME: construct object with mandatory attributes with example values - # model = LoginError() # noqa: E501 - pass + # model = LoginError() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_login_support.py b/test/test_login_support.py index d961d1e..ab35024 100644 --- a/test/test_login_support.py +++ b/test/test_login_support.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.login_support import LoginSupport - class TestLoginSupport(unittest.TestCase): """LoginSupport unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testLoginSupport(self): """Test LoginSupport""" # FIXME: construct object with mandatory attributes with example values - # model = LoginSupport() # noqa: E501 - pass + # model = LoginSupport() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_login_token.py b/test/test_login_token.py index fa99a8a..7de1784 100644 --- a/test/test_login_token.py +++ b/test/test_login_token.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.login_token import LoginToken - class TestLoginToken(unittest.TestCase): """LoginToken unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testLoginToken(self): """Test LoginToken""" # FIXME: construct object with mandatory attributes with example values - # model = LoginToken() # noqa: E501 - pass + # model = LoginToken() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_model_import.py b/test/test_model_import.py index d18fb99..e465f8c 100644 --- a/test/test_model_import.py +++ b/test/test_model_import.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.model_import import ModelImport - class TestModelImport(unittest.TestCase): """ModelImport unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testModelImport(self): """Test ModelImport""" # FIXME: construct object with mandatory attributes with example values - # model = ModelImport() # noqa: E501 - pass + # model = ModelImport() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_pagination.py b/test/test_pagination.py index 47c2c49..8622351 100644 --- a/test/test_pagination.py +++ b/test/test_pagination.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.pagination import Pagination - class TestPagination(unittest.TestCase): """Pagination unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testPagination(self): """Test Pagination""" # FIXME: construct object with mandatory attributes with example values - # model = Pagination() # noqa: E501 - pass + # model = Pagination() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_project.py b/test/test_project.py index 99834e7..f5bc3bc 100644 --- a/test/test_project.py +++ b/test/test_project.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.project import Project - class TestProject(unittest.TestCase): """Project unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testProject(self): """Test Project""" # FIXME: construct object with mandatory attributes with example values - # model = Project() # noqa: E501 - pass + # model = Project() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_project_api.py b/test/test_project_api.py index 0dbd0bd..2ea37a6 100644 --- a/test/test_project_api.py +++ b/test/test_project_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.project_api import ProjectApi # noqa: E501 +from ibutsu_client.api.project_api import ProjectApi class TestProjectApi(unittest.TestCase): """ProjectApi unit test stubs""" def setUp(self): - self.api = ProjectApi() # noqa: E501 + self.api = ProjectApi() def tearDown(self): pass @@ -26,31 +24,27 @@ def tearDown(self): def test_add_project(self): """Test case for add_project - Create a project # noqa: E501 + Create a project """ - pass def test_get_project(self): """Test case for get_project - Get a single project by ID # noqa: E501 + Get a single project by ID """ - pass def test_get_project_list(self): """Test case for get_project_list - Get a list of projects # noqa: E501 + Get a list of projects """ - pass def test_update_project(self): """Test case for update_project - Update a project # noqa: E501 + Update a project """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_project_list.py b/test/test_project_list.py index d7d45c0..970ac4c 100644 --- a/test/test_project_list.py +++ b/test/test_project_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.project import Project -globals()['Pagination'] = Pagination -globals()['Project'] = Project -from ibutsu_client.model.project_list import ProjectList + +globals()["Pagination"] = Pagination +globals()["Project"] = Project class TestProjectList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testProjectList(self): """Test ProjectList""" # FIXME: construct object with mandatory attributes with example values - # model = ProjectList() # noqa: E501 - pass + # model = ProjectList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_report.py b/test/test_report.py index 4805384..b035f37 100644 --- a/test/test_report.py +++ b/test/test_report.py @@ -1,20 +1,17 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.report_parameters import ReportParameters -globals()['ReportParameters'] = ReportParameters -from ibutsu_client.model.report import Report + +globals()["ReportParameters"] = ReportParameters class TestReport(unittest.TestCase): @@ -29,9 +26,8 @@ def tearDown(self): def testReport(self): """Test Report""" # FIXME: construct object with mandatory attributes with example values - # model = Report() # noqa: E501 - pass + # model = Report() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_report_api.py b/test/test_report_api.py index 42ca4e5..1a161bc 100644 --- a/test/test_report_api.py +++ b/test/test_report_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.report_api import ReportApi # noqa: E501 +from ibutsu_client.api.report_api import ReportApi class TestReportApi(unittest.TestCase): """ReportApi unit test stubs""" def setUp(self): - self.api = ReportApi() # noqa: E501 + self.api = ReportApi() def tearDown(self): pass @@ -26,52 +24,45 @@ def tearDown(self): def test_add_report(self): """Test case for add_report - Create a new report # noqa: E501 + Create a new report """ - pass def test_delete_report(self): """Test case for delete_report - Delete a report # noqa: E501 + Delete a report """ - pass def test_download_report(self): """Test case for download_report - Download a report # noqa: E501 + Download a report """ - pass def test_get_report(self): """Test case for get_report - Get a report # noqa: E501 + Get a report """ - pass def test_get_report_list(self): """Test case for get_report_list - Get a list of reports # noqa: E501 + Get a list of reports """ - pass def test_get_report_types(self): """Test case for get_report_types - Get a list of report types # noqa: E501 + Get a list of report types """ - pass def test_view_report(self): """Test case for view_report - View a report # noqa: E501 + View a report """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_report_list.py b/test/test_report_list.py index 921c449..de4b22b 100644 --- a/test/test_report_list.py +++ b/test/test_report_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.report import Report -globals()['Pagination'] = Pagination -globals()['Report'] = Report -from ibutsu_client.model.report_list import ReportList + +globals()["Pagination"] = Pagination +globals()["Report"] = Report class TestReportList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testReportList(self): """Test ReportList""" # FIXME: construct object with mandatory attributes with example values - # model = ReportList() # noqa: E501 - pass + # model = ReportList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_report_parameters.py b/test/test_report_parameters.py index 2afc96c..da52b4f 100644 --- a/test/test_report_parameters.py +++ b/test/test_report_parameters.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.report_parameters import ReportParameters - class TestReportParameters(unittest.TestCase): """ReportParameters unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testReportParameters(self): """Test ReportParameters""" # FIXME: construct object with mandatory attributes with example values - # model = ReportParameters() # noqa: E501 - pass + # model = ReportParameters() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_result.py b/test/test_result.py index f8d294e..4ef6f66 100644 --- a/test/test_result.py +++ b/test/test_result.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.result import Result - class TestResult(unittest.TestCase): """Result unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testResult(self): """Test Result""" # FIXME: construct object with mandatory attributes with example values - # model = Result() # noqa: E501 - pass + # model = Result() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_result_api.py b/test/test_result_api.py index 7ebb3b4..a0e2414 100644 --- a/test/test_result_api.py +++ b/test/test_result_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.result_api import ResultApi # noqa: E501 +from ibutsu_client.api.result_api import ResultApi class TestResultApi(unittest.TestCase): """ResultApi unit test stubs""" def setUp(self): - self.api = ResultApi() # noqa: E501 + self.api = ResultApi() def tearDown(self): pass @@ -26,31 +24,27 @@ def tearDown(self): def test_add_result(self): """Test case for add_result - Create a test result # noqa: E501 + Create a test result """ - pass def test_get_result(self): """Test case for get_result - Get a single result # noqa: E501 + Get a single result """ - pass def test_get_result_list(self): """Test case for get_result_list - Get the list of results. # noqa: E501 + Get the list of results. """ - pass def test_update_result(self): """Test case for update_result - Updates a single result # noqa: E501 + Updates a single result """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_result_list.py b/test/test_result_list.py index a36f9fe..d968ffe 100644 --- a/test/test_result_list.py +++ b/test/test_result_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.result import Result -globals()['Pagination'] = Pagination -globals()['Result'] = Result -from ibutsu_client.model.result_list import ResultList + +globals()["Pagination"] = Pagination +globals()["Result"] = Result class TestResultList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testResultList(self): """Test ResultList""" # FIXME: construct object with mandatory attributes with example values - # model = ResultList() # noqa: E501 - pass + # model = ResultList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_run.py b/test/test_run.py index fa84632..62053c8 100644 --- a/test/test_run.py +++ b/test/test_run.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.run import Run - class TestRun(unittest.TestCase): """Run unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testRun(self): """Test Run""" # FIXME: construct object with mandatory attributes with example values - # model = Run() # noqa: E501 - pass + # model = Run() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_run_api.py b/test/test_run_api.py index c4f07a0..c600b47 100644 --- a/test/test_run_api.py +++ b/test/test_run_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.run_api import RunApi # noqa: E501 +from ibutsu_client.api.run_api import RunApi class TestRunApi(unittest.TestCase): """RunApi unit test stubs""" def setUp(self): - self.api = RunApi() # noqa: E501 + self.api = RunApi() def tearDown(self): pass @@ -26,38 +24,33 @@ def tearDown(self): def test_add_run(self): """Test case for add_run - Create a run # noqa: E501 + Create a run """ - pass def test_bulk_update(self): """Test case for bulk_update - Update multiple runs with common metadata # noqa: E501 + Update multiple runs with common metadata """ - pass def test_get_run(self): """Test case for get_run - Get a single run by ID (uuid required) # noqa: E501 + Get a single run by ID (uuid required) """ - pass def test_get_run_list(self): """Test case for get_run_list - Get a list of the test runs # noqa: E501 + Get a list of the test runs """ - pass def test_update_run(self): """Test case for update_run - Update a single run # noqa: E501 + Update a single run """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_run_list.py b/test/test_run_list.py index 6037531..c0b24c1 100644 --- a/test/test_run_list.py +++ b/test/test_run_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.run import Run -globals()['Pagination'] = Pagination -globals()['Run'] = Run -from ibutsu_client.model.run_list import RunList + +globals()["Pagination"] = Pagination +globals()["Run"] = Run class TestRunList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testRunList(self): """Test RunList""" # FIXME: construct object with mandatory attributes with example values - # model = RunList() # noqa: E501 - pass + # model = RunList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_task_api.py b/test/test_task_api.py index 17310ab..07b3153 100644 --- a/test/test_task_api.py +++ b/test/test_task_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.task_api import TaskApi # noqa: E501 +from ibutsu_client.api.task_api import TaskApi class TestTaskApi(unittest.TestCase): """TaskApi unit test stubs""" def setUp(self): - self.api = TaskApi() # noqa: E501 + self.api = TaskApi() def tearDown(self): pass @@ -26,10 +24,9 @@ def tearDown(self): def test_get_task(self): """Test case for get_task - Get the status or result of a task # noqa: E501 + Get the status or result of a task """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_token.py b/test/test_token.py index 3e1ec5c..a666d0f 100644 --- a/test/test_token.py +++ b/test/test_token.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.token import Token - class TestToken(unittest.TestCase): """Token unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testToken(self): """Test Token""" # FIXME: construct object with mandatory attributes with example values - # model = Token() # noqa: E501 - pass + # model = Token() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_token_list.py b/test/test_token_list.py index dbe163c..dc261ff 100644 --- a/test/test_token_list.py +++ b/test/test_token_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.token import Token -globals()['Pagination'] = Pagination -globals()['Token'] = Token -from ibutsu_client.model.token_list import TokenList + +globals()["Pagination"] = Pagination +globals()["Token"] = Token class TestTokenList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testTokenList(self): """Test TokenList""" # FIXME: construct object with mandatory attributes with example values - # model = TokenList() # noqa: E501 - pass + # model = TokenList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_update_run.py b/test/test_update_run.py index afa661e..4c78c44 100644 --- a/test/test_update_run.py +++ b/test/test_update_run.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.update_run import UpdateRun - class TestUpdateRun(unittest.TestCase): """UpdateRun unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testUpdateRun(self): """Test UpdateRun""" # FIXME: construct object with mandatory attributes with example values - # model = UpdateRun() # noqa: E501 - pass + # model = UpdateRun() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_user.py b/test/test_user.py index 21347ef..a2c1092 100644 --- a/test/test_user.py +++ b/test/test_user.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.user import User - class TestUser(unittest.TestCase): """User unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testUser(self): """Test User""" # FIXME: construct object with mandatory attributes with example values - # model = User() # noqa: E501 - pass + # model = User() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py index 28bbafa..433bd9b 100644 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.user_api import UserApi # noqa: E501 +from ibutsu_client.api.user_api import UserApi class TestUserApi(unittest.TestCase): """UserApi unit test stubs""" def setUp(self): - self.api = UserApi() # noqa: E501 + self.api = UserApi() def tearDown(self): pass @@ -26,45 +24,39 @@ def tearDown(self): def test_add_token(self): """Test case for add_token - Create a token for the current user # noqa: E501 + Create a token for the current user """ - pass def test_delete_token(self): """Test case for delete_token - Delete the token # noqa: E501 + Delete the token """ - pass def test_get_current_user(self): """Test case for get_current_user - Return the user details for the current user # noqa: E501 + Return the user details for the current user """ - pass def test_get_token(self): """Test case for get_token - Retrieve a single token for the current user # noqa: E501 + Retrieve a single token for the current user """ - pass def test_get_token_list(self): """Test case for get_token_list - Return the tokens for the user # noqa: E501 + Return the tokens for the user """ - pass def test_update_current_user(self): """Test case for update_current_user - Return the user details for the current user # noqa: E501 + Return the user details for the current user """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_user_list.py b/test/test_user_list.py index 038e98f..f0475c9 100644 --- a/test/test_user_list.py +++ b/test/test_user_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.user import User -globals()['Pagination'] = Pagination -globals()['User'] = User -from ibutsu_client.model.user_list import UserList + +globals()["Pagination"] = Pagination +globals()["User"] = User class TestUserList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testUserList(self): """Test UserList""" # FIXME: construct object with mandatory attributes with example values - # model = UserList() # noqa: E501 - pass + # model = UserList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_api.py b/test/test_widget_api.py index c24a2f8..dcfe4a6 100644 --- a/test/test_widget_api.py +++ b/test/test_widget_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.widget_api import WidgetApi # noqa: E501 +from ibutsu_client.api.widget_api import WidgetApi class TestWidgetApi(unittest.TestCase): """WidgetApi unit test stubs""" def setUp(self): - self.api = WidgetApi() # noqa: E501 + self.api = WidgetApi() def tearDown(self): pass @@ -26,17 +24,15 @@ def tearDown(self): def test_get_widget(self): """Test case for get_widget - Generate data for a dashboard widget # noqa: E501 + Generate data for a dashboard widget """ - pass def test_get_widget_types(self): """Test case for get_widget_types - Get a list of widget types # noqa: E501 + Get a list of widget types """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_config.py b/test/test_widget_config.py index bed1aae..42f7c6b 100644 --- a/test/test_widget_config.py +++ b/test/test_widget_config.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.widget_config import WidgetConfig - class TestWidgetConfig(unittest.TestCase): """WidgetConfig unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testWidgetConfig(self): """Test WidgetConfig""" # FIXME: construct object with mandatory attributes with example values - # model = WidgetConfig() # noqa: E501 - pass + # model = WidgetConfig() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_config_api.py b/test/test_widget_config_api.py index cacf3f8..c64ce7c 100644 --- a/test/test_widget_config_api.py +++ b/test/test_widget_config_api.py @@ -1,24 +1,22 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - import unittest -import ibutsu_client -from ibutsu_client.api.widget_config_api import WidgetConfigApi # noqa: E501 +from ibutsu_client.api.widget_config_api import WidgetConfigApi class TestWidgetConfigApi(unittest.TestCase): """WidgetConfigApi unit test stubs""" def setUp(self): - self.api = WidgetConfigApi() # noqa: E501 + self.api = WidgetConfigApi() def tearDown(self): pass @@ -26,38 +24,33 @@ def tearDown(self): def test_add_widget_config(self): """Test case for add_widget_config - Create a widget configuration # noqa: E501 + Create a widget configuration """ - pass def test_delete_widget_config(self): """Test case for delete_widget_config - Delete a widget configuration # noqa: E501 + Delete a widget configuration """ - pass def test_get_widget_config(self): """Test case for get_widget_config - Get a single widget configuration # noqa: E501 + Get a single widget configuration """ - pass def test_get_widget_config_list(self): """Test case for get_widget_config_list - Get the list of widget configurations # noqa: E501 + Get the list of widget configurations """ - pass def test_update_widget_config(self): """Test case for update_widget_config - Updates a single widget configuration # noqa: E501 + Updates a single widget configuration """ - pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_config_list.py b/test/test_widget_config_list.py index 34a5695..f7bf733 100644 --- a/test/test_widget_config_list.py +++ b/test/test_widget_config_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.widget_config import WidgetConfig -globals()['Pagination'] = Pagination -globals()['WidgetConfig'] = WidgetConfig -from ibutsu_client.model.widget_config_list import WidgetConfigList + +globals()["Pagination"] = Pagination +globals()["WidgetConfig"] = WidgetConfig class TestWidgetConfigList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testWidgetConfigList(self): """Test WidgetConfigList""" # FIXME: construct object with mandatory attributes with example values - # model = WidgetConfigList() # noqa: E501 - pass + # model = WidgetConfigList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_param.py b/test/test_widget_param.py index 9dfb7d8..f70c248 100644 --- a/test/test_widget_param.py +++ b/test/test_widget_param.py @@ -1,19 +1,14 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client -from ibutsu_client.model.widget_param import WidgetParam - class TestWidgetParam(unittest.TestCase): """WidgetParam unit test stubs""" @@ -27,9 +22,8 @@ def tearDown(self): def testWidgetParam(self): """Test WidgetParam""" # FIXME: construct object with mandatory attributes with example values - # model = WidgetParam() # noqa: E501 - pass + # model = WidgetParam() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_type.py b/test/test_widget_type.py index e06f3fb..741d569 100644 --- a/test/test_widget_type.py +++ b/test/test_widget_type.py @@ -1,20 +1,17 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.widget_param import WidgetParam -globals()['WidgetParam'] = WidgetParam -from ibutsu_client.model.widget_type import WidgetType + +globals()["WidgetParam"] = WidgetParam class TestWidgetType(unittest.TestCase): @@ -29,9 +26,8 @@ def tearDown(self): def testWidgetType(self): """Test WidgetType""" # FIXME: construct object with mandatory attributes with example values - # model = WidgetType() # noqa: E501 - pass + # model = WidgetType() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_widget_type_list.py b/test/test_widget_type_list.py index bb2a9d7..97c1554 100644 --- a/test/test_widget_type_list.py +++ b/test/test_widget_type_list.py @@ -1,22 +1,19 @@ """ - Ibutsu API +Ibutsu API - A system to store and query test results # noqa: E501 +A system to store and query test results - The version of the OpenAPI document: 2.3.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 2.3.0 +Generated by: https://openapi-generator.tech """ - -import sys import unittest -import ibutsu_client from ibutsu_client.model.pagination import Pagination from ibutsu_client.model.widget_type import WidgetType -globals()['Pagination'] = Pagination -globals()['WidgetType'] = WidgetType -from ibutsu_client.model.widget_type_list import WidgetTypeList + +globals()["Pagination"] = Pagination +globals()["WidgetType"] = WidgetType class TestWidgetTypeList(unittest.TestCase): @@ -31,9 +28,8 @@ def tearDown(self): def testWidgetTypeList(self): """Test WidgetTypeList""" # FIXME: construct object with mandatory attributes with example values - # model = WidgetTypeList() # noqa: E501 - pass + # model = WidgetTypeList() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 0e3f6b5..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=ibutsu_client