diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 0b74a7a..05a0a1c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -29,6 +29,6 @@ Ex. I'm frustrated when [...] happens as documented in issue-XYZ **Describe the feature request** -> A clear and concise description of your request. +> A clear and concise description of your request. Ex. I need or want [...] diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8ef73bb..543fb3e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,6 +8,6 @@ - Links to relevant issues - Example: issue-XYZ ## Testing -- Provide some proof you've tested your changes +- Provide some proof you've tested your changes - Example: test results available at ... - Example: tested on operating system ... diff --git a/.gitignore b/.gitignore index 43995bd..6d53a48 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ __pycache__/ # Distribution / packaging .Python -env/ build/ develop-eggs/ dist/ @@ -20,9 +19,12 @@ lib64/ parts/ sdist/ var/ +wheels/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -37,17 +39,17 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml -*,cover +*.cover +*.py,cover .hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache +.pytest_cache/ +cover/ # Translations *.mo @@ -55,12 +57,154 @@ venv/ # Django stuff: *.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy # Sphinx documentation docs/_build/ # PyBuilder +.pybuilder/ target/ -#Ipython Notebook +# Jupyter Notebook .ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +.idea +.idea/ + +.vscode +.vscode/ diff --git a/.markdownlintrc b/.markdownlintrc new file mode 100644 index 0000000..37c21d0 --- /dev/null +++ b/.markdownlintrc @@ -0,0 +1,28 @@ +{ + "default": true, + "MD029": { + "style": "ordered" + }, + "MD033": false, + "MD013": false, + "MD002": false, + "MD026": false, + "MD041": false, + "MD005": false, + "MD007": false, + "MD034": false, + "MD024": false, + "MD045": false, + "MD012": false, + "MD031": false, + "MD032": false, + "MD036": false, + "MD055": false, + "MD056": false, + "MD022": false, + "MD042": false, + "MD004": false, + "MD025": false, + "MD001": false, + "MD051": false +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e4f169e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,67 @@ +fail_fast: true +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-xml + - id: check-added-large-files + args: + - --maxkb=50000 + - id: check-json # Checks json files for parsable syntax. + - id: pretty-format-json # Sets a standard for formatting json files. + args: + - --autofix + - id: requirements-txt-fixer # Sorts entries in requirements.txt. + - id: check-ast # Simply checks whether the files parse as valid python. + - id: detect-private-key # Detects the presence of private keys. + - id: detect-aws-credentials # Detects *your* aws credentials from the aws cli credentials file. + args: + - --allow-missing-credentials + - id: check-toml # Checks toml files for parsable syntax. + + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: "v0.39.0" + hooks: + - id: markdownlint + args: ["--config", ".markdownlintrc", "--ignore", "CHANGELOG.md"] + + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black"] + + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.1.1 + hooks: + - id: black + + # - repo: https://github.com/astral-sh/ruff-pre-commit + # rev: v0.2.1 + # hooks: + # - id: ruff + # args: [ --fix ] + + - repo: https://github.com/PyCQA/bandit + rev: "1.7.7" # you must change this to newest version + hooks: + - id: bandit + args: + [ + "--configfile=pyproject.toml", + "--severity-level=high", + "--confidence-level=high", + ] + additional_dependencies: [".[toml]"] + + - repo: https://github.com/hadolint/hadolint + rev: v2.12.1-beta + hooks: + - id: hadolint # requires hadolint is installed (brew install hadolint) + args: + - --no-color + - --failure-threshold=error + - --verbose diff --git a/CHANGELOG.md b/CHANGELOG.md index ea77a3e..7151834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,14 @@ # Changelog -All notable changes to this project will be documented in this file. +All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [X.Y.Z] - 2022-MM-DD -### Added +### Added -- +- - - diff --git a/docs/Bbox.md b/docs/Bbox.md index f198ae4..b597e46 100644 --- a/docs/Bbox.md +++ b/docs/Bbox.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bbox** | **List[float]** | | -**crs** | [**Crs**](Crs.md) | | [optional] +**bbox** | **List[float]** | | +**crs** | [**Crs**](Crs.md) | | [optional] ## Example @@ -26,5 +26,3 @@ bbox_dict = bbox_instance.to_dict() bbox_from_dict = Bbox.from_dict(bbox_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConfClasses.md b/docs/ConfClasses.md index 04add87..4a97511 100644 --- a/docs/ConfClasses.md +++ b/docs/ConfClasses.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**conforms_to** | **List[str]** | | +**conforms_to** | **List[str]** | | ## Example @@ -25,5 +25,3 @@ conf_classes_dict = conf_classes_instance.to_dict() conf_classes_from_dict = ConfClasses.from_dict(conf_classes_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Crs.md b/docs/Crs.md index f3320b7..37fa304 100644 --- a/docs/Crs.md +++ b/docs/Crs.md @@ -24,5 +24,3 @@ crs_dict = crs_instance.to_dict() crs_from_dict = Crs.from_dict(crs_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Crs5.md b/docs/Crs5.md index 1659e92..6f9ebcc 100644 --- a/docs/Crs5.md +++ b/docs/Crs5.md @@ -7,5 +7,3 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 8777f9a..640897f 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -130,7 +130,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - process_input = unity_sps_ogc_processes_api_python_client.ProcessInput() # ProcessInput | + process_input = unity_sps_ogc_processes_api_python_client.ProcessInput() # ProcessInput | try: # Deploy a process @@ -148,7 +148,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **process_input** | [**ProcessInput**](ProcessInput.md)| | + **process_input** | [**ProcessInput**](ProcessInput.md)| | ### Return type @@ -209,7 +209,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - job_id = 'job_id_example' # str | + job_id = 'job_id_example' # str | try: # Cancel a job execution, remove a finished job @@ -227,7 +227,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | + **job_id** | **str**| | ### Return type @@ -289,8 +289,8 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - process_id = 'process_id_example' # str | - execute = unity_sps_ogc_processes_api_python_client.Execute() # Execute | + process_id = 'process_id_example' # str | + execute = unity_sps_ogc_processes_api_python_client.Execute() # Execute | try: # Execute a process @@ -308,8 +308,8 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **process_id** | **str**| | - **execute** | [**Execute**](Execute.md)| | + **process_id** | **str**| | + **execute** | [**Execute**](Execute.md)| | ### Return type @@ -592,7 +592,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - process_id = 'process_id_example' # str | + process_id = 'process_id_example' # str | try: # Retrieve a process description @@ -610,7 +610,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **process_id** | **str**| | + **process_id** | **str**| | ### Return type @@ -744,7 +744,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - job_id = 'job_id_example' # str | + job_id = 'job_id_example' # str | try: # Retrieve the result(s) of a job @@ -762,7 +762,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | + **job_id** | **str**| | ### Return type @@ -823,7 +823,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - job_id = 'job_id_example' # str | + job_id = 'job_id_example' # str | try: # Retrieve the status of a job @@ -841,7 +841,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | + **job_id** | **str**| | ### Return type @@ -901,7 +901,7 @@ configuration = unity_sps_ogc_processes_api_python_client.Configuration( with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unity_sps_ogc_processes_api_python_client.DefaultApi(api_client) - process_id = 'process_id_example' # str | + process_id = 'process_id_example' # str | try: # Undeploy a process @@ -917,7 +917,7 @@ with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_c Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **process_id** | **str**| | + **process_id** | **str**| | ### Return type @@ -940,4 +940,3 @@ void (empty response body) **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Detail.md b/docs/Detail.md index e5b06d7..c806c07 100644 --- a/docs/Detail.md +++ b/docs/Detail.md @@ -24,5 +24,3 @@ detail_dict = detail_instance.to_dict() detail_from_dict = Detail.from_dict(detail_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Exception.md b/docs/Exception.md index 3a712f1..f6d3d18 100644 --- a/docs/Exception.md +++ b/docs/Exception.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **object** | | -**title** | [**Title**](Title.md) | | [optional] -**status** | [**Status**](Status.md) | | [optional] -**detail** | [**Detail**](Detail.md) | | [optional] -**instance** | [**Instance**](Instance.md) | | [optional] +**type** | **object** | | +**title** | [**Title**](Title.md) | | [optional] +**status** | [**Status**](Status.md) | | [optional] +**detail** | [**Detail**](Detail.md) | | [optional] +**instance** | [**Instance**](Instance.md) | | [optional] ## Example @@ -29,5 +29,3 @@ exception_dict = exception_instance.to_dict() exception_from_dict = Exception.from_dict(exception_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Execute.md b/docs/Execute.md index a42dde7..715dfa5 100644 --- a/docs/Execute.md +++ b/docs/Execute.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inputs** | [**AnyOf**](AnyOf.md) | | [optional] -**outputs** | [**AnyOf**](AnyOf.md) | | [optional] -**subscriber** | [**Subscriber**](Subscriber.md) | | [optional] +**inputs** | [**AnyOf**](AnyOf.md) | | [optional] +**outputs** | [**AnyOf**](AnyOf.md) | | [optional] +**subscriber** | [**Subscriber**](Subscriber.md) | | [optional] ## Example @@ -27,5 +27,3 @@ execute_dict = execute_instance.to_dict() execute_from_dict = Execute.from_dict(execute_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md index 7bab009..5585ab5 100644 --- a/docs/HTTPValidationError.md +++ b/docs/HTTPValidationError.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] +**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] ## Example @@ -25,5 +25,3 @@ http_validation_error_dict = http_validation_error_instance.to_dict() http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/HealthCheck.md b/docs/HealthCheck.md index 508c13b..e4c7639 100644 --- a/docs/HealthCheck.md +++ b/docs/HealthCheck.md @@ -26,5 +26,3 @@ health_check_dict = health_check_instance.to_dict() health_check_from_dict = HealthCheck.from_dict(health_check_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InputValueInput.md b/docs/InputValueInput.md index 7d41341..b97c2b8 100644 --- a/docs/InputValueInput.md +++ b/docs/InputValueInput.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bbox** | **List[object]** | | -**crs** | [**Crs**](Crs.md) | | [optional] +**bbox** | **List[object]** | | +**crs** | [**Crs**](Crs.md) | | [optional] ## Example @@ -26,5 +26,3 @@ input_value_input_dict = input_value_input_instance.to_dict() input_value_input_from_dict = InputValueInput.from_dict(input_value_input_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InputValueNoObjectInput.md b/docs/InputValueNoObjectInput.md index e01e687..d8ee274 100644 --- a/docs/InputValueNoObjectInput.md +++ b/docs/InputValueNoObjectInput.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bbox** | **List[object]** | | -**crs** | [**Crs**](Crs.md) | | [optional] +**bbox** | **List[object]** | | +**crs** | [**Crs**](Crs.md) | | [optional] ## Example @@ -26,5 +26,3 @@ input_value_no_object_input_dict = input_value_no_object_input_instance.to_dict( input_value_no_object_input_from_dict = InputValueNoObjectInput.from_dict(input_value_no_object_input_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InputValueNoObjectOutput.md b/docs/InputValueNoObjectOutput.md index 7fdbd0f..4e05590 100644 --- a/docs/InputValueNoObjectOutput.md +++ b/docs/InputValueNoObjectOutput.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bbox** | **List[object]** | | -**crs** | [**Crs**](Crs.md) | | [optional] +**bbox** | **List[object]** | | +**crs** | [**Crs**](Crs.md) | | [optional] ## Example @@ -26,5 +26,3 @@ input_value_no_object_output_dict = input_value_no_object_output_instance.to_dic input_value_no_object_output_from_dict = InputValueNoObjectOutput.from_dict(input_value_no_object_output_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InputValueOutput.md b/docs/InputValueOutput.md index 07fcd23..125d3ca 100644 --- a/docs/InputValueOutput.md +++ b/docs/InputValueOutput.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bbox** | **List[object]** | | -**crs** | [**Crs**](Crs.md) | | [optional] +**bbox** | **List[object]** | | +**crs** | [**Crs**](Crs.md) | | [optional] ## Example @@ -26,5 +26,3 @@ input_value_output_dict = input_value_output_instance.to_dict() input_value_output_from_dict = InputValueOutput.from_dict(input_value_output_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Instance.md b/docs/Instance.md index 0c905c6..f661e54 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -24,5 +24,3 @@ instance_dict = instance_instance.to_dict() instance_from_dict = Instance.from_dict(instance_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/JobControlOptions.md b/docs/JobControlOptions.md index bb1faf1..dbc3558 100644 --- a/docs/JobControlOptions.md +++ b/docs/JobControlOptions.md @@ -7,5 +7,3 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/JobList.md b/docs/JobList.md index bee73d8..0a9b63c 100644 --- a/docs/JobList.md +++ b/docs/JobList.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**jobs** | [**List[StatusInfo]**](StatusInfo.md) | | -**links** | [**List[Link]**](Link.md) | | +**jobs** | [**List[StatusInfo]**](StatusInfo.md) | | +**links** | [**List[Link]**](Link.md) | | ## Example @@ -26,5 +26,3 @@ job_list_dict = job_list_instance.to_dict() job_list_from_dict = JobList.from_dict(job_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LandingPage.md b/docs/LandingPage.md index 943512f..4526d9c 100644 --- a/docs/LandingPage.md +++ b/docs/LandingPage.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | [optional] -**description** | **str** | | [optional] -**attribution** | **str** | | [optional] -**links** | [**List[Link]**](Link.md) | | +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**attribution** | **str** | | [optional] +**links** | [**List[Link]**](Link.md) | | ## Example @@ -28,5 +28,3 @@ landing_page_dict = landing_page_instance.to_dict() landing_page_from_dict = LandingPage.from_dict(landing_page_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Link.md b/docs/Link.md index 6cfa956..5c6f9d9 100644 --- a/docs/Link.md +++ b/docs/Link.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**href** | **str** | | -**rel** | **str** | | [optional] -**type** | **str** | | [optional] -**hreflang** | **str** | | [optional] -**title** | **str** | | [optional] +**href** | **str** | | +**rel** | **str** | | [optional] +**type** | **str** | | [optional] +**hreflang** | **str** | | [optional] +**title** | **str** | | [optional] ## Example @@ -29,5 +29,3 @@ link_dict = link_instance.to_dict() link_from_dict = Link.from_dict(link_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Metadata.md b/docs/Metadata.md index f42522b..518964e 100644 --- a/docs/Metadata.md +++ b/docs/Metadata.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**href** | **str** | | -**rel** | **str** | | [optional] -**type** | **str** | | [optional] -**hreflang** | **str** | | [optional] -**title** | **str** | | [optional] -**role** | **str** | | [optional] -**lang** | **str** | | [optional] -**value** | [**Value**](Value.md) | | [optional] +**href** | **str** | | +**rel** | **str** | | [optional] +**type** | **str** | | [optional] +**hreflang** | **str** | | [optional] +**title** | **str** | | [optional] +**role** | **str** | | [optional] +**lang** | **str** | | [optional] +**value** | [**Value**](Value.md) | | [optional] ## Example @@ -32,5 +32,3 @@ metadata_dict = metadata_instance.to_dict() metadata_from_dict = Metadata.from_dict(metadata_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Metadata1.md b/docs/Metadata1.md index 18e250f..86870a4 100644 --- a/docs/Metadata1.md +++ b/docs/Metadata1.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**href** | **str** | | -**rel** | **str** | | [optional] -**type** | **str** | | [optional] -**hreflang** | **str** | | [optional] -**title** | **str** | | [optional] -**role** | **str** | | [optional] +**href** | **str** | | +**rel** | **str** | | [optional] +**type** | **str** | | [optional] +**hreflang** | **str** | | [optional] +**title** | **str** | | [optional] +**role** | **str** | | [optional] ## Example @@ -30,5 +30,3 @@ metadata1_dict = metadata1_instance.to_dict() metadata1_from_dict = Metadata1.from_dict(metadata1_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Metadata2.md b/docs/Metadata2.md index 56bada1..0c9ea36 100644 --- a/docs/Metadata2.md +++ b/docs/Metadata2.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**role** | **str** | | [optional] -**title** | **str** | | [optional] -**lang** | **str** | | [optional] -**value** | [**Value**](Value.md) | | [optional] +**role** | **str** | | [optional] +**title** | **str** | | [optional] +**lang** | **str** | | [optional] +**value** | [**Value**](Value.md) | | [optional] ## Example @@ -28,5 +28,3 @@ metadata2_dict = metadata2_instance.to_dict() metadata2_from_dict = Metadata2.from_dict(metadata2_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProcessInput.md b/docs/ProcessInput.md index 20401f6..673fd96 100644 --- a/docs/ProcessInput.md +++ b/docs/ProcessInput.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | [optional] -**description** | **str** | | [optional] -**keywords** | **List[str]** | | [optional] -**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] -**id** | **str** | | -**version** | **str** | | -**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] -**links** | [**List[Link]**](Link.md) | | [optional] -**inputs** | [**List[InputValueInput]**](InputValueInput.md) | | [optional] -**outputs** | [**List[InputValueInput]**](InputValueInput.md) | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**keywords** | **List[str]** | | [optional] +**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] +**id** | **str** | | +**version** | **str** | | +**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] +**links** | [**List[Link]**](Link.md) | | [optional] +**inputs** | [**List[InputValueInput]**](InputValueInput.md) | | [optional] +**outputs** | [**List[InputValueInput]**](InputValueInput.md) | | [optional] ## Example @@ -34,5 +34,3 @@ process_input_dict = process_input_instance.to_dict() process_input_from_dict = ProcessInput.from_dict(process_input_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProcessList.md b/docs/ProcessList.md index 5e781a7..46181c2 100644 --- a/docs/ProcessList.md +++ b/docs/ProcessList.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**processes** | [**List[ProcessSummary]**](ProcessSummary.md) | | -**links** | [**List[Link]**](Link.md) | | +**processes** | [**List[ProcessSummary]**](ProcessSummary.md) | | +**links** | [**List[Link]**](Link.md) | | ## Example @@ -26,5 +26,3 @@ process_list_dict = process_list_instance.to_dict() process_list_from_dict = ProcessList.from_dict(process_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProcessOutput.md b/docs/ProcessOutput.md index e53e797..1417086 100644 --- a/docs/ProcessOutput.md +++ b/docs/ProcessOutput.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | [optional] -**description** | **str** | | [optional] -**keywords** | **List[str]** | | [optional] -**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] -**id** | **str** | | -**version** | **str** | | -**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] -**links** | [**List[Link]**](Link.md) | | [optional] -**inputs** | [**List[InputValueOutput]**](InputValueOutput.md) | | [optional] -**outputs** | [**List[InputValueOutput]**](InputValueOutput.md) | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**keywords** | **List[str]** | | [optional] +**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] +**id** | **str** | | +**version** | **str** | | +**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] +**links** | [**List[Link]**](Link.md) | | [optional] +**inputs** | [**List[InputValueOutput]**](InputValueOutput.md) | | [optional] +**outputs** | [**List[InputValueOutput]**](InputValueOutput.md) | | [optional] ## Example @@ -34,5 +34,3 @@ process_output_dict = process_output_instance.to_dict() process_output_from_dict = ProcessOutput.from_dict(process_output_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProcessSummary.md b/docs/ProcessSummary.md index c467c73..950c198 100644 --- a/docs/ProcessSummary.md +++ b/docs/ProcessSummary.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | [optional] -**description** | **str** | | [optional] -**keywords** | **List[str]** | | [optional] -**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] -**id** | **str** | | -**version** | **str** | | -**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] -**links** | [**List[Link]**](Link.md) | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**keywords** | **List[str]** | | [optional] +**metadata** | [**List[Metadata]**](Metadata.md) | | [optional] +**id** | **str** | | +**version** | **str** | | +**job_control_options** | [**List[JobControlOptions]**](JobControlOptions.md) | | [optional] +**links** | [**List[Link]**](Link.md) | | [optional] ## Example @@ -32,5 +32,3 @@ process_summary_dict = process_summary_instance.to_dict() process_summary_from_dict = ProcessSummary.from_dict(process_summary_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Status.md b/docs/Status.md index 7cd727a..537f17f 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -24,5 +24,3 @@ status_dict = status_instance.to_dict() status_from_dict = Status.from_dict(status_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StatusCode.md b/docs/StatusCode.md index b90bd03..3f56325 100644 --- a/docs/StatusCode.md +++ b/docs/StatusCode.md @@ -7,5 +7,3 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StatusInfo.md b/docs/StatusInfo.md index 8a3229b..4900c6d 100644 --- a/docs/StatusInfo.md +++ b/docs/StatusInfo.md @@ -5,18 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**process_id** | **str** | | [optional] -**type** | **object** | | -**job_id** | **str** | | -**status** | [**StatusCode**](StatusCode.md) | | -**message** | **str** | | [optional] -**exception** | [**Exception**](Exception.md) | | [optional] -**created** | **datetime** | | [optional] -**started** | **datetime** | | [optional] -**finished** | **datetime** | | [optional] -**updated** | **datetime** | | [optional] -**progress** | **int** | | [optional] -**links** | [**List[Link]**](Link.md) | | [optional] +**process_id** | **str** | | [optional] +**type** | **object** | | +**job_id** | **str** | | +**status** | [**StatusCode**](StatusCode.md) | | +**message** | **str** | | [optional] +**exception** | [**Exception**](Exception.md) | | [optional] +**created** | **datetime** | | [optional] +**started** | **datetime** | | [optional] +**finished** | **datetime** | | [optional] +**updated** | **datetime** | | [optional] +**progress** | **int** | | [optional] +**links** | [**List[Link]**](Link.md) | | [optional] ## Example @@ -36,5 +36,3 @@ status_info_dict = status_info_instance.to_dict() status_info_from_dict = StatusInfo.from_dict(status_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Subscriber.md b/docs/Subscriber.md index 0c968e4..ea39080 100644 --- a/docs/Subscriber.md +++ b/docs/Subscriber.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success_uri** | **str** | | -**in_progress_uri** | **str** | | [optional] -**failed_uri** | **str** | | [optional] +**success_uri** | **str** | | +**in_progress_uri** | **str** | | [optional] +**failed_uri** | **str** | | [optional] ## Example @@ -27,5 +27,3 @@ subscriber_dict = subscriber_instance.to_dict() subscriber_from_dict = Subscriber.from_dict(subscriber_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Title.md b/docs/Title.md index 7364868..5d922a5 100644 --- a/docs/Title.md +++ b/docs/Title.md @@ -24,5 +24,3 @@ title_dict = title_instance.to_dict() title_from_dict = Title.from_dict(title_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ValidationError.md b/docs/ValidationError.md index 5da509a..3350a4a 100644 --- a/docs/ValidationError.md +++ b/docs/ValidationError.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | -**msg** | **str** | | -**type** | **str** | | +**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | +**msg** | **str** | | +**type** | **str** | | ## Example @@ -27,5 +27,3 @@ validation_error_dict = validation_error_instance.to_dict() validation_error_from_dict = ValidationError.from_dict(validation_error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md index fa9a1bf..637ba16 100644 --- a/docs/ValidationErrorLocInner.md +++ b/docs/ValidationErrorLocInner.md @@ -24,5 +24,3 @@ validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict() validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Value.md b/docs/Value.md index 2ba2496..4218d32 100644 --- a/docs/Value.md +++ b/docs/Value.md @@ -24,5 +24,3 @@ value_dict = value_instance.to_dict() value_from_dict = Value.from_dict(value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/openapi.json b/openapi.json index 9e4b860..ace201d 100644 --- a/openapi.json +++ b/openapi.json @@ -1,1519 +1,1519 @@ { - "openapi": "3.1.0", - "info": { - "title": "Unity Processing API conforming to the OGC API - Processes - Part 1 standard", - "description": "This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application.", - "version": "1.0.0" - }, - "paths": { - "/": { - "get": { - "summary": "Landing page of this API", - "description": "The landing page provides links to the:\n- API Definition (no fixed path),\n- Conformance Statements (`/conformance`),\n- Processes Metadata (`/processes`),\n- Endpoint for Job Monitoring (`/jobs`).\n\nFor more information, see [Section 7.2](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_landing_page).", - "operationId": "landing_page__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LandingPage" - } - } - } - } - } - } + "components": { + "schemas": { + "Bbox": { + "properties": { + "bbox": { + "items": { + "type": "number" + }, + "title": "Bbox", + "type": "array" + }, + "crs": { + "anyOf": [ + { + "$ref": "#/components/schemas/Crs5" + }, + { + "format": "uri", + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": "http://www.opengis.net/def/crs/OGC/1.3/CRS84", + "title": "Crs" + } }, - "/health": { - "get": { - "summary": "Perform a Health Check", - "description": "Endpoint to perform a healthcheck on. This endpoint can primarily be used Docker\nto ensure a robust container orchestration and management is in place. Other\nservices which rely on proper functioning of the API service will not deploy if this\nendpoint returns any other HTTP status code except 200 (OK).\nReturns:\n HealthCheck: Returns a JSON response with the health status", - "operationId": "get_health_health_get", - "responses": { - "200": { - "description": "Return HTTP Status Code 200 (OK)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthCheck" - } - } - } - } - } - } + "required": [ + "bbox" + ], + "title": "Bbox", + "type": "object" + }, + "BinaryInputValue": { + "title": "BinaryInputValue", + "type": "string" + }, + "ConfClasses": { + "properties": { + "conformsTo": { + "items": { + "type": "string" + }, + "title": "Conformsto", + "type": "array" + } }, - "/conformance": { - "get": { - "summary": "Information about standards that this API conforms to", - "description": "A list of all conformance classes, specified in a standard, that the server conforms to.\n\n| Conformance class | URI |\n| -------- | ------- |\n| Core | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core |\n| OGC Process Description | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/ogc-process-description |\n| JSON | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json |\n| HTML | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html |\n| OpenAPI | Specification 3.0 http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30 |\n| Job list | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/job-list |\n| Callback | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/callback |\n| Dismiss | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/dismiss |\n\nFor more information, see [Section 7.4](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_conformance_classes).", - "operationId": "conformance_declaration_conformance_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfClasses" - } - } - } - } - } - } + "required": [ + "conformsTo" + ], + "title": "ConfClasses", + "type": "object" + }, + "Crs5": { + "enum": [ + "http://www.opengis.net/def/crs/OGC/1.3/CRS84", + "http://www.opengis.net/def/crs/OGC/0/CRS84h" + ], + "title": "Crs5", + "type": "string" + }, + "Exception": { + "additionalProperties": true, + "properties": { + "detail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Detail" + }, + "instance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Instance" + }, + "status": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Status" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "title": "Type", + "type": "string" + } }, - "/processes": { - "get": { - "summary": "Retrieve the list of available processes", - "description": "The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process.\n\nFor more information, see [Section 7.9](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_list).", - "operationId": "process_list_processes_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessList" - } - } - } - } - } - }, - "post": { - "summary": "Deploy a process", - "description": "Deploy a new process.\n\n**Note:** This is not an officially supported endpoint in the OGC Processes specification.", - "operationId": "deploy_process_processes_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process-Input" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process-Output" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } + "required": [ + "type" + ], + "title": "Exception", + "type": "object" + }, + "Execute": { + "properties": { + "inputs": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Inputs" + }, + "outputs": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Outputs" + }, + "subscriber": { + "anyOf": [ + { + "$ref": "#/components/schemas/Subscriber" + }, + { + "type": "null" + } + ] + } }, - "/processes/{process_id}": { - "delete": { - "summary": "Undeploy a process", - "description": "Undeploy an existing process.\n\n**Note:** This is not an officially supported endpoint in the OGC Processes specification.", - "operationId": "undeploy_process_processes__process_id__delete", - "parameters": [ - { - "name": "process_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Process Id" - } - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } + "title": "Execute", + "type": "object" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" }, - "get": { - "summary": "Retrieve a process description", - "description": "The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation:\n\nImplementations SHOULD consider supporting the OGC process description.\n\nFor more information, see [Section 7.10](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_description).", - "operationId": "process_description_processes__process_id__get", - "parameters": [ - { - "name": "process_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Process Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process-Output" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } + "title": "Detail", + "type": "array" + } }, - "/jobs": { - "get": { - "summary": "Retrieve the list of jobs", - "description": "Lists available jobs.\n\nFor more information, see [Section 11](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_job_list).", - "operationId": "job_list_jobs_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobList" - } - } - } - } - } - } + "title": "HTTPValidationError", + "type": "object" + }, + "HealthCheck": { + "description": "Response model to validate and return when performing a health check.", + "properties": { + "status": { + "default": "OK", + "title": "Status", + "type": "string" + } }, - "/processes/{process_id}/execution": { - "post": { - "summary": "Execute a process", - "description": "Create a new job.\n\nFor more information, see [Section 7.11](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_create_job).", - "operationId": "execute_processes__process_id__execution_post", - "parameters": [ - { - "name": "process_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Process Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Execute" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusInfo" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } + "title": "HealthCheck", + "type": "object" + }, + "InputValue-Input": { + "anyOf": [ + { + "$ref": "#/components/schemas/InputValueNoObject-Input" + }, + { + "type": "object" + } + ], + "title": "InputValue" + }, + "InputValue-Output": { + "anyOf": [ + { + "$ref": "#/components/schemas/InputValueNoObject-Output" + }, + { + "type": "object" + } + ], + "title": "InputValue" + }, + "InputValueNoObject-Input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "items": {}, + "type": "array" + }, + { + "$ref": "#/components/schemas/BinaryInputValue" + }, + { + "$ref": "#/components/schemas/Bbox" + } + ], + "title": "InputValueNoObject" + }, + "InputValueNoObject-Output": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "items": {}, + "type": "array" + }, + { + "$ref": "#/components/schemas/BinaryInputValue" + }, + { + "$ref": "#/components/schemas/Bbox" + } + ], + "title": "InputValueNoObject" + }, + "JobControlOptions": { + "enum": [ + "sync-execute", + "async-execute", + "dismiss" + ], + "title": "JobControlOptions", + "type": "string" + }, + "JobList": { + "properties": { + "jobs": { + "items": { + "$ref": "#/components/schemas/StatusInfo" + }, + "title": "Jobs", + "type": "array" + }, + "links": { + "items": { + "$ref": "#/components/schemas/Link" + }, + "title": "Links", + "type": "array" + } }, - "/jobs/{job_id}": { - "get": { - "summary": "Retrieve the status of a job", - "description": "Shows the status of a job.\n\nFor more information, see [Section 7.12](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_retrieve_status_info).", - "operationId": "status_jobs__job_id__get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusInfo" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } + "required": [ + "jobs", + "links" + ], + "title": "JobList", + "type": "object" + }, + "LandingPage": { + "properties": { + "attribution": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The `attribution` should be short and intended for presentation to a user, for example, in a corner of a map. Parts of the text can be links to other resources if additional information is needed. The string can include HTML markup.", + "title": "attribution for the Processes API" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "Example server implementing the OGC API - Processes 1.0 Standard", + "title": "Description" + }, + "links": { + "items": { + "$ref": "#/components/schemas/Link" }, - "delete": { - "summary": "Cancel a job execution, remove a finished job", - "description": "Cancel a job execution and remove it from the jobs list.\n\nFor more information, see [Section 13](https://docs.ogc.org/is/18-062r2/18-062r2.html#Dismiss).", - "operationId": "dismiss_jobs__job_id__delete", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusInfo" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } + "title": "Links", + "type": "array" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "Example processing server", + "title": "Title" + } }, - "/jobs/{job_id}/results": { - "get": { - "summary": "Retrieve the result(s) of a job", - "description": "Lists available results of a job. In case of a failure, lists exceptions instead.\n\nFor more information, see [Section 7.13](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_retrieve_job_results).", - "operationId": "results_jobs__job_id__results_get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Job Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Results" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } + "required": [ + "links" + ], + "title": "LandingPage", + "type": "object" + }, + "Link": { + "properties": { + "href": { + "title": "Href", + "type": "string" + }, + "hreflang": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "en", + "title": "Hreflang" + }, + "rel": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "service", + "title": "Rel" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "application/json", + "title": "Type" + } }, - "schemas": { - "Bbox": { - "properties": { - "bbox": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Bbox" - }, - "crs": { - "anyOf": [ - { - "$ref": "#/components/schemas/Crs5" - }, - { - "type": "string", - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Crs", - "default": "http://www.opengis.net/def/crs/OGC/1.3/CRS84" - } + "required": [ + "href" + ], + "title": "Link", + "type": "object" + }, + "Metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/Metadata1" + }, + { + "$ref": "#/components/schemas/Metadata2" + } + ], + "title": "Metadata" + }, + "Metadata1": { + "properties": { + "href": { + "title": "Href", + "type": "string" + }, + "hreflang": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "en", + "title": "Hreflang" + }, + "rel": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "service", + "title": "Rel" + }, + "role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Role" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "example": "application/json", + "title": "Type" + } + }, + "required": [ + "href" + ], + "title": "Metadata1", + "type": "object" + }, + "Metadata2": { + "properties": { + "lang": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Lang" + }, + "role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Role" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Value" + } + }, + "title": "Metadata2", + "type": "object" + }, + "Process-Input": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "id": { + "title": "Id", + "type": "string" + }, + "inputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/InputValue-Input" }, - "type": "object", - "required": [ - "bbox" - ], - "title": "Bbox" - }, - "BinaryInputValue": { - "type": "string", - "title": "BinaryInputValue" - }, - "ConfClasses": { - "properties": { - "conformsTo": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Conformsto" - } + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Inputs" + }, + "jobControlOptions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/JobControlOptions" }, - "type": "object", - "required": [ - "conformsTo" - ], - "title": "ConfClasses" - }, - "Crs5": { - "type": "string", - "enum": [ - "http://www.opengis.net/def/crs/OGC/1.3/CRS84", - "http://www.opengis.net/def/crs/OGC/0/CRS84h" - ], - "title": "Crs5" - }, - "Exception": { - "properties": { - "type": { - "type": "string", - "title": "Type" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Status" - }, - "detail": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Detail" - }, - "instance": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Instance" - } + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Jobcontroloptions" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" }, - "additionalProperties": true, - "type": "object", - "required": [ - "type" - ], - "title": "Exception" - }, - "Execute": { - "properties": { - "inputs": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Inputs" - }, - "outputs": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Outputs" - }, - "subscriber": { - "anyOf": [ - { - "$ref": "#/components/schemas/Subscriber" - }, - { - "type": "null" - } - ] - } + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Link" }, - "type": "object", - "title": "Execute" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "metadata": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Metadata" }, - "type": "object", - "title": "HTTPValidationError" - }, - "HealthCheck": { - "properties": { - "status": { - "type": "string", - "title": "Status", - "default": "OK" - } + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "outputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/InputValue-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Outputs" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "required": [ + "id", + "version" + ], + "title": "Process", + "type": "object" + }, + "Process-Output": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "id": { + "title": "Id", + "type": "string" + }, + "inputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/InputValue-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Inputs" + }, + "jobControlOptions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/JobControlOptions" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Jobcontroloptions" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Link" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "metadata": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Metadata" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "outputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/InputValue-Output" }, - "type": "object", - "title": "HealthCheck", - "description": "Response model to validate and return when performing a health check." + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Outputs" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "required": [ + "id", + "version" + ], + "title": "Process", + "type": "object" + }, + "ProcessList": { + "properties": { + "links": { + "items": { + "$ref": "#/components/schemas/Link" }, - "InputValue-Input": { - "anyOf": [ - { - "$ref": "#/components/schemas/InputValueNoObject-Input" - }, - { - "type": "object" - } - ], - "title": "InputValue" + "title": "Links", + "type": "array" + }, + "processes": { + "items": { + "$ref": "#/components/schemas/ProcessSummary" }, - "InputValue-Output": { - "anyOf": [ - { - "$ref": "#/components/schemas/InputValueNoObject-Output" - }, - { - "type": "object" - } - ], - "title": "InputValue" + "title": "Processes", + "type": "array" + } + }, + "required": [ + "processes", + "links" + ], + "title": "ProcessList", + "type": "object" + }, + "ProcessSummary": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "id": { + "title": "Id", + "type": "string" + }, + "jobControlOptions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/JobControlOptions" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Jobcontroloptions" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Link" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "metadata": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Metadata" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "required": [ + "id", + "version" + ], + "title": "ProcessSummary", + "type": "object" + }, + "Results": { + "title": "Results" + }, + "StatusCode": { + "enum": [ + "accepted", + "running", + "successful", + "failed", + "dismissed" + ], + "title": "StatusCode", + "type": "string" + }, + "StatusInfo": { + "properties": { + "created": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created" + }, + "exception": { + "anyOf": [ + { + "$ref": "#/components/schemas/Exception" + }, + { + "type": "null" + } + ] + }, + "finished": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Finished" + }, + "jobID": { + "title": "Jobid", + "type": "string" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Link" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "processID": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Processid" + }, + "progress": { + "anyOf": [ + { + "maximum": 100.0, + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Progress" + }, + "started": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Started" + }, + "status": { + "$ref": "#/components/schemas/StatusCode" + }, + "type": { + "$ref": "#/components/schemas/Type2" + }, + "updated": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated" + } + }, + "required": [ + "type", + "jobID", + "status" + ], + "title": "StatusInfo", + "type": "object" + }, + "Subscriber": { + "properties": { + "failedUri": { + "anyOf": [ + { + "format": "uri", + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Faileduri" + }, + "inProgressUri": { + "anyOf": [ + { + "format": "uri", + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inprogressuri" + }, + "successUri": { + "format": "uri", + "minLength": 1, + "title": "Successuri", + "type": "string" + } + }, + "required": [ + "successUri" + ], + "title": "Subscriber", + "type": "object" + }, + "Type2": { + "const": "process", + "title": "Type2" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] }, - "InputValueNoObject-Input": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "boolean" - }, - { - "items": {}, - "type": "array" - }, - { - "$ref": "#/components/schemas/BinaryInputValue" - }, - { - "$ref": "#/components/schemas/Bbox" - } - ], - "title": "InputValueNoObject" + "title": "Location", + "type": "array" + }, + "msg": { + "title": "Message", + "type": "string" + }, + "type": { + "title": "Error Type", + "type": "string" + } + }, + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError", + "type": "object" + } + }, + "securitySchemes": { + "bearerAuth": { + "bearerFormat": "JWT", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "description": "This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application.", + "title": "Unity Processing API conforming to the OGC API - Processes - Part 1 standard", + "version": "1.0.0" + }, + "openapi": "3.1.0", + "paths": { + "/": { + "get": { + "description": "The landing page provides links to the:\n- API Definition (no fixed path),\n- Conformance Statements (`/conformance`),\n- Processes Metadata (`/processes`),\n- Endpoint for Job Monitoring (`/jobs`).\n\nFor more information, see [Section 7.2](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_landing_page).", + "operationId": "landing_page__get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LandingPage" + } + } }, - "InputValueNoObject-Output": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "boolean" - }, - { - "items": {}, - "type": "array" - }, - { - "$ref": "#/components/schemas/BinaryInputValue" - }, - { - "$ref": "#/components/schemas/Bbox" - } - ], - "title": "InputValueNoObject" + "description": "Successful Response" + } + }, + "summary": "Landing page of this API" + } + }, + "/conformance": { + "get": { + "description": "A list of all conformance classes, specified in a standard, that the server conforms to.\n\n| Conformance class | URI |\n| -------- | ------- |\n| Core | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core |\n| OGC Process Description | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/ogc-process-description |\n| JSON | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json |\n| HTML | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html |\n| OpenAPI | Specification 3.0 http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30 |\n| Job list | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/job-list |\n| Callback | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/callback |\n| Dismiss | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/dismiss |\n\nFor more information, see [Section 7.4](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_conformance_classes).", + "operationId": "conformance_declaration_conformance_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfClasses" + } + } }, - "JobControlOptions": { - "type": "string", - "enum": [ - "sync-execute", - "async-execute", - "dismiss" - ], - "title": "JobControlOptions" + "description": "Successful Response" + } + }, + "summary": "Information about standards that this API conforms to" + } + }, + "/health": { + "get": { + "description": "Endpoint to perform a healthcheck on. This endpoint can primarily be used Docker\nto ensure a robust container orchestration and management is in place. Other\nservices which rely on proper functioning of the API service will not deploy if this\nendpoint returns any other HTTP status code except 200 (OK).\nReturns:\n HealthCheck: Returns a JSON response with the health status", + "operationId": "get_health_health_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthCheck" + } + } }, - "JobList": { - "properties": { - "jobs": { - "items": { - "$ref": "#/components/schemas/StatusInfo" - }, - "type": "array", - "title": "Jobs" - }, - "links": { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "title": "Links" - } - }, - "type": "object", - "required": [ - "jobs", - "links" - ], - "title": "JobList" + "description": "Return HTTP Status Code 200 (OK)" + } + }, + "summary": "Perform a Health Check" + } + }, + "/jobs": { + "get": { + "description": "Lists available jobs.\n\nFor more information, see [Section 11](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_job_list).", + "operationId": "job_list_jobs_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobList" + } + } }, - "LandingPage": { - "properties": { - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title", - "example": "Example processing server" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "example": "Example server implementing the OGC API - Processes 1.0 Standard" - }, - "attribution": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "attribution for the Processes API", - "description": "The `attribution` should be short and intended for presentation to a user, for example, in a corner of a map. Parts of the text can be links to other resources if additional information is needed. The string can include HTML markup." - }, - "links": { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "title": "Links" - } - }, - "type": "object", - "required": [ - "links" - ], - "title": "LandingPage" + "description": "Successful Response" + } + }, + "summary": "Retrieve the list of jobs" + } + }, + "/jobs/{job_id}": { + "delete": { + "description": "Cancel a job execution and remove it from the jobs list.\n\nFor more information, see [Section 13](https://docs.ogc.org/is/18-062r2/18-062r2.html#Dismiss).", + "operationId": "dismiss_jobs__job_id__delete", + "parameters": [ + { + "in": "path", + "name": "job_id", + "required": true, + "schema": { + "title": "Job Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusInfo" + } + } }, - "Link": { - "properties": { - "href": { - "type": "string", - "title": "Href" - }, - "rel": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Rel", - "example": "service" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Type", - "example": "application/json" - }, - "hreflang": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Hreflang", - "example": "en" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - } - }, - "type": "object", - "required": [ - "href" - ], - "title": "Link" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "Metadata": { - "anyOf": [ - { - "$ref": "#/components/schemas/Metadata1" - }, - { - "$ref": "#/components/schemas/Metadata2" - } - ], - "title": "Metadata" + "description": "Validation Error" + } + }, + "summary": "Cancel a job execution, remove a finished job" + }, + "get": { + "description": "Shows the status of a job.\n\nFor more information, see [Section 7.12](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_retrieve_status_info).", + "operationId": "status_jobs__job_id__get", + "parameters": [ + { + "in": "path", + "name": "job_id", + "required": true, + "schema": { + "title": "Job Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusInfo" + } + } }, - "Metadata1": { - "properties": { - "href": { - "type": "string", - "title": "Href" - }, - "rel": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Rel", - "example": "service" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Type", - "example": "application/json" - }, - "hreflang": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Hreflang", - "example": "en" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "role": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Role" - } - }, - "type": "object", - "required": [ - "href" - ], - "title": "Metadata1" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "Metadata2": { - "properties": { - "role": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Role" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "lang": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Lang" - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Value" - } - }, - "type": "object", - "title": "Metadata2" + "description": "Validation Error" + } + }, + "summary": "Retrieve the status of a job" + } + }, + "/jobs/{job_id}/results": { + "get": { + "description": "Lists available results of a job. In case of a failure, lists exceptions instead.\n\nFor more information, see [Section 7.13](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_retrieve_job_results).", + "operationId": "results_jobs__job_id__results_get", + "parameters": [ + { + "in": "path", + "name": "job_id", + "required": true, + "schema": { + "title": "Job Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Results" + } + } }, - "Process-Input": { - "properties": { - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "keywords": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Keywords" - }, - "metadata": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Metadata" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "id": { - "type": "string", - "title": "Id" - }, - "version": { - "type": "string", - "title": "Version" - }, - "jobControlOptions": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/JobControlOptions" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Jobcontroloptions" - }, - "links": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links" - }, - "inputs": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/InputValue-Input" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Inputs" - }, - "outputs": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/InputValue-Input" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Outputs" - } - }, - "type": "object", - "required": [ - "id", - "version" - ], - "title": "Process" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "Process-Output": { - "properties": { - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "keywords": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Keywords" - }, - "metadata": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Metadata" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "id": { - "type": "string", - "title": "Id" - }, - "version": { - "type": "string", - "title": "Version" - }, - "jobControlOptions": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/JobControlOptions" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Jobcontroloptions" - }, - "links": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links" - }, - "inputs": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/InputValue-Output" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Inputs" - }, - "outputs": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/InputValue-Output" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Outputs" - } - }, - "type": "object", - "required": [ - "id", - "version" - ], - "title": "Process" + "description": "Validation Error" + } + }, + "summary": "Retrieve the result(s) of a job" + } + }, + "/processes": { + "get": { + "description": "The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process.\n\nFor more information, see [Section 7.9](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_list).", + "operationId": "process_list_processes_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessList" + } + } }, - "ProcessList": { - "properties": { - "processes": { - "items": { - "$ref": "#/components/schemas/ProcessSummary" - }, - "type": "array", - "title": "Processes" - }, - "links": { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "title": "Links" - } - }, - "type": "object", - "required": [ - "processes", - "links" - ], - "title": "ProcessList" + "description": "Successful Response" + } + }, + "summary": "Retrieve the list of available processes" + }, + "post": { + "description": "Deploy a new process.\n\n**Note:** This is not an officially supported endpoint in the OGC Processes specification.", + "operationId": "deploy_process_processes_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Process-Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Process-Output" + } + } }, - "ProcessSummary": { - "properties": { - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "keywords": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Keywords" - }, - "metadata": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Metadata" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "id": { - "type": "string", - "title": "Id" - }, - "version": { - "type": "string", - "title": "Version" - }, - "jobControlOptions": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/JobControlOptions" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Jobcontroloptions" - }, - "links": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links" - } - }, - "type": "object", - "required": [ - "id", - "version" - ], - "title": "ProcessSummary" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "Results": { - "title": "Results" + "description": "Validation Error" + } + }, + "summary": "Deploy a process" + } + }, + "/processes/{process_id}": { + "delete": { + "description": "Undeploy an existing process.\n\n**Note:** This is not an officially supported endpoint in the OGC Processes specification.", + "operationId": "undeploy_process_processes__process_id__delete", + "parameters": [ + { + "in": "path", + "name": "process_id", + "required": true, + "schema": { + "title": "Process Id", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "StatusCode": { - "type": "string", - "enum": [ - "accepted", - "running", - "successful", - "failed", - "dismissed" - ], - "title": "StatusCode" + "description": "Validation Error" + } + }, + "summary": "Undeploy a process" + }, + "get": { + "description": "The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation:\n\nImplementations SHOULD consider supporting the OGC process description.\n\nFor more information, see [Section 7.10](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_description).", + "operationId": "process_description_processes__process_id__get", + "parameters": [ + { + "in": "path", + "name": "process_id", + "required": true, + "schema": { + "title": "Process Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Process-Output" + } + } }, - "StatusInfo": { - "properties": { - "processID": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Processid" - }, - "type": { - "$ref": "#/components/schemas/Type2" - }, - "jobID": { - "type": "string", - "title": "Jobid" - }, - "status": { - "$ref": "#/components/schemas/StatusCode" - }, - "message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Message" - }, - "exception": { - "anyOf": [ - { - "$ref": "#/components/schemas/Exception" - }, - { - "type": "null" - } - ] - }, - "created": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Created" - }, - "started": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started" - }, - "finished": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Finished" - }, - "updated": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Updated" - }, - "progress": { - "anyOf": [ - { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Progress" - }, - "links": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links" - } - }, - "type": "object", - "required": [ - "type", - "jobID", - "status" - ], - "title": "StatusInfo" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "Subscriber": { - "properties": { - "successUri": { - "type": "string", - "minLength": 1, - "format": "uri", - "title": "Successuri" - }, - "inProgressUri": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Inprogressuri" - }, - "failedUri": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Faileduri" - } - }, - "type": "object", - "required": [ - "successUri" - ], - "title": "Subscriber" + "description": "Validation Error" + } + }, + "summary": "Retrieve a process description" + } + }, + "/processes/{process_id}/execution": { + "post": { + "description": "Create a new job.\n\nFor more information, see [Section 7.11](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_create_job).", + "operationId": "execute_processes__process_id__execution_post", + "parameters": [ + { + "in": "path", + "name": "process_id", + "required": true, + "schema": { + "title": "Process Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Execute" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusInfo" + } + } }, - "Type2": { - "const": "process", - "title": "Type2" + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - } - } - }, - "security": [ - { - "bearerAuth": [] - } - ] + "description": "Validation Error" + } + }, + "summary": "Execute a process" + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] } diff --git a/requirements.txt b/requirements.txt index cc85509..80776ee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ +pydantic >= 2 python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 2 typing-extensions >= 4.7.1 +urllib3 >= 1.25.3, < 2.1.0 diff --git a/setup.py b/setup.py index 90e6ab7..5c242bd 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ """ # noqa: E501 -from setuptools import setup, find_packages # noqa: H301 +from setuptools import find_packages, setup # noqa: H301 # To install the library, run the following # @@ -37,11 +37,15 @@ author="OpenAPI Generator community", author_email="team@openapitools.org", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Unity Processing API conforming to the OGC API - Processes - Part 1 standard"], + keywords=[ + "OpenAPI", + "OpenAPI-Generator", + "Unity Processing API conforming to the OGC API - Processes - Part 1 standard", + ], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", long_description="""\ This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application. """, # noqa: E501 diff --git a/test-requirements.txt b/test-requirements.txt index 8e6d8cb..9c375f0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ +mypy>=1.4.1 pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 -mypy>=1.4.1 types-python-dateutil>=2.8.19 diff --git a/test/test_bbox.py b/test/test_bbox.py index 5e623a9..08e82f7 100644 --- a/test/test_bbox.py +++ b/test/test_bbox.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.bbox import Bbox + class TestBbox(unittest.TestCase): """Bbox unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Bbox: """Test Bbox - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Bbox` """ model = Bbox() @@ -53,5 +54,6 @@ def testBbox(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_conf_classes.py b/test/test_conf_classes.py index 3c04b91..a56d6f0 100644 --- a/test/test_conf_classes.py +++ b/test/test_conf_classes.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.conf_classes import ConfClasses + class TestConfClasses(unittest.TestCase): """ConfClasses unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ConfClasses: """Test ConfClasses - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ConfClasses` """ model = ConfClasses() @@ -52,5 +53,6 @@ def testConfClasses(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_crs.py b/test/test_crs.py index 6218cb8..3560d43 100644 --- a/test/test_crs.py +++ b/test/test_crs.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.crs import Crs + class TestCrs(unittest.TestCase): """Crs unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Crs: """Test Crs - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Crs` """ model = Crs() @@ -46,5 +47,6 @@ def testCrs(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_crs5.py b/test/test_crs5.py index 7d74f30..4607023 100644 --- a/test/test_crs5.py +++ b/test/test_crs5.py @@ -14,7 +14,6 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.crs5 import Crs5 class TestCrs5(unittest.TestCase): """Crs5 unit test stubs""" @@ -29,5 +28,6 @@ def testCrs5(self): """Test Crs5""" # inst = Crs5() -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_default_api.py b/test/test_default_api.py index a863c95..b305369 100644 --- a/test/test_default_api.py +++ b/test/test_default_api.py @@ -111,5 +111,5 @@ def test_unregister_process_processes_process_id_delete(self) -> None: pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/test_detail.py b/test/test_detail.py index e39c75a..227a504 100644 --- a/test/test_detail.py +++ b/test/test_detail.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.detail import Detail + class TestDetail(unittest.TestCase): """Detail unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Detail: """Test Detail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Detail` """ model = Detail() @@ -46,5 +47,6 @@ def testDetail(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_exception.py b/test/test_exception.py index ef0fc4b..7cec37a 100644 --- a/test/test_exception.py +++ b/test/test_exception.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.exception import Exception + class TestException(unittest.TestCase): """Exception unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Exception: """Test Exception - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Exception` """ model = Exception() @@ -52,5 +53,6 @@ def testException(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_execute.py b/test/test_execute.py index 67cc8e9..c520646 100644 --- a/test/test_execute.py +++ b/test/test_execute.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.execute import Execute + class TestExecute(unittest.TestCase): """Execute unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Execute: """Test Execute - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Execute` """ model = Execute() @@ -38,8 +39,8 @@ def make_instance(self, include_optional) -> Execute: inputs = None, outputs = None, subscriber = unity_sps_ogc_processes_api_python_client.models.subscriber.Subscriber( - success_uri = '0', - in_progress_uri = '0', + success_uri = '0', + in_progress_uri = '0', failed_uri = '0', ) ) else: @@ -52,5 +53,6 @@ def testExecute(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_health_check.py b/test/test_health_check.py index 96d7f9f..c577aa1 100644 --- a/test/test_health_check.py +++ b/test/test_health_check.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.health_check import HealthCheck + class TestHealthCheck(unittest.TestCase): """HealthCheck unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> HealthCheck: """Test HealthCheck - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `HealthCheck` """ model = HealthCheck() @@ -47,5 +48,6 @@ def testHealthCheck(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py index 86d904a..45a493c 100644 --- a/test/test_http_validation_error.py +++ b/test/test_http_validation_error.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.http_validation_error import HTTPValidationError +from unity_sps_ogc_processes_api_python_client.models.http_validation_error import ( + HTTPValidationError, +) + class TestHTTPValidationError(unittest.TestCase): """HTTPValidationError unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> HTTPValidationError: """Test HTTPValidationError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `HTTPValidationError` """ model = HTTPValidationError() @@ -39,8 +42,8 @@ def make_instance(self, include_optional) -> HTTPValidationError: unity_sps_ogc_processes_api_python_client.models.validation_error.ValidationError( loc = [ null - ], - msg = '', + ], + msg = '', type = '', ) ] ) @@ -54,5 +57,6 @@ def testHTTPValidationError(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_input_value_input.py b/test/test_input_value_input.py index 00d777d..9038947 100644 --- a/test/test_input_value_input.py +++ b/test/test_input_value_input.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.input_value_input import InputValueInput +from unity_sps_ogc_processes_api_python_client.models.input_value_input import ( + InputValueInput, +) + class TestInputValueInput(unittest.TestCase): """InputValueInput unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> InputValueInput: """Test InputValueInput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `InputValueInput` """ model = InputValueInput() @@ -53,5 +56,6 @@ def testInputValueInput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_input_value_no_object_input.py b/test/test_input_value_no_object_input.py index 8cd5f11..8514d41 100644 --- a/test/test_input_value_no_object_input.py +++ b/test/test_input_value_no_object_input.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import InputValueNoObjectInput +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import ( + InputValueNoObjectInput, +) + class TestInputValueNoObjectInput(unittest.TestCase): """InputValueNoObjectInput unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> InputValueNoObjectInput: """Test InputValueNoObjectInput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `InputValueNoObjectInput` """ model = InputValueNoObjectInput() @@ -53,5 +56,6 @@ def testInputValueNoObjectInput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_input_value_no_object_output.py b/test/test_input_value_no_object_output.py index 6ec0603..8d6f9dd 100644 --- a/test/test_input_value_no_object_output.py +++ b/test/test_input_value_no_object_output.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import InputValueNoObjectOutput +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import ( + InputValueNoObjectOutput, +) + class TestInputValueNoObjectOutput(unittest.TestCase): """InputValueNoObjectOutput unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> InputValueNoObjectOutput: """Test InputValueNoObjectOutput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `InputValueNoObjectOutput` """ model = InputValueNoObjectOutput() @@ -53,5 +56,6 @@ def testInputValueNoObjectOutput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_input_value_output.py b/test/test_input_value_output.py index c36ccf9..49ee606 100644 --- a/test/test_input_value_output.py +++ b/test/test_input_value_output.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.input_value_output import InputValueOutput +from unity_sps_ogc_processes_api_python_client.models.input_value_output import ( + InputValueOutput, +) + class TestInputValueOutput(unittest.TestCase): """InputValueOutput unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> InputValueOutput: """Test InputValueOutput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `InputValueOutput` """ model = InputValueOutput() @@ -53,5 +56,6 @@ def testInputValueOutput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_instance.py b/test/test_instance.py index d69e147..a3b72a4 100644 --- a/test/test_instance.py +++ b/test/test_instance.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.instance import Instance + class TestInstance(unittest.TestCase): """Instance unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Instance: """Test Instance - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Instance` """ model = Instance() @@ -46,5 +47,6 @@ def testInstance(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_job_control_options.py b/test/test_job_control_options.py index 8472698..4404b1a 100644 --- a/test/test_job_control_options.py +++ b/test/test_job_control_options.py @@ -14,7 +14,6 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions class TestJobControlOptions(unittest.TestCase): """JobControlOptions unit test stubs""" @@ -29,5 +28,6 @@ def testJobControlOptions(self): """Test JobControlOptions""" # inst = JobControlOptions() -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_job_list.py b/test/test_job_list.py index 98f4cea..3a63301 100644 --- a/test/test_job_list.py +++ b/test/test_job_list.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.job_list import JobList + class TestJobList(unittest.TestCase): """JobList unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> JobList: """Test JobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `JobList` """ model = JobList() @@ -37,33 +38,33 @@ def make_instance(self, include_optional) -> JobList: return JobList( jobs = [ unity_sps_ogc_processes_api_python_client.models.status_info.StatusInfo( - process_id = '', - type = null, - job_id = '', - status = 'accepted', - message = '', + process_id = '', + type = null, + job_id = '', + status = 'accepted', + message = '', exception = { 'key' : null - }, - created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - started = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - finished = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - progress = 0.0, + }, + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + started = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + finished = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + progress = 0.0, links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - hreflang = '', + href = '', + rel = '', + hreflang = '', title = '', ) ], ) ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ] ) @@ -71,33 +72,33 @@ def make_instance(self, include_optional) -> JobList: return JobList( jobs = [ unity_sps_ogc_processes_api_python_client.models.status_info.StatusInfo( - process_id = '', - type = null, - job_id = '', - status = 'accepted', - message = '', + process_id = '', + type = null, + job_id = '', + status = 'accepted', + message = '', exception = { 'key' : null - }, - created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - started = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - finished = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - progress = 0.0, + }, + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + started = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + finished = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + progress = 0.0, links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - hreflang = '', + href = '', + rel = '', + hreflang = '', title = '', ) ], ) ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], ) @@ -108,5 +109,6 @@ def testJobList(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_landing_page.py b/test/test_landing_page.py index 98f0a7d..d3c053b 100644 --- a/test/test_landing_page.py +++ b/test/test_landing_page.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.landing_page import LandingPage + class TestLandingPage(unittest.TestCase): """LandingPage unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> LandingPage: """Test LandingPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `LandingPage` """ model = LandingPage() @@ -40,10 +41,10 @@ def make_instance(self, include_optional) -> LandingPage: attribution = '', links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ] ) @@ -51,10 +52,10 @@ def make_instance(self, include_optional) -> LandingPage: return LandingPage( links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], ) @@ -65,5 +66,6 @@ def testLandingPage(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_link.py b/test/test_link.py index 8c0076d..73560f4 100644 --- a/test/test_link.py +++ b/test/test_link.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.link import Link + class TestLink(unittest.TestCase): """Link unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Link: """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Link` """ model = Link() @@ -52,5 +53,6 @@ def testLink(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_metadata.py b/test/test_metadata.py index 4eab316..0ee722c 100644 --- a/test/test_metadata.py +++ b/test/test_metadata.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.metadata import Metadata + class TestMetadata(unittest.TestCase): """Metadata unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Metadata: """Test Metadata - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Metadata` """ model = Metadata() @@ -55,5 +56,6 @@ def testMetadata(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_metadata1.py b/test/test_metadata1.py index 221a649..5403126 100644 --- a/test/test_metadata1.py +++ b/test/test_metadata1.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.metadata1 import Metadata1 + class TestMetadata1(unittest.TestCase): """Metadata1 unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Metadata1: """Test Metadata1 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Metadata1` """ model = Metadata1() @@ -53,5 +54,6 @@ def testMetadata1(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_metadata2.py b/test/test_metadata2.py index b28d7c3..9b45603 100644 --- a/test/test_metadata2.py +++ b/test/test_metadata2.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.metadata2 import Metadata2 + class TestMetadata2(unittest.TestCase): """Metadata2 unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Metadata2: """Test Metadata2 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Metadata2` """ model = Metadata2() @@ -50,5 +51,6 @@ def testMetadata2(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_process_input.py b/test/test_process_input.py index a4e19ad..15a9422 100644 --- a/test/test_process_input.py +++ b/test/test_process_input.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.process_input import ProcessInput + class TestProcessInput(unittest.TestCase): """ProcessInput unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ProcessInput: """Test ProcessInput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ProcessInput` """ model = ProcessInput() @@ -50,10 +51,10 @@ def make_instance(self, include_optional) -> ProcessInput: ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], inputs = [ @@ -75,5 +76,6 @@ def testProcessInput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_process_list.py b/test/test_process_list.py index 6391cad..045d5b2 100644 --- a/test/test_process_list.py +++ b/test/test_process_list.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.process_list import ProcessList + class TestProcessList(unittest.TestCase): """ProcessList unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ProcessList: """Test ProcessList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ProcessList` """ model = ProcessList() @@ -37,34 +38,34 @@ def make_instance(self, include_optional) -> ProcessList: return ProcessList( processes = [ unity_sps_ogc_processes_api_python_client.models.process_summary.ProcessSummary( - title = '', - description = '', + title = '', + description = '', keywords = [ '' - ], + ], metadata = [ null - ], - id = '', - version = '', + ], + id = '', + version = '', job_control_options = [ 'sync-execute' - ], + ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], ) ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ] ) @@ -72,34 +73,34 @@ def make_instance(self, include_optional) -> ProcessList: return ProcessList( processes = [ unity_sps_ogc_processes_api_python_client.models.process_summary.ProcessSummary( - title = '', - description = '', + title = '', + description = '', keywords = [ '' - ], + ], metadata = [ null - ], - id = '', - version = '', + ], + id = '', + version = '', job_control_options = [ 'sync-execute' - ], + ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], ) ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], ) @@ -110,5 +111,6 @@ def testProcessList(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_process_output.py b/test/test_process_output.py index 58e0aa6..64c5c1d 100644 --- a/test/test_process_output.py +++ b/test/test_process_output.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.process_output import ProcessOutput +from unity_sps_ogc_processes_api_python_client.models.process_output import ( + ProcessOutput, +) + class TestProcessOutput(unittest.TestCase): """ProcessOutput unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ProcessOutput: """Test ProcessOutput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ProcessOutput` """ model = ProcessOutput() @@ -50,10 +53,10 @@ def make_instance(self, include_optional) -> ProcessOutput: ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ], inputs = [ @@ -75,5 +78,6 @@ def testProcessOutput(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_process_summary.py b/test/test_process_summary.py index 4071245..4275555 100644 --- a/test/test_process_summary.py +++ b/test/test_process_summary.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.process_summary import ProcessSummary +from unity_sps_ogc_processes_api_python_client.models.process_summary import ( + ProcessSummary, +) + class TestProcessSummary(unittest.TestCase): """ProcessSummary unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ProcessSummary: """Test ProcessSummary - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ProcessSummary` """ model = ProcessSummary() @@ -50,10 +53,10 @@ def make_instance(self, include_optional) -> ProcessSummary: ], links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ] ) @@ -69,5 +72,6 @@ def testProcessSummary(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_status.py b/test/test_status.py index 72c7232..bea3d12 100644 --- a/test/test_status.py +++ b/test/test_status.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.status import Status + class TestStatus(unittest.TestCase): """Status unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Status: """Test Status - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Status` """ model = Status() @@ -46,5 +47,6 @@ def testStatus(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_status_code.py b/test/test_status_code.py index 73821b8..65a4f3d 100644 --- a/test/test_status_code.py +++ b/test/test_status_code.py @@ -14,7 +14,6 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.status_code import StatusCode class TestStatusCode(unittest.TestCase): """StatusCode unit test stubs""" @@ -29,5 +28,6 @@ def testStatusCode(self): """Test StatusCode""" # inst = StatusCode() -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_status_info.py b/test/test_status_info.py index 25bbc8e..ef4dcd9 100644 --- a/test/test_status_info.py +++ b/test/test_status_info.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.status_info import StatusInfo + class TestStatusInfo(unittest.TestCase): """StatusInfo unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> StatusInfo: """Test StatusInfo - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `StatusInfo` """ model = StatusInfo() @@ -50,10 +51,10 @@ def make_instance(self, include_optional) -> StatusInfo: progress = 0.0, links = [ unity_sps_ogc_processes_api_python_client.models.link.Link( - href = '', - rel = '', - type = '', - hreflang = '', + href = '', + rel = '', + type = '', + hreflang = '', title = '', ) ] ) @@ -70,5 +71,6 @@ def testStatusInfo(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_subscriber.py b/test/test_subscriber.py index d5aa5f5..132d05f 100644 --- a/test/test_subscriber.py +++ b/test/test_subscriber.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.subscriber import Subscriber + class TestSubscriber(unittest.TestCase): """Subscriber unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Subscriber: """Test Subscriber - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Subscriber` """ model = Subscriber() @@ -50,5 +51,6 @@ def testSubscriber(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_title.py b/test/test_title.py index 54c50b7..a6ca652 100644 --- a/test/test_title.py +++ b/test/test_title.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.title import Title + class TestTitle(unittest.TestCase): """Title unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Title: """Test Title - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Title` """ model = Title() @@ -46,5 +47,6 @@ def testTitle(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_validation_error.py b/test/test_validation_error.py index f930742..e08cd68 100644 --- a/test/test_validation_error.py +++ b/test/test_validation_error.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.validation_error import ValidationError +from unity_sps_ogc_processes_api_python_client.models.validation_error import ( + ValidationError, +) + class TestValidationError(unittest.TestCase): """ValidationError unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ValidationError: """Test ValidationError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ValidationError` """ model = ValidationError() @@ -56,5 +59,6 @@ def testValidationError(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_validation_error_loc_inner.py b/test/test_validation_error_loc_inner.py index 9c2af2d..07e39c1 100644 --- a/test/test_validation_error_loc_inner.py +++ b/test/test_validation_error_loc_inner.py @@ -14,7 +14,10 @@ import unittest -from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner +from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ( + ValidationErrorLocInner, +) + class TestValidationErrorLocInner(unittest.TestCase): """ValidationErrorLocInner unit test stubs""" @@ -27,9 +30,9 @@ def tearDown(self): def make_instance(self, include_optional) -> ValidationErrorLocInner: """Test ValidationErrorLocInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `ValidationErrorLocInner` """ model = ValidationErrorLocInner() @@ -46,5 +49,6 @@ def testValidationErrorLocInner(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/test/test_value.py b/test/test_value.py index 3b2b3bb..9bc6a91 100644 --- a/test/test_value.py +++ b/test/test_value.py @@ -16,6 +16,7 @@ from unity_sps_ogc_processes_api_python_client.models.value import Value + class TestValue(unittest.TestCase): """Value unit test stubs""" @@ -27,9 +28,9 @@ def tearDown(self): def make_instance(self, include_optional) -> Value: """Test Value - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" # uncomment below to create an instance of `Value` """ model = Value() @@ -46,5 +47,6 @@ def testValue(self): # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/unity_sps_ogc_processes_api_python_client/__init__.py b/unity_sps_ogc_processes_api_python_client/__init__.py index e49a5f2..9df45cf 100644 --- a/unity_sps_ogc_processes_api_python_client/__init__.py +++ b/unity_sps_ogc_processes_api_python_client/__init__.py @@ -18,17 +18,19 @@ # import apis into sdk package from unity_sps_ogc_processes_api_python_client.api.default_api import DefaultApi +from unity_sps_ogc_processes_api_python_client.api_client import ApiClient # import ApiClient from unity_sps_ogc_processes_api_python_client.api_response import ApiResponse -from unity_sps_ogc_processes_api_python_client.api_client import ApiClient from unity_sps_ogc_processes_api_python_client.configuration import Configuration -from unity_sps_ogc_processes_api_python_client.exceptions import OpenApiException -from unity_sps_ogc_processes_api_python_client.exceptions import ApiTypeError -from unity_sps_ogc_processes_api_python_client.exceptions import ApiValueError -from unity_sps_ogc_processes_api_python_client.exceptions import ApiKeyError -from unity_sps_ogc_processes_api_python_client.exceptions import ApiAttributeError -from unity_sps_ogc_processes_api_python_client.exceptions import ApiException +from unity_sps_ogc_processes_api_python_client.exceptions import ( + ApiAttributeError, + ApiException, + ApiKeyError, + ApiTypeError, + ApiValueError, + OpenApiException, +) # import models into sdk package from unity_sps_ogc_processes_api_python_client.models.bbox import Bbox @@ -38,14 +40,26 @@ from unity_sps_ogc_processes_api_python_client.models.detail import Detail from unity_sps_ogc_processes_api_python_client.models.exception import Exception from unity_sps_ogc_processes_api_python_client.models.execute import Execute -from unity_sps_ogc_processes_api_python_client.models.http_validation_error import HTTPValidationError from unity_sps_ogc_processes_api_python_client.models.health_check import HealthCheck -from unity_sps_ogc_processes_api_python_client.models.input_value_input import InputValueInput -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import InputValueNoObjectInput -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import InputValueNoObjectOutput -from unity_sps_ogc_processes_api_python_client.models.input_value_output import InputValueOutput +from unity_sps_ogc_processes_api_python_client.models.http_validation_error import ( + HTTPValidationError, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_input import ( + InputValueInput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import ( + InputValueNoObjectInput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import ( + InputValueNoObjectOutput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_output import ( + InputValueOutput, +) from unity_sps_ogc_processes_api_python_client.models.instance import Instance -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions +from unity_sps_ogc_processes_api_python_client.models.job_control_options import ( + JobControlOptions, +) from unity_sps_ogc_processes_api_python_client.models.job_list import JobList from unity_sps_ogc_processes_api_python_client.models.landing_page import LandingPage from unity_sps_ogc_processes_api_python_client.models.link import Link @@ -54,13 +68,21 @@ from unity_sps_ogc_processes_api_python_client.models.metadata2 import Metadata2 from unity_sps_ogc_processes_api_python_client.models.process_input import ProcessInput from unity_sps_ogc_processes_api_python_client.models.process_list import ProcessList -from unity_sps_ogc_processes_api_python_client.models.process_output import ProcessOutput -from unity_sps_ogc_processes_api_python_client.models.process_summary import ProcessSummary +from unity_sps_ogc_processes_api_python_client.models.process_output import ( + ProcessOutput, +) +from unity_sps_ogc_processes_api_python_client.models.process_summary import ( + ProcessSummary, +) from unity_sps_ogc_processes_api_python_client.models.status import Status from unity_sps_ogc_processes_api_python_client.models.status_code import StatusCode from unity_sps_ogc_processes_api_python_client.models.status_info import StatusInfo from unity_sps_ogc_processes_api_python_client.models.subscriber import Subscriber from unity_sps_ogc_processes_api_python_client.models.title import Title -from unity_sps_ogc_processes_api_python_client.models.validation_error import ValidationError -from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner +from unity_sps_ogc_processes_api_python_client.models.validation_error import ( + ValidationError, +) +from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ( + ValidationErrorLocInner, +) from unity_sps_ogc_processes_api_python_client.models.value import Value diff --git a/unity_sps_ogc_processes_api_python_client/api/__init__.py b/unity_sps_ogc_processes_api_python_client/api/__init__.py index 0d776e5..6824272 100644 --- a/unity_sps_ogc_processes_api_python_client/api/__init__.py +++ b/unity_sps_ogc_processes_api_python_client/api/__init__.py @@ -2,4 +2,3 @@ # import apis into api package from unity_sps_ogc_processes_api_python_client.api.default_api import DefaultApi - diff --git a/unity_sps_ogc_processes_api_python_client/api/default_api.py b/unity_sps_ogc_processes_api_python_client/api/default_api.py index f4917a6..4789e21 100644 --- a/unity_sps_ogc_processes_api_python_client/api/default_api.py +++ b/unity_sps_ogc_processes_api_python_client/api/default_api.py @@ -11,13 +11,16 @@ Do not edit the class manually. """ # noqa: E501 -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from typing_extensions import Annotated -from pydantic import StrictStr -from typing import Any +from unity_sps_ogc_processes_api_python_client.api_client import ( + ApiClient, + RequestSerialized, +) +from unity_sps_ogc_processes_api_python_client.api_response import ApiResponse from unity_sps_ogc_processes_api_python_client.models.conf_classes import ConfClasses from unity_sps_ogc_processes_api_python_client.models.execute import Execute from unity_sps_ogc_processes_api_python_client.models.health_check import HealthCheck @@ -25,11 +28,10 @@ from unity_sps_ogc_processes_api_python_client.models.landing_page import LandingPage from unity_sps_ogc_processes_api_python_client.models.process_input import ProcessInput from unity_sps_ogc_processes_api_python_client.models.process_list import ProcessList -from unity_sps_ogc_processes_api_python_client.models.process_output import ProcessOutput +from unity_sps_ogc_processes_api_python_client.models.process_output import ( + ProcessOutput, +) from unity_sps_ogc_processes_api_python_client.models.status_info import StatusInfo - -from unity_sps_ogc_processes_api_python_client.api_client import ApiClient, RequestSerialized -from unity_sps_ogc_processes_api_python_client.api_response import ApiResponse from unity_sps_ogc_processes_api_python_client.rest import RESTResponseType @@ -45,7 +47,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def conformance_declaration_conformance_get( self, @@ -53,9 +54,8 @@ def conformance_declaration_conformance_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -86,21 +86,20 @@ def conformance_declaration_conformance_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._conformance_declaration_conformance_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ConfClasses", + "200": "ConfClasses", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -108,7 +107,6 @@ def conformance_declaration_conformance_get( response_types_map=_response_types_map, ).data - @validate_call def conformance_declaration_conformance_get_with_http_info( self, @@ -116,9 +114,8 @@ def conformance_declaration_conformance_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -149,21 +146,20 @@ def conformance_declaration_conformance_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._conformance_declaration_conformance_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ConfClasses", + "200": "ConfClasses", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -171,7 +167,6 @@ def conformance_declaration_conformance_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def conformance_declaration_conformance_get_without_preload_content( self, @@ -179,9 +174,8 @@ def conformance_declaration_conformance_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -212,25 +206,23 @@ def conformance_declaration_conformance_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._conformance_declaration_conformance_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ConfClasses", + "200": "ConfClasses", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _conformance_declaration_conformance_get_serialize( self, _request_auth, @@ -241,8 +233,7 @@ def _conformance_declaration_conformance_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -257,23 +248,17 @@ def _conformance_declaration_conformance_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/conformance', + method="GET", + resource_path="/conformance", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -283,12 +268,9 @@ def _conformance_declaration_conformance_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def deploy_process_processes_post( self, @@ -297,9 +279,8 @@ def deploy_process_processes_post( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -332,23 +313,22 @@ def deploy_process_processes_post( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deploy_process_processes_post_serialize( process_input=process_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -356,7 +336,6 @@ def deploy_process_processes_post( response_types_map=_response_types_map, ).data - @validate_call def deploy_process_processes_post_with_http_info( self, @@ -365,9 +344,8 @@ def deploy_process_processes_post_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -400,23 +378,22 @@ def deploy_process_processes_post_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deploy_process_processes_post_serialize( process_input=process_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -424,7 +401,6 @@ def deploy_process_processes_post_with_http_info( response_types_map=_response_types_map, ) - @validate_call def deploy_process_processes_post_without_preload_content( self, @@ -433,9 +409,8 @@ def deploy_process_processes_post_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -468,27 +443,25 @@ def deploy_process_processes_post_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deploy_process_processes_post_serialize( process_input=process_input, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _deploy_process_processes_post_serialize( self, process_input, @@ -500,8 +473,7 @@ def _deploy_process_processes_post_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -518,36 +490,27 @@ def _deploy_process_processes_post_serialize( if process_input is not None: _body_params = process_input - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/processes', + method="POST", + resource_path="/processes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -557,12 +520,9 @@ def _deploy_process_processes_post_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def dismiss_jobs_job_id_delete( self, @@ -571,9 +531,8 @@ def dismiss_jobs_job_id_delete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -606,23 +565,22 @@ def dismiss_jobs_job_id_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._dismiss_jobs_job_id_delete_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -630,7 +588,6 @@ def dismiss_jobs_job_id_delete( response_types_map=_response_types_map, ).data - @validate_call def dismiss_jobs_job_id_delete_with_http_info( self, @@ -639,9 +596,8 @@ def dismiss_jobs_job_id_delete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -674,23 +630,22 @@ def dismiss_jobs_job_id_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._dismiss_jobs_job_id_delete_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -698,7 +653,6 @@ def dismiss_jobs_job_id_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def dismiss_jobs_job_id_delete_without_preload_content( self, @@ -707,9 +661,8 @@ def dismiss_jobs_job_id_delete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -742,27 +695,25 @@ def dismiss_jobs_job_id_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._dismiss_jobs_job_id_delete_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _dismiss_jobs_job_id_delete_serialize( self, job_id, @@ -774,8 +725,7 @@ def _dismiss_jobs_job_id_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -786,29 +736,23 @@ def _dismiss_jobs_job_id_delete_serialize( # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/jobs/{job_id}', + method="DELETE", + resource_path="/jobs/{job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -818,12 +762,9 @@ def _dismiss_jobs_job_id_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def execute_processes_process_id_execution_post( self, @@ -833,9 +774,8 @@ def execute_processes_process_id_execution_post( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -870,7 +810,7 @@ def execute_processes_process_id_execution_post( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._execute_processes_process_id_execution_post_serialize( process_id=process_id, @@ -878,16 +818,15 @@ def execute_processes_process_id_execution_post( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -895,7 +834,6 @@ def execute_processes_process_id_execution_post( response_types_map=_response_types_map, ).data - @validate_call def execute_processes_process_id_execution_post_with_http_info( self, @@ -905,9 +843,8 @@ def execute_processes_process_id_execution_post_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -942,7 +879,7 @@ def execute_processes_process_id_execution_post_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._execute_processes_process_id_execution_post_serialize( process_id=process_id, @@ -950,16 +887,15 @@ def execute_processes_process_id_execution_post_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -967,7 +903,6 @@ def execute_processes_process_id_execution_post_with_http_info( response_types_map=_response_types_map, ) - @validate_call def execute_processes_process_id_execution_post_without_preload_content( self, @@ -977,9 +912,8 @@ def execute_processes_process_id_execution_post_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1014,7 +948,7 @@ def execute_processes_process_id_execution_post_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._execute_processes_process_id_execution_post_serialize( process_id=process_id, @@ -1022,20 +956,18 @@ def execute_processes_process_id_execution_post_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _execute_processes_process_id_execution_post_serialize( self, process_id, @@ -1048,8 +980,7 @@ def _execute_processes_process_id_execution_post_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1060,7 +991,7 @@ def _execute_processes_process_id_execution_post_serialize( # process the path parameters if process_id is not None: - _path_params['process_id'] = process_id + _path_params["process_id"] = process_id # process the query parameters # process the header parameters # process the form parameters @@ -1068,36 +999,27 @@ def _execute_processes_process_id_execution_post_serialize( if execute is not None: _body_params = execute - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='POST', - resource_path='/processes/{process_id}/execution', + method="POST", + resource_path="/processes/{process_id}/execution", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1107,12 +1029,9 @@ def _execute_processes_process_id_execution_post_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_health_health_get( self, @@ -1120,9 +1039,8 @@ def get_health_health_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1153,21 +1071,20 @@ def get_health_health_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_health_health_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheck", + "200": "HealthCheck", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1175,7 +1092,6 @@ def get_health_health_get( response_types_map=_response_types_map, ).data - @validate_call def get_health_health_get_with_http_info( self, @@ -1183,9 +1099,8 @@ def get_health_health_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1216,21 +1131,20 @@ def get_health_health_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_health_health_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheck", + "200": "HealthCheck", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1238,7 +1152,6 @@ def get_health_health_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def get_health_health_get_without_preload_content( self, @@ -1246,9 +1159,8 @@ def get_health_health_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1279,25 +1191,23 @@ def get_health_health_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_health_health_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheck", + "200": "HealthCheck", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _get_health_health_get_serialize( self, _request_auth, @@ -1308,8 +1218,7 @@ def _get_health_health_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1324,23 +1233,17 @@ def _get_health_health_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/health', + method="GET", + resource_path="/health", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1350,12 +1253,9 @@ def _get_health_health_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def job_list_jobs_get( self, @@ -1363,9 +1263,8 @@ def job_list_jobs_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1396,21 +1295,20 @@ def job_list_jobs_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._job_list_jobs_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1418,7 +1316,6 @@ def job_list_jobs_get( response_types_map=_response_types_map, ).data - @validate_call def job_list_jobs_get_with_http_info( self, @@ -1426,9 +1323,8 @@ def job_list_jobs_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1459,21 +1355,20 @@ def job_list_jobs_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._job_list_jobs_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1481,7 +1376,6 @@ def job_list_jobs_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def job_list_jobs_get_without_preload_content( self, @@ -1489,9 +1383,8 @@ def job_list_jobs_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1522,25 +1415,23 @@ def job_list_jobs_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._job_list_jobs_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "JobList", + "200": "JobList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _job_list_jobs_get_serialize( self, _request_auth, @@ -1551,8 +1442,7 @@ def _job_list_jobs_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1567,23 +1457,17 @@ def _job_list_jobs_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/jobs', + method="GET", + resource_path="/jobs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1593,12 +1477,9 @@ def _job_list_jobs_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def landing_page_get( self, @@ -1606,9 +1487,8 @@ def landing_page_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1639,21 +1519,20 @@ def landing_page_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._landing_page_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LandingPage", + "200": "LandingPage", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1661,7 +1540,6 @@ def landing_page_get( response_types_map=_response_types_map, ).data - @validate_call def landing_page_get_with_http_info( self, @@ -1669,9 +1547,8 @@ def landing_page_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1702,21 +1579,20 @@ def landing_page_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._landing_page_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LandingPage", + "200": "LandingPage", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1724,7 +1600,6 @@ def landing_page_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def landing_page_get_without_preload_content( self, @@ -1732,9 +1607,8 @@ def landing_page_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1765,25 +1639,23 @@ def landing_page_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._landing_page_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LandingPage", + "200": "LandingPage", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _landing_page_get_serialize( self, _request_auth, @@ -1794,8 +1666,7 @@ def _landing_page_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1810,23 +1681,17 @@ def _landing_page_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/', + method="GET", + resource_path="/", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1836,12 +1701,9 @@ def _landing_page_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def process_description_processes_process_id_get( self, @@ -1850,9 +1712,8 @@ def process_description_processes_process_id_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1885,23 +1746,22 @@ def process_description_processes_process_id_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_description_processes_process_id_get_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1909,7 +1769,6 @@ def process_description_processes_process_id_get( response_types_map=_response_types_map, ).data - @validate_call def process_description_processes_process_id_get_with_http_info( self, @@ -1918,9 +1777,8 @@ def process_description_processes_process_id_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1953,23 +1811,22 @@ def process_description_processes_process_id_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_description_processes_process_id_get_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1977,7 +1834,6 @@ def process_description_processes_process_id_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def process_description_processes_process_id_get_without_preload_content( self, @@ -1986,9 +1842,8 @@ def process_description_processes_process_id_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2021,27 +1876,25 @@ def process_description_processes_process_id_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_description_processes_process_id_get_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessOutput", - '422': "HTTPValidationError", + "200": "ProcessOutput", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _process_description_processes_process_id_get_serialize( self, process_id, @@ -2053,8 +1906,7 @@ def _process_description_processes_process_id_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2065,29 +1917,23 @@ def _process_description_processes_process_id_get_serialize( # process the path parameters if process_id is not None: - _path_params['process_id'] = process_id + _path_params["process_id"] = process_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/processes/{process_id}', + method="GET", + resource_path="/processes/{process_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2097,12 +1943,9 @@ def _process_description_processes_process_id_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def process_list_processes_get( self, @@ -2110,9 +1953,8 @@ def process_list_processes_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2143,21 +1985,20 @@ def process_list_processes_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_list_processes_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessList", + "200": "ProcessList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2165,7 +2006,6 @@ def process_list_processes_get( response_types_map=_response_types_map, ).data - @validate_call def process_list_processes_get_with_http_info( self, @@ -2173,9 +2013,8 @@ def process_list_processes_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2206,21 +2045,20 @@ def process_list_processes_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_list_processes_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessList", + "200": "ProcessList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2228,7 +2066,6 @@ def process_list_processes_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def process_list_processes_get_without_preload_content( self, @@ -2236,9 +2073,8 @@ def process_list_processes_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2269,25 +2105,23 @@ def process_list_processes_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._process_list_processes_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProcessList", + "200": "ProcessList", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _process_list_processes_get_serialize( self, _request_auth, @@ -2298,8 +2132,7 @@ def _process_list_processes_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2314,23 +2147,17 @@ def _process_list_processes_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/processes', + method="GET", + resource_path="/processes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2340,12 +2167,9 @@ def _process_list_processes_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def results_jobs_job_id_results_get( self, @@ -2354,9 +2178,8 @@ def results_jobs_job_id_results_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2389,23 +2212,22 @@ def results_jobs_job_id_results_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._results_jobs_job_id_results_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", + "200": "object", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2413,7 +2235,6 @@ def results_jobs_job_id_results_get( response_types_map=_response_types_map, ).data - @validate_call def results_jobs_job_id_results_get_with_http_info( self, @@ -2422,9 +2243,8 @@ def results_jobs_job_id_results_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2457,23 +2277,22 @@ def results_jobs_job_id_results_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._results_jobs_job_id_results_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", + "200": "object", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2481,7 +2300,6 @@ def results_jobs_job_id_results_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def results_jobs_job_id_results_get_without_preload_content( self, @@ -2490,9 +2308,8 @@ def results_jobs_job_id_results_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2525,27 +2342,25 @@ def results_jobs_job_id_results_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._results_jobs_job_id_results_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", + "200": "object", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _results_jobs_job_id_results_get_serialize( self, job_id, @@ -2557,8 +2372,7 @@ def _results_jobs_job_id_results_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2569,29 +2383,23 @@ def _results_jobs_job_id_results_get_serialize( # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/jobs/{job_id}/results', + method="GET", + resource_path="/jobs/{job_id}/results", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2601,12 +2409,9 @@ def _results_jobs_job_id_results_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def status_jobs_job_id_get( self, @@ -2615,9 +2420,8 @@ def status_jobs_job_id_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2650,23 +2454,22 @@ def status_jobs_job_id_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._status_jobs_job_id_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2674,7 +2477,6 @@ def status_jobs_job_id_get( response_types_map=_response_types_map, ).data - @validate_call def status_jobs_job_id_get_with_http_info( self, @@ -2683,9 +2485,8 @@ def status_jobs_job_id_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2718,23 +2519,22 @@ def status_jobs_job_id_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._status_jobs_job_id_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2742,7 +2542,6 @@ def status_jobs_job_id_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def status_jobs_job_id_get_without_preload_content( self, @@ -2751,9 +2550,8 @@ def status_jobs_job_id_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2786,27 +2584,25 @@ def status_jobs_job_id_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._status_jobs_job_id_get_serialize( job_id=job_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "StatusInfo", - '422': "HTTPValidationError", + "200": "StatusInfo", + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _status_jobs_job_id_get_serialize( self, job_id, @@ -2818,8 +2614,7 @@ def _status_jobs_job_id_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2830,29 +2625,23 @@ def _status_jobs_job_id_get_serialize( # process the path parameters if job_id is not None: - _path_params['job_id'] = job_id + _path_params["job_id"] = job_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='GET', - resource_path='/jobs/{job_id}', + method="GET", + resource_path="/jobs/{job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2862,12 +2651,9 @@ def _status_jobs_job_id_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def undeploy_process_processes_process_id_delete( self, @@ -2876,9 +2662,8 @@ def undeploy_process_processes_process_id_delete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2911,23 +2696,22 @@ def undeploy_process_processes_process_id_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._undeploy_process_processes_process_id_delete_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '422': "HTTPValidationError", + "204": None, + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2935,7 +2719,6 @@ def undeploy_process_processes_process_id_delete( response_types_map=_response_types_map, ).data - @validate_call def undeploy_process_processes_process_id_delete_with_http_info( self, @@ -2944,9 +2727,8 @@ def undeploy_process_processes_process_id_delete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2979,23 +2761,22 @@ def undeploy_process_processes_process_id_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._undeploy_process_processes_process_id_delete_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '422': "HTTPValidationError", + "204": None, + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3003,7 +2784,6 @@ def undeploy_process_processes_process_id_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def undeploy_process_processes_process_id_delete_without_preload_content( self, @@ -3012,9 +2792,8 @@ def undeploy_process_processes_process_id_delete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3047,27 +2826,25 @@ def undeploy_process_processes_process_id_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._undeploy_process_processes_process_id_delete_serialize( process_id=process_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '422': "HTTPValidationError", + "204": None, + "422": "HTTPValidationError", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _undeploy_process_processes_process_id_delete_serialize( self, process_id, @@ -3079,8 +2856,7 @@ def _undeploy_process_processes_process_id_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3091,29 +2867,23 @@ def _undeploy_process_processes_process_id_delete_serialize( # process the path parameters if process_id is not None: - _path_params['process_id'] = process_id + _path_params["process_id"] = process_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] + _auth_settings: List[str] = ["bearerAuth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/processes/{process_id}', + method="DELETE", + resource_path="/processes/{process_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3123,7 +2893,5 @@ def _undeploy_process_processes_process_id_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/unity_sps_ogc_processes_api_python_client/api_client.py b/unity_sps_ogc_processes_api_python_client/api_client.py index 936cee8..600b568 100644 --- a/unity_sps_ogc_processes_api_python_client/api_client.py +++ b/unity_sps_ogc_processes_api_python_client/api_client.py @@ -13,34 +13,31 @@ import datetime -from dateutil.parser import parse -from enum import Enum import json import mimetypes import os import re import tempfile - +from enum import Enum +from typing import Dict, List, Optional, Tuple, Union from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union + +from dateutil.parser import parse from pydantic import SecretStr -from unity_sps_ogc_processes_api_python_client.configuration import Configuration -from unity_sps_ogc_processes_api_python_client.api_response import ApiResponse, T as ApiResponseT import unity_sps_ogc_processes_api_python_client.models from unity_sps_ogc_processes_api_python_client import rest +from unity_sps_ogc_processes_api_python_client.api_response import ApiResponse +from unity_sps_ogc_processes_api_python_client.api_response import T as ApiResponseT +from unity_sps_ogc_processes_api_python_client.configuration import Configuration from unity_sps_ogc_processes_api_python_client.exceptions import ( - ApiValueError, ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException + ApiValueError, ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + class ApiClient: """Generic API client for OpenAPI client library builds. @@ -59,23 +56,19 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "object": object, } _pool = None def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None + self, configuration=None, header_name=None, header_value=None, cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -88,7 +81,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.user_agent = "OpenAPI-Generator/1.0.0/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -100,16 +93,15 @@ def __exit__(self, exc_type, exc_value, traceback): @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 - _default = None @classmethod @@ -145,12 +137,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, auth_settings=None, + files=None, + auth_settings=None, collection_formats=None, _host=None, - _request_auth=None + _request_auth=None, ) -> RequestSerialized: - """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -179,35 +171,28 @@ def param_serialize( 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) + 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) ) # 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) if files: post_params.extend(self.files_parameters(files)) @@ -219,7 +204,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth + request_auth=_request_auth, ) # body @@ -236,15 +221,11 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query return method, url, header_params, body, post_params - def call_api( self, method, @@ -252,7 +233,7 @@ def call_api( header_params=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -269,10 +250,12 @@ def call_api( try: # perform request and return response response_data = self.rest_client.request( - method, url, + method, + url, headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout + body=body, + post_params=post_params, + _request_timeout=_request_timeout, ) except ApiException as e: @@ -283,7 +266,7 @@ def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None + response_types_map: Optional[Dict[str, ApiResponseT]] = None, ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -295,9 +278,15 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + response_type = response_types_map.get( + str(response_data.status)[0] + "XX", None + ) # deserialize response data response_text = None @@ -309,13 +298,15 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - 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) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) if response_type in ["bytearray", "str"]: - return_data = self.__deserialize_primitive(response_text, response_type) + return_data = self.__deserialize_primitive( + response_text, response_type + ) else: return_data = self.deserialize(response_text, response_type) finally: @@ -327,10 +318,10 @@ def response_deserialize( ) return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), + raw_data=response_data.data, ) def sanitize_for_serialization(self, obj): @@ -357,13 +348,9 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() @@ -375,14 +362,13 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() + key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } def deserialize(self, response_text, response_type): @@ -415,19 +401,17 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -461,19 +445,18 @@ def parameters_to_tuples(self, params, collection_formats): 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 @@ -498,17 +481,17 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, str(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 = ',' + delimiter = "," new_params.append( (k, delimiter.join(quote(str(value)) for value in v)) ) @@ -526,7 +509,7 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, 'rb') as f: + with open(v, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -534,13 +517,8 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): filedata = v else: raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -553,7 +531,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -568,7 +546,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] @@ -581,7 +559,7 @@ def update_params_for_auth( resource_path, method, body, - request_auth=None + request_auth=None, ) -> None: """Updates header and query params based on authentication setting. @@ -600,34 +578,18 @@ def update_params_for_auth( if request_auth: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth + headers, queries, resource_path, method, body, request_auth ) else: 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 + self, headers, queries, resource_path, method, body, auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -639,17 +601,15 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = 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["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`") def __deserialize_file(self, response): """Deserializes body to file @@ -669,10 +629,7 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) assert m is not None, "Unexpected 'content-disposition' header value" filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) @@ -716,8 +673,7 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -735,10 +691,7 @@ def __deserialize_datetime(self, string): except ValueError: raise rest.ApiException( status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) + reason=("Failed to parse `{0}` as datetime object".format(string)), ) def __deserialize_enum(self, data, klass): @@ -752,11 +705,7 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) ) def __deserialize_model(self, data, klass): diff --git a/unity_sps_ogc_processes_api_python_client/api_response.py b/unity_sps_ogc_processes_api_python_client/api_response.py index 9bc7c11..ca801da 100644 --- a/unity_sps_ogc_processes_api_python_client/api_response.py +++ b/unity_sps_ogc_processes_api_python_client/api_response.py @@ -1,11 +1,14 @@ """API response object.""" from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel + +from typing import Generic, Mapping, Optional, TypeVar + +from pydantic import BaseModel, Field, StrictBytes, StrictInt T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -16,6 +19,4 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/unity_sps_ogc_processes_api_python_client/configuration.py b/unity_sps_ogc_processes_api_python_client/configuration.py index 833ee4c..b8e96c1 100644 --- a/unity_sps_ogc_processes_api_python_client/configuration.py +++ b/unity_sps_ogc_processes_api_python_client/configuration.py @@ -13,21 +13,29 @@ import copy +import http.client as httplib import logging -from logging import FileHandler import multiprocessing import sys +from logging import FileHandler from typing import Optional -import urllib3 -import http.client as httplib +import urllib3 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: """This class contains various settings of the API client. @@ -60,16 +68,21 @@ class Configuration: _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + username=None, + password=None, + access_token=None, + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor""" self._base_path = "http://localhost" if host is None else host """Default Base url """ @@ -110,9 +123,11 @@ def __init__(self, host=None, self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("unity_sps_ogc_processes_api_python_client") + self.logger["package_logger"] = logging.getLogger( + "unity_sps_ogc_processes_api_python_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 @@ -164,7 +179,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 @@ -190,7 +205,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) @@ -331,7 +346,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + key = self.api_key.get( + identifier, self.api_key.get(alias) if alias is not None else None + ) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -350,9 +367,9 @@ 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. @@ -361,12 +378,12 @@ def auth_settings(self): """ auth = {} if self.access_token is not None: - auth['bearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["bearerAuth"] = { + "type": "bearer", + "in": "header", + "format": "JWT", + "key": "Authorization", + "value": "Bearer " + self.access_token, } return auth @@ -375,12 +392,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: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 1.0.0\n" + "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self): """Gets an array of host settings @@ -389,8 +407,8 @@ def get_host_settings(self): """ return [ { - 'url': "", - 'description': "No description provided", + "url": "", + "description": "No description provided", } ] @@ -412,22 +430,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, 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'])) + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) @@ -436,7 +454,9 @@ def get_host_from_settings(self, index, variables=None, servers=None): @property def host(self): """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) + return self.get_host_from_settings( + self.server_index, variables=self.server_variables + ) @host.setter def host(self, value): diff --git a/unity_sps_ogc_processes_api_python_client/exceptions.py b/unity_sps_ogc_processes_api_python_client/exceptions.py index 4bd32ce..f0c2068 100644 --- a/unity_sps_ogc_processes_api_python_client/exceptions.py +++ b/unity_sps_ogc_processes_api_python_client/exceptions.py @@ -12,16 +12,19 @@ """ # noqa: E501 from typing import Any, Optional + from typing_extensions import Self + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors + def __init__( + self, msg, path_to_item=None, valid_classes=None, key_type=None + ) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -104,9 +107,9 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -125,17 +128,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode('utf-8') + self.body = http_resp.data.decode("utf-8") except Exception: pass self.headers = http_resp.getheaders() @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -156,11 +159,9 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) if self.data or self.body: error_message += "HTTP response body: {0}\n".format(self.data or self.body) diff --git a/unity_sps_ogc_processes_api_python_client/models/__init__.py b/unity_sps_ogc_processes_api_python_client/models/__init__.py index 1515c8e..b5e6d3f 100644 --- a/unity_sps_ogc_processes_api_python_client/models/__init__.py +++ b/unity_sps_ogc_processes_api_python_client/models/__init__.py @@ -21,14 +21,26 @@ from unity_sps_ogc_processes_api_python_client.models.detail import Detail from unity_sps_ogc_processes_api_python_client.models.exception import Exception from unity_sps_ogc_processes_api_python_client.models.execute import Execute -from unity_sps_ogc_processes_api_python_client.models.http_validation_error import HTTPValidationError from unity_sps_ogc_processes_api_python_client.models.health_check import HealthCheck -from unity_sps_ogc_processes_api_python_client.models.input_value_input import InputValueInput -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import InputValueNoObjectInput -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import InputValueNoObjectOutput -from unity_sps_ogc_processes_api_python_client.models.input_value_output import InputValueOutput +from unity_sps_ogc_processes_api_python_client.models.http_validation_error import ( + HTTPValidationError, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_input import ( + InputValueInput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import ( + InputValueNoObjectInput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import ( + InputValueNoObjectOutput, +) +from unity_sps_ogc_processes_api_python_client.models.input_value_output import ( + InputValueOutput, +) from unity_sps_ogc_processes_api_python_client.models.instance import Instance -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions +from unity_sps_ogc_processes_api_python_client.models.job_control_options import ( + JobControlOptions, +) from unity_sps_ogc_processes_api_python_client.models.job_list import JobList from unity_sps_ogc_processes_api_python_client.models.landing_page import LandingPage from unity_sps_ogc_processes_api_python_client.models.link import Link @@ -37,13 +49,21 @@ from unity_sps_ogc_processes_api_python_client.models.metadata2 import Metadata2 from unity_sps_ogc_processes_api_python_client.models.process_input import ProcessInput from unity_sps_ogc_processes_api_python_client.models.process_list import ProcessList -from unity_sps_ogc_processes_api_python_client.models.process_output import ProcessOutput -from unity_sps_ogc_processes_api_python_client.models.process_summary import ProcessSummary +from unity_sps_ogc_processes_api_python_client.models.process_output import ( + ProcessOutput, +) +from unity_sps_ogc_processes_api_python_client.models.process_summary import ( + ProcessSummary, +) from unity_sps_ogc_processes_api_python_client.models.status import Status from unity_sps_ogc_processes_api_python_client.models.status_code import StatusCode from unity_sps_ogc_processes_api_python_client.models.status_info import StatusInfo from unity_sps_ogc_processes_api_python_client.models.subscriber import Subscriber from unity_sps_ogc_processes_api_python_client.models.title import Title -from unity_sps_ogc_processes_api_python_client.models.validation_error import ValidationError -from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner +from unity_sps_ogc_processes_api_python_client.models.validation_error import ( + ValidationError, +) +from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ( + ValidationErrorLocInner, +) from unity_sps_ogc_processes_api_python_client.models.value import Value diff --git a/unity_sps_ogc_processes_api_python_client/models/bbox.py b/unity_sps_ogc_processes_api_python_client/models/bbox.py index f4925c4..b1c3af6 100644 --- a/unity_sps_ogc_processes_api_python_client/models/bbox.py +++ b/unity_sps_ogc_processes_api_python_client/models/bbox.py @@ -13,20 +13,23 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from unity_sps_ogc_processes_api_python_client.models.crs import Crs -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.crs import Crs + + class Bbox(BaseModel): """ Bbox - """ # noqa: E501 + """ # noqa: E501 + bbox: List[Union[StrictFloat, StrictInt]] crs: Optional[Crs] = None __properties: ClassVar[List[str]] = ["bbox", "crs"] @@ -37,7 +40,6 @@ class Bbox(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,11 +73,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of crs if self.crs: - _dict['crs'] = self.crs.to_dict() + _dict["crs"] = self.crs.to_dict() # set to None if crs (nullable) is None # and model_fields_set contains the field if self.crs is None and "crs" in self.model_fields_set: - _dict['crs'] = None + _dict["crs"] = None return _dict @@ -89,10 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bbox": obj.get("bbox"), - "crs": Crs.from_dict(obj["crs"]) if obj.get("crs") is not None else None - }) + _obj = cls.model_validate( + { + "bbox": obj.get("bbox"), + "crs": ( + Crs.from_dict(obj["crs"]) if obj.get("crs") is not None else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/conf_classes.py b/unity_sps_ogc_processes_api_python_client/models/conf_classes.py index 1f82d3b..d3c29f9 100644 --- a/unity_sps_ogc_processes_api_python_client/models/conf_classes.py +++ b/unity_sps_ogc_processes_api_python_client/models/conf_classes.py @@ -13,19 +13,21 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set from typing_extensions import Self + class ConfClasses(BaseModel): """ ConfClasses - """ # noqa: E501 + """ # noqa: E501 + conforms_to: List[StrictStr] = Field(alias="conformsTo") __properties: ClassVar[List[str]] = ["conformsTo"] @@ -35,7 +37,6 @@ class ConfClasses(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "conformsTo": obj.get("conformsTo") - }) + _obj = cls.model_validate({"conformsTo": obj.get("conformsTo")}) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/crs.py b/unity_sps_ogc_processes_api_python_client/models/crs.py index 75744c7..970169b 100644 --- a/unity_sps_ogc_processes_api_python_client/models/crs.py +++ b/unity_sps_ogc_processes_api_python_client/models/crs.py @@ -13,20 +13,20 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Optional -from typing_extensions import Annotated +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, Field, ValidationError, field_validator +from typing_extensions import Annotated, Self + from unity_sps_ogc_processes_api_python_client.models.crs5 import Crs5 -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field CRS_ANY_OF_SCHEMAS = ["Crs5", "str"] + class Crs(BaseModel): """ Crs @@ -35,12 +35,14 @@ class Crs(BaseModel): # data type: Crs5 anyof_schema_1_validator: Optional[Crs5] = None # data type: str - anyof_schema_2_validator: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + anyof_schema_2_validator: Optional[ + Annotated[str, Field(min_length=1, strict=True)] + ] = None if TYPE_CHECKING: actual_instance: Optional[Union[Crs5, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Crs5", "str" } + any_of_schemas: Set[str] = {"Crs5", "str"} model_config = { "validate_assignment": True, @@ -50,14 +52,18 @@ class Crs(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -78,7 +84,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Crs with anyOf schemas: Crs5, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Crs with anyOf schemas: Crs5, str. Details: " + + ", ".join(error_messages) + ) else: return v @@ -99,7 +108,7 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = Crs5.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) # deserialize data into str try: # validation @@ -112,7 +121,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Crs with anyOf schemas: Crs5, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Crs with anyOf schemas: Crs5, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -121,7 +133,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -131,7 +145,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Crs5, str]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -139,5 +155,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Crs5, str]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/crs5.py b/unity_sps_ogc_processes_api_python_client/models/crs5.py index 9cba09a..27415f7 100644 --- a/unity_sps_ogc_processes_api_python_client/models/crs5.py +++ b/unity_sps_ogc_processes_api_python_client/models/crs5.py @@ -13,8 +13,10 @@ from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,12 +28,14 @@ class Crs5(str, Enum): """ allowed enum values """ - HTTP_COLON_SLASH_SLASH_WWW_DOT_OPENGIS_DOT_NET_SLASH_DEF_SLASH_CRS_SLASH_OGC_SLASH_1_DOT_3_SLASH_CRS84 = 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' - HTTP_COLON_SLASH_SLASH_WWW_DOT_OPENGIS_DOT_NET_SLASH_DEF_SLASH_CRS_SLASH_OGC_SLASH_0_SLASH_CRS84H = 'http://www.opengis.net/def/crs/OGC/0/CRS84h' + HTTP_COLON_SLASH_SLASH_WWW_DOT_OPENGIS_DOT_NET_SLASH_DEF_SLASH_CRS_SLASH_OGC_SLASH_1_DOT_3_SLASH_CRS84 = ( + "http://www.opengis.net/def/crs/OGC/1.3/CRS84" + ) + HTTP_COLON_SLASH_SLASH_WWW_DOT_OPENGIS_DOT_NET_SLASH_DEF_SLASH_CRS_SLASH_OGC_SLASH_0_SLASH_CRS84H = ( + "http://www.opengis.net/def/crs/OGC/0/CRS84h" + ) @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of Crs5 from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/detail.py b/unity_sps_ogc_processes_api_python_client/models/detail.py index d5ff547..9b87b87 100644 --- a/unity_sps_ogc_processes_api_python_client/models/detail.py +++ b/unity_sps_ogc_processes_api_python_client/models/detail.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self DETAIL_ANY_OF_SCHEMAS = ["object"] + class Detail(BaseModel): """ Detail @@ -38,7 +38,7 @@ class Detail(BaseModel): actual_instance: Optional[Union[object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } + any_of_schemas: Set[str] = {"object"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class Detail(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = Detail.model_construct() error_messages = [] @@ -73,7 +77,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Detail with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Detail with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -107,7 +114,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Detail with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Detail with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -116,7 +126,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -126,7 +138,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -134,5 +148,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/exception.py b/unity_sps_ogc_processes_api_python_client/models/exception.py index 07b7e72..f72e814 100644 --- a/unity_sps_ogc_processes_api_python_client/models/exception.py +++ b/unity_sps_ogc_processes_api_python_client/models/exception.py @@ -13,30 +13,39 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from unity_sps_ogc_processes_api_python_client.models.detail import Detail from unity_sps_ogc_processes_api_python_client.models.instance import Instance from unity_sps_ogc_processes_api_python_client.models.status import Status from unity_sps_ogc_processes_api_python_client.models.title import Title -from typing import Optional, Set -from typing_extensions import Self + class Exception(BaseModel): """ Exception - """ # noqa: E501 + """ # noqa: E501 + type: Optional[Any] title: Optional[Title] = None status: Optional[Status] = None detail: Optional[Detail] = None instance: Optional[Instance] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + __properties: ClassVar[List[str]] = [ + "type", + "title", + "status", + "detail", + "instance", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +53,6 @@ class Exception(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,9 +78,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) + excluded_fields: Set[str] = set( + [ + "additional_properties", + ] + ) _dict = self.model_dump( by_alias=True, @@ -81,16 +91,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of title if self.title: - _dict['title'] = self.title.to_dict() + _dict["title"] = self.title.to_dict() # override the default output from pydantic by calling `to_dict()` of status if self.status: - _dict['status'] = self.status.to_dict() + _dict["status"] = self.status.to_dict() # override the default output from pydantic by calling `to_dict()` of detail if self.detail: - _dict['detail'] = self.detail.to_dict() + _dict["detail"] = self.detail.to_dict() # override the default output from pydantic by calling `to_dict()` of instance if self.instance: - _dict['instance'] = self.instance.to_dict() + _dict["instance"] = self.instance.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -99,7 +109,7 @@ def to_dict(self) -> Dict[str, Any]: # set to None if type (nullable) is None # and model_fields_set contains the field if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None + _dict["type"] = None return _dict @@ -112,18 +122,34 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "title": Title.from_dict(obj["title"]) if obj.get("title") is not None else None, - "status": Status.from_dict(obj["status"]) if obj.get("status") is not None else None, - "detail": Detail.from_dict(obj["detail"]) if obj.get("detail") is not None else None, - "instance": Instance.from_dict(obj["instance"]) if obj.get("instance") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "title": ( + Title.from_dict(obj["title"]) + if obj.get("title") is not None + else None + ), + "status": ( + Status.from_dict(obj["status"]) + if obj.get("status") is not None + else None + ), + "detail": ( + Detail.from_dict(obj["detail"]) + if obj.get("detail") is not None + else None + ), + "instance": ( + Instance.from_dict(obj["instance"]) + if obj.get("instance") is not None + else None + ), + } + ) # store additional fields in additional_properties for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/execute.py b/unity_sps_ogc_processes_api_python_client/models/execute.py index 800a0c4..9083fa4 100644 --- a/unity_sps_ogc_processes_api_python_client/models/execute.py +++ b/unity_sps_ogc_processes_api_python_client/models/execute.py @@ -13,20 +13,23 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.subscriber import Subscriber -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.subscriber import Subscriber + + class Execute(BaseModel): """ Execute - """ # noqa: E501 + """ # noqa: E501 + inputs: Optional[Any] = None outputs: Optional[Any] = None subscriber: Optional[Subscriber] = None @@ -38,7 +41,6 @@ class Execute(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,27 +74,27 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of inputs if self.inputs: - _dict['inputs'] = self.inputs.to_dict() + _dict["inputs"] = self.inputs.to_dict() # override the default output from pydantic by calling `to_dict()` of outputs if self.outputs: - _dict['outputs'] = self.outputs.to_dict() + _dict["outputs"] = self.outputs.to_dict() # override the default output from pydantic by calling `to_dict()` of subscriber if self.subscriber: - _dict['subscriber'] = self.subscriber.to_dict() + _dict["subscriber"] = self.subscriber.to_dict() # set to None if inputs (nullable) is None # and model_fields_set contains the field if self.inputs is None and "inputs" in self.model_fields_set: - _dict['inputs'] = None + _dict["inputs"] = None # set to None if outputs (nullable) is None # and model_fields_set contains the field if self.outputs is None and "outputs" in self.model_fields_set: - _dict['outputs'] = None + _dict["outputs"] = None # set to None if subscriber (nullable) is None # and model_fields_set contains the field if self.subscriber is None and "subscriber" in self.model_fields_set: - _dict['subscriber'] = None + _dict["subscriber"] = None return _dict @@ -106,9 +107,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "inputs": AnyOf.from_dict(obj["inputs"]) if obj.get("inputs") is not None else None, # noqa: F821 - "outputs": AnyOf.from_dict(obj["outputs"]) if obj.get("outputs") is not None else None, # noqa: F821 - "subscriber": Subscriber.from_dict(obj["subscriber"]) if obj.get("subscriber") is not None else None - }) + _obj = cls.model_validate( + { + "inputs": ( + AnyOf.from_dict(obj["inputs"]) + if obj.get("inputs") is not None + else None + ), # noqa: F821 + "outputs": ( + AnyOf.from_dict(obj["outputs"]) + if obj.get("outputs") is not None + else None + ), # noqa: F821 + "subscriber": ( + Subscriber.from_dict(obj["subscriber"]) + if obj.get("subscriber") is not None + else None + ), + } + ) return _obj diff --git a/unity_sps_ogc_processes_api_python_client/models/health_check.py b/unity_sps_ogc_processes_api_python_client/models/health_check.py index 56d7090..11b3d3d 100644 --- a/unity_sps_ogc_processes_api_python_client/models/health_check.py +++ b/unity_sps_ogc_processes_api_python_client/models/health_check.py @@ -13,20 +13,22 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class HealthCheck(BaseModel): """ Response model to validate and return when performing a health check. - """ # noqa: E501 - status: Optional[StrictStr] = 'OK' + """ # noqa: E501 + + status: Optional[StrictStr] = "OK" __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( @@ -35,7 +37,6 @@ class HealthCheck(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,9 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else 'OK' - }) + _obj = cls.model_validate( + {"status": obj.get("status") if obj.get("status") is not None else "OK"} + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/http_validation_error.py b/unity_sps_ogc_processes_api_python_client/models/http_validation_error.py index bb3c650..283265a 100644 --- a/unity_sps_ogc_processes_api_python_client/models/http_validation_error.py +++ b/unity_sps_ogc_processes_api_python_client/models/http_validation_error.py @@ -13,20 +13,25 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.validation_error import ValidationError -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.validation_error import ( + ValidationError, +) + + class HTTPValidationError(BaseModel): """ HTTPValidationError - """ # noqa: E501 + """ # noqa: E501 + detail: Optional[List[ValidationError]] = None __properties: ClassVar[List[str]] = ["detail"] @@ -36,7 +41,6 @@ class HTTPValidationError(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.detail: if _item: _items.append(_item.to_dict()) - _dict['detail'] = _items + _dict["detail"] = _items return _dict @classmethod @@ -87,9 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "detail": [ValidationError.from_dict(_item) for _item in obj["detail"]] if obj.get("detail") is not None else None - }) + _obj = cls.model_validate( + { + "detail": ( + [ValidationError.from_dict(_item) for _item in obj["detail"]] + if obj.get("detail") is not None + else None + ) + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/input_value_input.py b/unity_sps_ogc_processes_api_python_client/models/input_value_input.py index ce45111..e2dd4da 100644 --- a/unity_sps_ogc_processes_api_python_client/models/input_value_input.py +++ b/unity_sps_ogc_processes_api_python_client/models/input_value_input.py @@ -13,19 +13,22 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import InputValueNoObjectInput -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self + +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_input import ( + InputValueNoObjectInput, +) INPUTVALUEINPUT_ANY_OF_SCHEMAS = ["InputValueNoObjectInput", "object"] + class InputValueInput(BaseModel): """ InputValueInput @@ -39,7 +42,7 @@ class InputValueInput(BaseModel): actual_instance: Optional[Union[InputValueNoObjectInput, object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "InputValueNoObjectInput", "object" } + any_of_schemas: Set[str] = {"InputValueNoObjectInput", "object"} model_config = { "validate_assignment": True, @@ -49,20 +52,26 @@ class InputValueInput(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = InputValueInput.model_construct() error_messages = [] # validate data type: InputValueNoObjectInput if not isinstance(v, InputValueNoObjectInput): - error_messages.append(f"Error! Input type `{type(v)}` is not `InputValueNoObjectInput`") + error_messages.append( + f"Error! Input type `{type(v)}` is not `InputValueNoObjectInput`" + ) else: return v @@ -74,7 +83,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in InputValueInput with anyOf schemas: InputValueNoObjectInput, object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in InputValueInput with anyOf schemas: InputValueNoObjectInput, object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -92,7 +104,7 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = InputValueNoObjectInput.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) # deserialize data into object try: # validation @@ -105,7 +117,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into InputValueInput with anyOf schemas: InputValueNoObjectInput, object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into InputValueInput with anyOf schemas: InputValueNoObjectInput, object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -114,17 +129,23 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], InputValueNoObjectInput, object]]: + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], InputValueNoObjectInput, object]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -132,5 +153,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], InputValueNoObjectInput, obj def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_input.py b/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_input.py index 93ca0a8..cd31244 100644 --- a/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_input.py +++ b/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_input.py @@ -13,18 +13,34 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional, Union +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Union + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + from unity_sps_ogc_processes_api_python_client.models.bbox import Bbox -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field -INPUTVALUENOOBJECTINPUT_ANY_OF_SCHEMAS = ["Bbox", "List[object]", "bool", "float", "int", "str"] +INPUTVALUENOOBJECTINPUT_ANY_OF_SCHEMAS = [ + "Bbox", + "List[object]", + "bool", + "float", + "int", + "str", +] + class InputValueNoObjectInput(BaseModel): """ @@ -46,10 +62,12 @@ class InputValueNoObjectInput(BaseModel): # data type: Bbox anyof_schema_7_validator: Optional[Bbox] = None if TYPE_CHECKING: - actual_instance: Optional[Union[Bbox, List[object], bool, float, int, str]] = None + actual_instance: Optional[Union[Bbox, List[object], bool, float, int, str]] = ( + None + ) else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Bbox", "List[object]", "bool", "float", "int", "str" } + any_of_schemas: Set[str] = {"Bbox", "List[object]", "bool", "float", "int", "str"} model_config = { "validate_assignment": True, @@ -59,14 +77,18 @@ class InputValueNoObjectInput(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = InputValueNoObjectInput.model_construct() error_messages = [] @@ -114,7 +136,10 @@ def actual_instance_must_validate_anyof(cls, v): if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in InputValueNoObjectInput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in InputValueNoObjectInput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @@ -186,11 +211,14 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = Bbox.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into InputValueNoObjectInput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into InputValueNoObjectInput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -199,17 +227,23 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, float, int, str]]: + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, float, int, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -217,5 +251,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, fl def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_output.py b/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_output.py index d2df379..c493c5f 100644 --- a/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_output.py +++ b/unity_sps_ogc_processes_api_python_client/models/input_value_no_object_output.py @@ -13,18 +13,34 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional, Union +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Union + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + from unity_sps_ogc_processes_api_python_client.models.bbox import Bbox -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field -INPUTVALUENOOBJECTOUTPUT_ANY_OF_SCHEMAS = ["Bbox", "List[object]", "bool", "float", "int", "str"] +INPUTVALUENOOBJECTOUTPUT_ANY_OF_SCHEMAS = [ + "Bbox", + "List[object]", + "bool", + "float", + "int", + "str", +] + class InputValueNoObjectOutput(BaseModel): """ @@ -46,10 +62,12 @@ class InputValueNoObjectOutput(BaseModel): # data type: Bbox anyof_schema_7_validator: Optional[Bbox] = None if TYPE_CHECKING: - actual_instance: Optional[Union[Bbox, List[object], bool, float, int, str]] = None + actual_instance: Optional[Union[Bbox, List[object], bool, float, int, str]] = ( + None + ) else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Bbox", "List[object]", "bool", "float", "int", "str" } + any_of_schemas: Set[str] = {"Bbox", "List[object]", "bool", "float", "int", "str"} model_config = { "validate_assignment": True, @@ -59,14 +77,18 @@ class InputValueNoObjectOutput(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = InputValueNoObjectOutput.model_construct() error_messages = [] @@ -114,7 +136,10 @@ def actual_instance_must_validate_anyof(cls, v): if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in InputValueNoObjectOutput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in InputValueNoObjectOutput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @@ -186,11 +211,14 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = Bbox.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into InputValueNoObjectOutput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into InputValueNoObjectOutput with anyOf schemas: Bbox, List[object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -199,17 +227,23 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, float, int, str]]: + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, float, int, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -217,5 +251,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Bbox, List[object], bool, fl def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/input_value_output.py b/unity_sps_ogc_processes_api_python_client/models/input_value_output.py index 5247556..1575ee0 100644 --- a/unity_sps_ogc_processes_api_python_client/models/input_value_output.py +++ b/unity_sps_ogc_processes_api_python_client/models/input_value_output.py @@ -13,19 +13,22 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import InputValueNoObjectOutput -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self + +from unity_sps_ogc_processes_api_python_client.models.input_value_no_object_output import ( + InputValueNoObjectOutput, +) INPUTVALUEOUTPUT_ANY_OF_SCHEMAS = ["InputValueNoObjectOutput", "object"] + class InputValueOutput(BaseModel): """ InputValueOutput @@ -39,7 +42,7 @@ class InputValueOutput(BaseModel): actual_instance: Optional[Union[InputValueNoObjectOutput, object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "InputValueNoObjectOutput", "object" } + any_of_schemas: Set[str] = {"InputValueNoObjectOutput", "object"} model_config = { "validate_assignment": True, @@ -49,20 +52,26 @@ class InputValueOutput(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = InputValueOutput.model_construct() error_messages = [] # validate data type: InputValueNoObjectOutput if not isinstance(v, InputValueNoObjectOutput): - error_messages.append(f"Error! Input type `{type(v)}` is not `InputValueNoObjectOutput`") + error_messages.append( + f"Error! Input type `{type(v)}` is not `InputValueNoObjectOutput`" + ) else: return v @@ -74,7 +83,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in InputValueOutput with anyOf schemas: InputValueNoObjectOutput, object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in InputValueOutput with anyOf schemas: InputValueNoObjectOutput, object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -92,7 +104,7 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = InputValueNoObjectOutput.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) # deserialize data into object try: # validation @@ -105,7 +117,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into InputValueOutput with anyOf schemas: InputValueNoObjectOutput, object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into InputValueOutput with anyOf schemas: InputValueNoObjectOutput, object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -114,17 +129,23 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], InputValueNoObjectOutput, object]]: + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], InputValueNoObjectOutput, object]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -132,5 +153,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], InputValueNoObjectOutput, ob def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/instance.py b/unity_sps_ogc_processes_api_python_client/models/instance.py index 4858ddd..cad04fb 100644 --- a/unity_sps_ogc_processes_api_python_client/models/instance.py +++ b/unity_sps_ogc_processes_api_python_client/models/instance.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self INSTANCE_ANY_OF_SCHEMAS = ["object"] + class Instance(BaseModel): """ Instance @@ -38,7 +38,7 @@ class Instance(BaseModel): actual_instance: Optional[Union[object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } + any_of_schemas: Set[str] = {"object"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class Instance(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = Instance.model_construct() error_messages = [] @@ -73,7 +77,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Instance with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Instance with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -107,7 +114,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Instance with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Instance with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -116,7 +126,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -126,7 +138,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -134,5 +148,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/job_control_options.py b/unity_sps_ogc_processes_api_python_client/models/job_control_options.py index c7a0e9d..b8b0c8a 100644 --- a/unity_sps_ogc_processes_api_python_client/models/job_control_options.py +++ b/unity_sps_ogc_processes_api_python_client/models/job_control_options.py @@ -13,8 +13,10 @@ from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,13 +28,11 @@ class JobControlOptions(str, Enum): """ allowed enum values """ - SYNC_MINUS_EXECUTE = 'sync-execute' - ASYNC_MINUS_EXECUTE = 'async-execute' - DISMISS = 'dismiss' + SYNC_MINUS_EXECUTE = "sync-execute" + ASYNC_MINUS_EXECUTE = "async-execute" + DISMISS = "dismiss" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of JobControlOptions from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/job_list.py b/unity_sps_ogc_processes_api_python_client/models/job_list.py index d5faadd..0a1b613 100644 --- a/unity_sps_ogc_processes_api_python_client/models/job_list.py +++ b/unity_sps_ogc_processes_api_python_client/models/job_list.py @@ -13,21 +13,24 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from unity_sps_ogc_processes_api_python_client.models.link import Link from unity_sps_ogc_processes_api_python_client.models.status_info import StatusInfo -from typing import Optional, Set -from typing_extensions import Self + class JobList(BaseModel): """ JobList - """ # noqa: E501 + """ # noqa: E501 + jobs: List[StatusInfo] links: List[Link] __properties: ClassVar[List[str]] = ["jobs", "links"] @@ -38,7 +41,6 @@ class JobList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,14 +78,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.jobs: if _item: _items.append(_item.to_dict()) - _dict['jobs'] = _items + _dict["jobs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items return _dict @classmethod @@ -96,10 +97,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "jobs": [StatusInfo.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None, - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None - }) + _obj = cls.model_validate( + { + "jobs": ( + [StatusInfo.from_dict(_item) for _item in obj["jobs"]] + if obj.get("jobs") is not None + else None + ), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/landing_page.py b/unity_sps_ogc_processes_api_python_client/models/landing_page.py index 2e6c8be..d568b09 100644 --- a/unity_sps_ogc_processes_api_python_client/models/landing_page.py +++ b/unity_sps_ogc_processes_api_python_client/models/landing_page.py @@ -13,20 +13,23 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.link import Link -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.link import Link + + class LandingPage(BaseModel): """ LandingPage - """ # noqa: E501 + """ # noqa: E501 + title: Optional[StrictStr] = None description: Optional[StrictStr] = None attribution: Optional[StrictStr] = None @@ -39,7 +42,6 @@ class LandingPage(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,21 +79,21 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None # set to None if attribution (nullable) is None # and model_fields_set contains the field if self.attribution is None and "attribution" in self.model_fields_set: - _dict['attribution'] = None + _dict["attribution"] = None return _dict @@ -105,12 +106,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title"), - "description": obj.get("description"), - "attribution": obj.get("attribution"), - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None - }) + _obj = cls.model_validate( + { + "title": obj.get("title"), + "description": obj.get("description"), + "attribution": obj.get("attribution"), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/link.py b/unity_sps_ogc_processes_api_python_client/models/link.py index e1c4d15..61d3d9d 100644 --- a/unity_sps_ogc_processes_api_python_client/models/link.py +++ b/unity_sps_ogc_processes_api_python_client/models/link.py @@ -13,19 +13,21 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class Link(BaseModel): """ Link - """ # noqa: E501 + """ # noqa: E501 + href: StrictStr rel: Optional[StrictStr] = None type: Optional[StrictStr] = None @@ -39,7 +41,6 @@ class Link(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,22 +75,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if rel (nullable) is None # and model_fields_set contains the field if self.rel is None and "rel" in self.model_fields_set: - _dict['rel'] = None + _dict["rel"] = None # set to None if type (nullable) is None # and model_fields_set contains the field if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None + _dict["type"] = None # set to None if hreflang (nullable) is None # and model_fields_set contains the field if self.hreflang is None and "hreflang" in self.model_fields_set: - _dict['hreflang'] = None + _dict["hreflang"] = None # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None return _dict @@ -103,13 +103,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href"), - "rel": obj.get("rel"), - "type": obj.get("type"), - "hreflang": obj.get("hreflang"), - "title": obj.get("title") - }) + _obj = cls.model_validate( + { + "href": obj.get("href"), + "rel": obj.get("rel"), + "type": obj.get("type"), + "hreflang": obj.get("hreflang"), + "title": obj.get("title"), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/metadata.py b/unity_sps_ogc_processes_api_python_client/models/metadata.py index c016f0b..d1054b3 100644 --- a/unity_sps_ogc_processes_api_python_client/models/metadata.py +++ b/unity_sps_ogc_processes_api_python_client/models/metadata.py @@ -13,20 +13,21 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Optional +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self + from unity_sps_ogc_processes_api_python_client.models.metadata1 import Metadata1 from unity_sps_ogc_processes_api_python_client.models.metadata2 import Metadata2 -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field METADATA_ANY_OF_SCHEMAS = ["Metadata1", "Metadata2"] + class Metadata(BaseModel): """ Metadata @@ -40,7 +41,7 @@ class Metadata(BaseModel): actual_instance: Optional[Union[Metadata1, Metadata2]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Metadata1", "Metadata2" } + any_of_schemas: Set[str] = {"Metadata1", "Metadata2"} model_config = { "validate_assignment": True, @@ -50,14 +51,18 @@ class Metadata(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = Metadata.model_construct() error_messages = [] @@ -75,7 +80,10 @@ def actual_instance_must_validate_anyof(cls, v): if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Metadata with anyOf schemas: Metadata1, Metadata2. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Metadata with anyOf schemas: Metadata1, Metadata2. Details: " + + ", ".join(error_messages) + ) else: return v @@ -93,17 +101,20 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = Metadata1.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) # anyof_schema_2_validator: Optional[Metadata2] = None try: instance.actual_instance = Metadata2.from_json(json_str) return instance except (ValidationError, ValueError) as e: - error_messages.append(str(e)) + error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Metadata with anyOf schemas: Metadata1, Metadata2. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Metadata with anyOf schemas: Metadata1, Metadata2. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -112,7 +123,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -122,7 +135,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Metadata1, Metadata2]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -130,5 +145,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Metadata1, Metadata2]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/metadata1.py b/unity_sps_ogc_processes_api_python_client/models/metadata1.py index 1bff6b4..b875c64 100644 --- a/unity_sps_ogc_processes_api_python_client/models/metadata1.py +++ b/unity_sps_ogc_processes_api_python_client/models/metadata1.py @@ -13,26 +13,35 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class Metadata1(BaseModel): """ Metadata1 - """ # noqa: E501 + """ # noqa: E501 + href: StrictStr rel: Optional[StrictStr] = None type: Optional[StrictStr] = None hreflang: Optional[StrictStr] = None title: Optional[StrictStr] = None role: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["href", "rel", "type", "hreflang", "title", "role"] + __properties: ClassVar[List[str]] = [ + "href", + "rel", + "type", + "hreflang", + "title", + "role", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +49,6 @@ class Metadata1(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,27 +83,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if rel (nullable) is None # and model_fields_set contains the field if self.rel is None and "rel" in self.model_fields_set: - _dict['rel'] = None + _dict["rel"] = None # set to None if type (nullable) is None # and model_fields_set contains the field if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None + _dict["type"] = None # set to None if hreflang (nullable) is None # and model_fields_set contains the field if self.hreflang is None and "hreflang" in self.model_fields_set: - _dict['hreflang'] = None + _dict["hreflang"] = None # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if role (nullable) is None # and model_fields_set contains the field if self.role is None and "role" in self.model_fields_set: - _dict['role'] = None + _dict["role"] = None return _dict @@ -109,14 +116,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href"), - "rel": obj.get("rel"), - "type": obj.get("type"), - "hreflang": obj.get("hreflang"), - "title": obj.get("title"), - "role": obj.get("role") - }) + _obj = cls.model_validate( + { + "href": obj.get("href"), + "rel": obj.get("rel"), + "type": obj.get("type"), + "hreflang": obj.get("hreflang"), + "title": obj.get("title"), + "role": obj.get("role"), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/metadata2.py b/unity_sps_ogc_processes_api_python_client/models/metadata2.py index 0ec66ec..e4002c7 100644 --- a/unity_sps_ogc_processes_api_python_client/models/metadata2.py +++ b/unity_sps_ogc_processes_api_python_client/models/metadata2.py @@ -13,20 +13,23 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.value import Value -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.value import Value + + class Metadata2(BaseModel): """ Metadata2 - """ # noqa: E501 + """ # noqa: E501 + role: Optional[StrictStr] = None title: Optional[StrictStr] = None lang: Optional[StrictStr] = None @@ -39,7 +42,6 @@ class Metadata2(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,26 +75,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of value if self.value: - _dict['value'] = self.value.to_dict() + _dict["value"] = self.value.to_dict() # set to None if role (nullable) is None # and model_fields_set contains the field if self.role is None and "role" in self.model_fields_set: - _dict['role'] = None + _dict["role"] = None # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if lang (nullable) is None # and model_fields_set contains the field if self.lang is None and "lang" in self.model_fields_set: - _dict['lang'] = None + _dict["lang"] = None # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: - _dict['value'] = None + _dict["value"] = None return _dict @@ -106,12 +107,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "role": obj.get("role"), - "title": obj.get("title"), - "lang": obj.get("lang"), - "value": Value.from_dict(obj["value"]) if obj.get("value") is not None else None - }) + _obj = cls.model_validate( + { + "role": obj.get("role"), + "title": obj.get("title"), + "lang": obj.get("lang"), + "value": ( + Value.from_dict(obj["value"]) + if obj.get("value") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/process_input.py b/unity_sps_ogc_processes_api_python_client/models/process_input.py index 03e038c..a88354d 100644 --- a/unity_sps_ogc_processes_api_python_client/models/process_input.py +++ b/unity_sps_ogc_processes_api_python_client/models/process_input.py @@ -13,34 +13,54 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.input_value_input import InputValueInput -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions +from typing_extensions import Self + +from unity_sps_ogc_processes_api_python_client.models.input_value_input import ( + InputValueInput, +) +from unity_sps_ogc_processes_api_python_client.models.job_control_options import ( + JobControlOptions, +) from unity_sps_ogc_processes_api_python_client.models.link import Link from unity_sps_ogc_processes_api_python_client.models.metadata import Metadata -from typing import Optional, Set -from typing_extensions import Self + class ProcessInput(BaseModel): """ ProcessInput - """ # noqa: E501 + """ # noqa: E501 + title: Optional[StrictStr] = None description: Optional[StrictStr] = None keywords: Optional[List[StrictStr]] = None metadata: Optional[List[Metadata]] = None id: StrictStr version: StrictStr - job_control_options: Optional[List[JobControlOptions]] = Field(default=None, alias="jobControlOptions") + job_control_options: Optional[List[JobControlOptions]] = Field( + default=None, alias="jobControlOptions" + ) links: Optional[List[Link]] = None inputs: Optional[List[InputValueInput]] = None outputs: Optional[List[InputValueInput]] = None - __properties: ClassVar[List[str]] = ["title", "description", "keywords", "metadata", "id", "version", "jobControlOptions", "links", "inputs", "outputs"] + __properties: ClassVar[List[str]] = [ + "title", + "description", + "keywords", + "metadata", + "id", + "version", + "jobControlOptions", + "links", + "inputs", + "outputs", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +68,6 @@ class ProcessInput(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -87,67 +105,70 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.metadata: if _item: _items.append(_item.to_dict()) - _dict['metadata'] = _items + _dict["metadata"] = _items # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) _items = [] if self.inputs: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict['inputs'] = _items + _dict["inputs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict['outputs'] = _items + _dict["outputs"] = _items # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None # set to None if keywords (nullable) is None # and model_fields_set contains the field if self.keywords is None and "keywords" in self.model_fields_set: - _dict['keywords'] = None + _dict["keywords"] = None # set to None if metadata (nullable) is None # and model_fields_set contains the field if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None + _dict["metadata"] = None # set to None if job_control_options (nullable) is None # and model_fields_set contains the field - if self.job_control_options is None and "job_control_options" in self.model_fields_set: - _dict['jobControlOptions'] = None + if ( + self.job_control_options is None + and "job_control_options" in self.model_fields_set + ): + _dict["jobControlOptions"] = None # set to None if links (nullable) is None # and model_fields_set contains the field if self.links is None and "links" in self.model_fields_set: - _dict['links'] = None + _dict["links"] = None # set to None if inputs (nullable) is None # and model_fields_set contains the field if self.inputs is None and "inputs" in self.model_fields_set: - _dict['inputs'] = None + _dict["inputs"] = None # set to None if outputs (nullable) is None # and model_fields_set contains the field if self.outputs is None and "outputs" in self.model_fields_set: - _dict['outputs'] = None + _dict["outputs"] = None return _dict @@ -160,18 +181,34 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title"), - "description": obj.get("description"), - "keywords": obj.get("keywords"), - "metadata": [Metadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "id": obj.get("id"), - "version": obj.get("version"), - "jobControlOptions": obj.get("jobControlOptions"), - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None, - "inputs": [InputValueInput.from_dict(_item) for _item in obj["inputs"]] if obj.get("inputs") is not None else None, - "outputs": [InputValueInput.from_dict(_item) for _item in obj["outputs"]] if obj.get("outputs") is not None else None - }) + _obj = cls.model_validate( + { + "title": obj.get("title"), + "description": obj.get("description"), + "keywords": obj.get("keywords"), + "metadata": ( + [Metadata.from_dict(_item) for _item in obj["metadata"]] + if obj.get("metadata") is not None + else None + ), + "id": obj.get("id"), + "version": obj.get("version"), + "jobControlOptions": obj.get("jobControlOptions"), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + "inputs": ( + [InputValueInput.from_dict(_item) for _item in obj["inputs"]] + if obj.get("inputs") is not None + else None + ), + "outputs": ( + [InputValueInput.from_dict(_item) for _item in obj["outputs"]] + if obj.get("outputs") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/process_list.py b/unity_sps_ogc_processes_api_python_client/models/process_list.py index 560e44a..931b8e9 100644 --- a/unity_sps_ogc_processes_api_python_client/models/process_list.py +++ b/unity_sps_ogc_processes_api_python_client/models/process_list.py @@ -13,21 +13,26 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from unity_sps_ogc_processes_api_python_client.models.link import Link -from unity_sps_ogc_processes_api_python_client.models.process_summary import ProcessSummary -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.link import Link +from unity_sps_ogc_processes_api_python_client.models.process_summary import ( + ProcessSummary, +) + + class ProcessList(BaseModel): """ ProcessList - """ # noqa: E501 + """ # noqa: E501 + processes: List[ProcessSummary] links: List[Link] __properties: ClassVar[List[str]] = ["processes", "links"] @@ -38,7 +43,6 @@ class ProcessList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,14 +80,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.processes: if _item: _items.append(_item.to_dict()) - _dict['processes'] = _items + _dict["processes"] = _items # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items return _dict @classmethod @@ -96,10 +99,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "processes": [ProcessSummary.from_dict(_item) for _item in obj["processes"]] if obj.get("processes") is not None else None, - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None - }) + _obj = cls.model_validate( + { + "processes": ( + [ProcessSummary.from_dict(_item) for _item in obj["processes"]] + if obj.get("processes") is not None + else None + ), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/process_output.py b/unity_sps_ogc_processes_api_python_client/models/process_output.py index a7b96dc..4582356 100644 --- a/unity_sps_ogc_processes_api_python_client/models/process_output.py +++ b/unity_sps_ogc_processes_api_python_client/models/process_output.py @@ -13,34 +13,54 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.input_value_output import InputValueOutput -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions +from typing_extensions import Self + +from unity_sps_ogc_processes_api_python_client.models.input_value_output import ( + InputValueOutput, +) +from unity_sps_ogc_processes_api_python_client.models.job_control_options import ( + JobControlOptions, +) from unity_sps_ogc_processes_api_python_client.models.link import Link from unity_sps_ogc_processes_api_python_client.models.metadata import Metadata -from typing import Optional, Set -from typing_extensions import Self + class ProcessOutput(BaseModel): """ ProcessOutput - """ # noqa: E501 + """ # noqa: E501 + title: Optional[StrictStr] = None description: Optional[StrictStr] = None keywords: Optional[List[StrictStr]] = None metadata: Optional[List[Metadata]] = None id: StrictStr version: StrictStr - job_control_options: Optional[List[JobControlOptions]] = Field(default=None, alias="jobControlOptions") + job_control_options: Optional[List[JobControlOptions]] = Field( + default=None, alias="jobControlOptions" + ) links: Optional[List[Link]] = None inputs: Optional[List[InputValueOutput]] = None outputs: Optional[List[InputValueOutput]] = None - __properties: ClassVar[List[str]] = ["title", "description", "keywords", "metadata", "id", "version", "jobControlOptions", "links", "inputs", "outputs"] + __properties: ClassVar[List[str]] = [ + "title", + "description", + "keywords", + "metadata", + "id", + "version", + "jobControlOptions", + "links", + "inputs", + "outputs", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +68,6 @@ class ProcessOutput(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -87,67 +105,70 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.metadata: if _item: _items.append(_item.to_dict()) - _dict['metadata'] = _items + _dict["metadata"] = _items # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) _items = [] if self.inputs: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict['inputs'] = _items + _dict["inputs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict['outputs'] = _items + _dict["outputs"] = _items # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None # set to None if keywords (nullable) is None # and model_fields_set contains the field if self.keywords is None and "keywords" in self.model_fields_set: - _dict['keywords'] = None + _dict["keywords"] = None # set to None if metadata (nullable) is None # and model_fields_set contains the field if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None + _dict["metadata"] = None # set to None if job_control_options (nullable) is None # and model_fields_set contains the field - if self.job_control_options is None and "job_control_options" in self.model_fields_set: - _dict['jobControlOptions'] = None + if ( + self.job_control_options is None + and "job_control_options" in self.model_fields_set + ): + _dict["jobControlOptions"] = None # set to None if links (nullable) is None # and model_fields_set contains the field if self.links is None and "links" in self.model_fields_set: - _dict['links'] = None + _dict["links"] = None # set to None if inputs (nullable) is None # and model_fields_set contains the field if self.inputs is None and "inputs" in self.model_fields_set: - _dict['inputs'] = None + _dict["inputs"] = None # set to None if outputs (nullable) is None # and model_fields_set contains the field if self.outputs is None and "outputs" in self.model_fields_set: - _dict['outputs'] = None + _dict["outputs"] = None return _dict @@ -160,18 +181,34 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title"), - "description": obj.get("description"), - "keywords": obj.get("keywords"), - "metadata": [Metadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "id": obj.get("id"), - "version": obj.get("version"), - "jobControlOptions": obj.get("jobControlOptions"), - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None, - "inputs": [InputValueOutput.from_dict(_item) for _item in obj["inputs"]] if obj.get("inputs") is not None else None, - "outputs": [InputValueOutput.from_dict(_item) for _item in obj["outputs"]] if obj.get("outputs") is not None else None - }) + _obj = cls.model_validate( + { + "title": obj.get("title"), + "description": obj.get("description"), + "keywords": obj.get("keywords"), + "metadata": ( + [Metadata.from_dict(_item) for _item in obj["metadata"]] + if obj.get("metadata") is not None + else None + ), + "id": obj.get("id"), + "version": obj.get("version"), + "jobControlOptions": obj.get("jobControlOptions"), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + "inputs": ( + [InputValueOutput.from_dict(_item) for _item in obj["inputs"]] + if obj.get("inputs") is not None + else None + ), + "outputs": ( + [InputValueOutput.from_dict(_item) for _item in obj["outputs"]] + if obj.get("outputs") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/process_summary.py b/unity_sps_ogc_processes_api_python_client/models/process_summary.py index 1c987dc..39c77c4 100644 --- a/unity_sps_ogc_processes_api_python_client/models/process_summary.py +++ b/unity_sps_ogc_processes_api_python_client/models/process_summary.py @@ -13,31 +13,47 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from unity_sps_ogc_processes_api_python_client.models.job_control_options import JobControlOptions +from typing_extensions import Self + +from unity_sps_ogc_processes_api_python_client.models.job_control_options import ( + JobControlOptions, +) from unity_sps_ogc_processes_api_python_client.models.link import Link from unity_sps_ogc_processes_api_python_client.models.metadata import Metadata -from typing import Optional, Set -from typing_extensions import Self + class ProcessSummary(BaseModel): """ ProcessSummary - """ # noqa: E501 + """ # noqa: E501 + title: Optional[StrictStr] = None description: Optional[StrictStr] = None keywords: Optional[List[StrictStr]] = None metadata: Optional[List[Metadata]] = None id: StrictStr version: StrictStr - job_control_options: Optional[List[JobControlOptions]] = Field(default=None, alias="jobControlOptions") + job_control_options: Optional[List[JobControlOptions]] = Field( + default=None, alias="jobControlOptions" + ) links: Optional[List[Link]] = None - __properties: ClassVar[List[str]] = ["title", "description", "keywords", "metadata", "id", "version", "jobControlOptions", "links"] + __properties: ClassVar[List[str]] = [ + "title", + "description", + "keywords", + "metadata", + "id", + "version", + "jobControlOptions", + "links", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +61,6 @@ class ProcessSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,43 +98,46 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.metadata: if _item: _items.append(_item.to_dict()) - _dict['metadata'] = _items + _dict["metadata"] = _items # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items # set to None if title (nullable) is None # and model_fields_set contains the field if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None + _dict["title"] = None # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None # set to None if keywords (nullable) is None # and model_fields_set contains the field if self.keywords is None and "keywords" in self.model_fields_set: - _dict['keywords'] = None + _dict["keywords"] = None # set to None if metadata (nullable) is None # and model_fields_set contains the field if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None + _dict["metadata"] = None # set to None if job_control_options (nullable) is None # and model_fields_set contains the field - if self.job_control_options is None and "job_control_options" in self.model_fields_set: - _dict['jobControlOptions'] = None + if ( + self.job_control_options is None + and "job_control_options" in self.model_fields_set + ): + _dict["jobControlOptions"] = None # set to None if links (nullable) is None # and model_fields_set contains the field if self.links is None and "links" in self.model_fields_set: - _dict['links'] = None + _dict["links"] = None return _dict @@ -133,16 +150,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title"), - "description": obj.get("description"), - "keywords": obj.get("keywords"), - "metadata": [Metadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "id": obj.get("id"), - "version": obj.get("version"), - "jobControlOptions": obj.get("jobControlOptions"), - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None - }) + _obj = cls.model_validate( + { + "title": obj.get("title"), + "description": obj.get("description"), + "keywords": obj.get("keywords"), + "metadata": ( + [Metadata.from_dict(_item) for _item in obj["metadata"]] + if obj.get("metadata") is not None + else None + ), + "id": obj.get("id"), + "version": obj.get("version"), + "jobControlOptions": obj.get("jobControlOptions"), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/status.py b/unity_sps_ogc_processes_api_python_client/models/status.py index d32ff1b..44ac869 100644 --- a/unity_sps_ogc_processes_api_python_client/models/status.py +++ b/unity_sps_ogc_processes_api_python_client/models/status.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self STATUS_ANY_OF_SCHEMAS = ["object"] + class Status(BaseModel): """ Status @@ -38,7 +38,7 @@ class Status(BaseModel): actual_instance: Optional[Union[object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } + any_of_schemas: Set[str] = {"object"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class Status(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = Status.model_construct() error_messages = [] @@ -73,7 +77,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Status with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Status with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -107,7 +114,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Status with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Status with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -116,7 +126,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -126,7 +138,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -134,5 +148,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/status_code.py b/unity_sps_ogc_processes_api_python_client/models/status_code.py index a1ec7e0..e70ac07 100644 --- a/unity_sps_ogc_processes_api_python_client/models/status_code.py +++ b/unity_sps_ogc_processes_api_python_client/models/status_code.py @@ -13,8 +13,10 @@ from __future__ import annotations + import json from enum import Enum + from typing_extensions import Self @@ -26,15 +28,13 @@ class StatusCode(str, Enum): """ allowed enum values """ - ACCEPTED = 'accepted' - RUNNING = 'running' - SUCCESSFUL = 'successful' - FAILED = 'failed' - DISMISSED = 'dismissed' + ACCEPTED = "accepted" + RUNNING = "running" + SUCCESSFUL = "successful" + FAILED = "failed" + DISMISSED = "dismissed" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of StatusCode from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/status_info.py b/unity_sps_ogc_processes_api_python_client/models/status_info.py index 1ba99cb..ca3c91f 100644 --- a/unity_sps_ogc_processes_api_python_client/models/status_info.py +++ b/unity_sps_ogc_processes_api_python_client/models/status_info.py @@ -13,24 +13,26 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing_extensions import Annotated, Self + from unity_sps_ogc_processes_api_python_client.models.exception import Exception from unity_sps_ogc_processes_api_python_client.models.link import Link from unity_sps_ogc_processes_api_python_client.models.status_code import StatusCode -from typing import Optional, Set -from typing_extensions import Self + class StatusInfo(BaseModel): """ StatusInfo - """ # noqa: E501 + """ # noqa: E501 + process_id: Optional[StrictStr] = Field(default=None, alias="processID") type: Optional[Any] job_id: StrictStr = Field(alias="jobID") @@ -43,7 +45,20 @@ class StatusInfo(BaseModel): updated: Optional[datetime] = None progress: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None links: Optional[List[Link]] = None - __properties: ClassVar[List[str]] = ["processID", "type", "jobID", "status", "message", "exception", "created", "started", "finished", "updated", "progress", "links"] + __properties: ClassVar[List[str]] = [ + "processID", + "type", + "jobID", + "status", + "message", + "exception", + "created", + "started", + "finished", + "updated", + "progress", + "links", + ] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +66,6 @@ class StatusInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,8 +90,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -86,63 +99,63 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of exception if self.exception: - _dict['exception'] = self.exception.to_dict() + _dict["exception"] = self.exception.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in links (list) _items = [] if self.links: for _item in self.links: if _item: _items.append(_item.to_dict()) - _dict['links'] = _items + _dict["links"] = _items # set to None if process_id (nullable) is None # and model_fields_set contains the field if self.process_id is None and "process_id" in self.model_fields_set: - _dict['processID'] = None + _dict["processID"] = None # set to None if type (nullable) is None # and model_fields_set contains the field if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None + _dict["type"] = None # set to None if message (nullable) is None # and model_fields_set contains the field if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None + _dict["message"] = None # set to None if exception (nullable) is None # and model_fields_set contains the field if self.exception is None and "exception" in self.model_fields_set: - _dict['exception'] = None + _dict["exception"] = None # set to None if created (nullable) is None # and model_fields_set contains the field if self.created is None and "created" in self.model_fields_set: - _dict['created'] = None + _dict["created"] = None # set to None if started (nullable) is None # and model_fields_set contains the field if self.started is None and "started" in self.model_fields_set: - _dict['started'] = None + _dict["started"] = None # set to None if finished (nullable) is None # and model_fields_set contains the field if self.finished is None and "finished" in self.model_fields_set: - _dict['finished'] = None + _dict["finished"] = None # set to None if updated (nullable) is None # and model_fields_set contains the field if self.updated is None and "updated" in self.model_fields_set: - _dict['updated'] = None + _dict["updated"] = None # set to None if progress (nullable) is None # and model_fields_set contains the field if self.progress is None and "progress" in self.model_fields_set: - _dict['progress'] = None + _dict["progress"] = None # set to None if links (nullable) is None # and model_fields_set contains the field if self.links is None and "links" in self.model_fields_set: - _dict['links'] = None + _dict["links"] = None return _dict @@ -155,20 +168,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "processID": obj.get("processID"), - "type": obj.get("type"), - "jobID": obj.get("jobID"), - "status": obj.get("status"), - "message": obj.get("message"), - "exception": Exception.from_dict(obj["exception"]) if obj.get("exception") is not None else None, - "created": obj.get("created"), - "started": obj.get("started"), - "finished": obj.get("finished"), - "updated": obj.get("updated"), - "progress": obj.get("progress"), - "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None - }) + _obj = cls.model_validate( + { + "processID": obj.get("processID"), + "type": obj.get("type"), + "jobID": obj.get("jobID"), + "status": obj.get("status"), + "message": obj.get("message"), + "exception": ( + Exception.from_dict(obj["exception"]) + if obj.get("exception") is not None + else None + ), + "created": obj.get("created"), + "started": obj.get("started"), + "finished": obj.get("finished"), + "updated": obj.get("updated"), + "progress": obj.get("progress"), + "links": ( + [Link.from_dict(_item) for _item in obj["links"]] + if obj.get("links") is not None + else None + ), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/subscriber.py b/unity_sps_ogc_processes_api_python_client/models/subscriber.py index ae9f09d..9c72b05 100644 --- a/unity_sps_ogc_processes_api_python_client/models/subscriber.py +++ b/unity_sps_ogc_processes_api_python_client/models/subscriber.py @@ -13,23 +13,30 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +from typing_extensions import Annotated, Self + class Subscriber(BaseModel): """ Subscriber - """ # noqa: E501 - success_uri: Annotated[str, Field(min_length=1, strict=True)] = Field(alias="successUri") - in_progress_uri: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, alias="inProgressUri") - failed_uri: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, alias="failedUri") + """ # noqa: E501 + + success_uri: Annotated[str, Field(min_length=1, strict=True)] = Field( + alias="successUri" + ) + in_progress_uri: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default=None, alias="inProgressUri" + ) + failed_uri: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( + default=None, alias="failedUri" + ) __properties: ClassVar[List[str]] = ["successUri", "inProgressUri", "failedUri"] model_config = ConfigDict( @@ -38,7 +45,6 @@ class Subscriber(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +69,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,12 +79,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if in_progress_uri (nullable) is None # and model_fields_set contains the field if self.in_progress_uri is None and "in_progress_uri" in self.model_fields_set: - _dict['inProgressUri'] = None + _dict["inProgressUri"] = None # set to None if failed_uri (nullable) is None # and model_fields_set contains the field if self.failed_uri is None and "failed_uri" in self.model_fields_set: - _dict['failedUri'] = None + _dict["failedUri"] = None return _dict @@ -92,11 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "successUri": obj.get("successUri"), - "inProgressUri": obj.get("inProgressUri"), - "failedUri": obj.get("failedUri") - }) + _obj = cls.model_validate( + { + "successUri": obj.get("successUri"), + "inProgressUri": obj.get("inProgressUri"), + "failedUri": obj.get("failedUri"), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/title.py b/unity_sps_ogc_processes_api_python_client/models/title.py index d2713b1..32c29d9 100644 --- a/unity_sps_ogc_processes_api_python_client/models/title.py +++ b/unity_sps_ogc_processes_api_python_client/models/title.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, ValidationError, field_validator +from typing_extensions import Self TITLE_ANY_OF_SCHEMAS = ["object"] + class Title(BaseModel): """ Title @@ -38,7 +38,7 @@ class Title(BaseModel): actual_instance: Optional[Union[object]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } + any_of_schemas: Set[str] = {"object"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class Title(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = Title.model_construct() error_messages = [] @@ -73,7 +77,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Title with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Title with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return v @@ -107,7 +114,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Title with anyOf schemas: object. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Title with anyOf schemas: object. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -116,7 +126,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -126,7 +138,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -134,5 +148,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/validation_error.py b/unity_sps_ogc_processes_api_python_client/models/validation_error.py index e6a4409..2a9ae07 100644 --- a/unity_sps_ogc_processes_api_python_client/models/validation_error.py +++ b/unity_sps_ogc_processes_api_python_client/models/validation_error.py @@ -13,20 +13,25 @@ from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner -from typing import Optional, Set from typing_extensions import Self +from unity_sps_ogc_processes_api_python_client.models.validation_error_loc_inner import ( + ValidationErrorLocInner, +) + + class ValidationError(BaseModel): """ ValidationError - """ # noqa: E501 + """ # noqa: E501 + loc: List[ValidationErrorLocInner] msg: StrictStr type: StrictStr @@ -38,7 +43,6 @@ class ValidationError(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: Set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.loc: if _item: _items.append(_item.to_dict()) - _dict['loc'] = _items + _dict["loc"] = _items return _dict @classmethod @@ -89,11 +92,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, - "msg": obj.get("msg"), - "type": obj.get("type") - }) + _obj = cls.model_validate( + { + "loc": ( + [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] + if obj.get("loc") is not None + else None + ), + "msg": obj.get("msg"), + "type": obj.get("type"), + } + ) return _obj - - diff --git a/unity_sps_ogc_processes_api_python_client/models/validation_error_loc_inner.py b/unity_sps_ogc_processes_api_python_client/models/validation_error_loc_inner.py index 550a41a..5ab6327 100644 --- a/unity_sps_ogc_processes_api_python_client/models/validation_error_loc_inner.py +++ b/unity_sps_ogc_processes_api_python_client/models/validation_error_loc_inner.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, StrictInt, StrictStr, ValidationError, field_validator +from typing_extensions import Self VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"] + class ValidationErrorLocInner(BaseModel): """ ValidationErrorLocInner @@ -38,7 +38,7 @@ class ValidationErrorLocInner(BaseModel): actual_instance: Optional[Union[int, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "int", "str" } + any_of_schemas: Set[str] = {"int", "str"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class ValidationErrorLocInner(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): instance = ValidationErrorLocInner.model_construct() error_messages = [] @@ -73,7 +77,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return v @@ -107,7 +114,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -116,7 +126,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -126,7 +138,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -134,5 +148,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/models/value.py b/unity_sps_ogc_processes_api_python_client/models/value.py index f63d0e7..6357ebf 100644 --- a/unity_sps_ogc_processes_api_python_client/models/value.py +++ b/unity_sps_ogc_processes_api_python_client/models/value.py @@ -13,18 +13,18 @@ from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any, Dict, Optional, Set, Union + +from pydantic import BaseModel, StrictStr, ValidationError, field_validator +from typing_extensions import Self VALUE_ANY_OF_SCHEMAS = ["object", "str"] + class Value(BaseModel): """ Value @@ -38,7 +38,7 @@ class Value(BaseModel): actual_instance: Optional[Union[object, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } + any_of_schemas: Set[str] = {"object", "str"} model_config = { "validate_assignment": True, @@ -48,14 +48,18 @@ class Value(BaseModel): def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + raise ValueError( + "If a position argument is used, only 1 is allowed to set `actual_instance`" + ) if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") + raise ValueError( + "If a position argument is used, keyword arguments cannot be used." + ) super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -76,7 +80,10 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in Value with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in Value with anyOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) else: return v @@ -113,7 +120,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into Value with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Value with anyOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -122,7 +132,9 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + if hasattr(self.actual_instance, "to_json") and callable( + self.actual_instance.to_json + ): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) @@ -132,7 +144,9 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: if self.actual_instance is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + if hasattr(self.actual_instance, "to_dict") and callable( + self.actual_instance.to_dict + ): return self.actual_instance.to_dict() else: return self.actual_instance @@ -140,5 +154,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/unity_sps_ogc_processes_api_python_client/rest.py b/unity_sps_ogc_processes_api_python_client/rest.py index 583cf12..cbd97dd 100644 --- a/unity_sps_ogc_processes_api_python_client/rest.py +++ b/unity_sps_ogc_processes_api_python_client/rest.py @@ -19,7 +19,10 @@ import urllib3 -from unity_sps_ogc_processes_api_python_client.exceptions import ApiException, ApiValueError +from unity_sps_ogc_processes_api_python_client.exceptions import ( + ApiException, + ApiValueError, +) SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse @@ -78,22 +81,19 @@ def __init__(self, configuration) -> None: "key_file": configuration.key_file, } if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) + pool_args["assert_hostname"] = configuration.assert_hostname if configuration.retries is not None: - pool_args['retries'] = configuration.retries + pool_args["retries"] = configuration.retries if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - + pool_args["server_hostname"] = configuration.tls_server_name if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + pool_args["socket_options"] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + pool_args["maxsize"] = configuration.connection_pool_maxsize # https pool manager self.pool_manager: urllib3.PoolManager @@ -101,6 +101,7 @@ def __init__(self, configuration) -> None: if configuration.proxy: if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy pool_args["headers"] = configuration.proxy_headers self.pool_manager = SOCKSProxyManager(**pool_args) @@ -118,7 +119,7 @@ def request( headers=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ): """Perform requests. @@ -135,15 +136,7 @@ def request( (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( @@ -157,25 +150,18 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] + 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"]: # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): + content_type = headers.get("Content-Type") + if not content_type or re.search("json", content_type, re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) @@ -185,9 +171,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'application/x-www-form-urlencoded': + elif content_type == "application/x-www-form-urlencoded": r = self.pool_manager.request( method, url, @@ -195,15 +181,18 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'multipart/form-data': + elif 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"] # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + post_params = [ + (a, json.dumps(b)) if isinstance(b, dict) else (a, b) + for a, b in post_params + ] r = self.pool_manager.request( method, url, @@ -211,7 +200,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) # Pass a `string` parameter directly in the body to support # other content types than JSON when `body` argument is @@ -223,9 +212,9 @@ def request( body=body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, @@ -233,7 +222,8 @@ def request( body=request_body, preload_content=False, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -248,7 +238,7 @@ def request( fields={}, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)])