From 64fe80c0dd93ea312944688c1bf55241e98d9699 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Tue, 12 Nov 2024 21:14:45 -0500 Subject: [PATCH] fix deps --- README.md | 39 ++- ctrlplane-api-client/.gitignore | 23 -- ctrlplane-api-client/README.md | 124 -------- .../ctrlplane_api_client/__init__.py | 8 - .../ctrlplane_api_client/api/__init__.py | 1 - .../api/default/__init__.py | 0 .../api/default/acknowledge_agent_job.py | 168 ----------- .../api/default/acknowledge_job.py | 155 ---------- .../api/default/create_environment.py | 165 ----------- .../api/default/create_release.py | 160 ----------- .../api/default/create_release_channel.py | 183 ------------ .../api/default/delete_target.py | 161 ----------- .../default/delete_target_by_identifier.py | 177 ------------ .../api/default/get_agent_running_job.py | 155 ---------- .../api/default/get_job.py | 150 ---------- .../api/default/get_next_jobs.py | 150 ---------- .../api/default/get_target.py | 161 ----------- .../api/default/get_target_by_identifier.py | 177 ------------ .../default/set_target_providers_targets.py | 116 -------- .../api/default/update_job.py | 173 ----------- .../api/default/update_job_agent.py | 163 ----------- .../api/default/update_target.py | 184 ------------ .../api/default/upsert_target_provider.py | 175 ------------ .../api/default/upsert_targets.py | 103 ------- .../ctrlplane_api_client/client.py | 268 ------------------ .../ctrlplane_api_client/errors.py | 16 -- .../ctrlplane_api_client/models/__init__.py | 173 ----------- .../acknowledge_agent_job_response_200.py | 71 ----- .../acknowledge_agent_job_response_200_job.py | 43 --- .../acknowledge_agent_job_response_401.py | 58 ---- .../acknowledge_agent_job_response_404.py | 58 ---- .../models/acknowledge_job_response_200.py | 58 ---- .../models/acknowledge_job_response_401.py | 58 ---- .../models/create_environment_body.py | 78 ----- .../models/create_environment_response_200.py | 71 ----- ...te_environment_response_200_environment.py | 118 -------- ..._response_200_environment_target_filter.py | 43 --- .../models/create_environment_response_500.py | 58 ---- .../models/create_release_body.py | 90 ------ .../models/create_release_body_metadata.py | 43 --- .../models/create_release_channel_body.py | 91 ------ ...ate_release_channel_body_release_filter.py | 43 --- .../create_release_channel_response_200.py | 114 -------- .../create_release_channel_response_401.py | 58 ---- .../create_release_channel_response_403.py | 58 ---- .../models/create_release_response_200.py | 89 ------ .../create_release_response_200_metadata.py | 43 --- ...elete_target_by_identifier_response_200.py | 58 ---- ...elete_target_by_identifier_response_404.py | 58 ---- .../models/delete_target_response_200.py | 58 ---- .../models/delete_target_response_404.py | 58 ---- ...get_agent_running_job_response_200_item.py | 222 --------------- ...nt_running_job_response_200_item_config.py | 43 --- ...unning_job_response_200_item_deployment.py | 43 --- ...nning_job_response_200_item_environment.py | 43 --- ..._job_response_200_item_job_agent_config.py | 43 --- ...t_running_job_response_200_item_release.py | 43 --- ...t_running_job_response_200_item_runbook.py | 43 --- ...nt_running_job_response_200_item_target.py | 43 --- .../models/get_job_response_200.py | 255 ----------------- .../get_job_response_200_approval_type_0.py | 114 -------- ...nse_200_approval_type_0_approver_type_0.py | 67 ----- ...job_response_200_approval_type_0_status.py | 10 - .../models/get_job_response_200_deployment.py | 93 ------ .../get_job_response_200_environment.py | 74 ----- .../get_job_response_200_job_agent_config.py | 43 --- .../models/get_job_response_200_release.py | 90 ------ .../get_job_response_200_release_config.py | 43 --- .../get_job_response_200_release_metadata.py | 43 --- .../models/get_job_response_200_runbook.py | 82 ------ .../models/get_job_response_200_status.py | 17 -- .../models/get_job_response_200_target.py | 122 -------- .../get_job_response_200_target_config.py | 43 --- .../get_job_response_200_target_metadata.py | 43 --- .../models/get_job_response_200_variables.py | 43 --- .../models/get_next_jobs_response_200.py | 74 ----- .../get_next_jobs_response_200_jobs_item.py | 108 ------- ...response_200_jobs_item_job_agent_config.py | 43 --- .../get_target_by_identifier_response_200.py | 149 ---------- ...get_by_identifier_response_200_metadata.py | 43 --- ...get_by_identifier_response_200_provider.py | 76 ----- ..._identifier_response_200_variables_item.py | 76 ----- .../get_target_by_identifier_response_404.py | 58 ---- .../models/get_target_response_200.py | 219 -------------- .../models/get_target_response_200_config.py | 43 --- .../get_target_response_200_metadata.py | 43 --- ...get_target_response_200_provider_type_0.py | 67 ----- .../get_target_response_200_variables_item.py | 81 ------ .../models/get_target_response_404.py | 58 ---- .../set_target_providers_targets_body.py | 72 ----- ...get_providers_targets_body_targets_item.py | 114 -------- ...viders_targets_body_targets_item_config.py | 43 --- ...ders_targets_body_targets_item_metadata.py | 43 --- .../models/update_job_agent_body.py | 74 ----- .../models/update_job_agent_response_200.py | 74 ----- .../models/update_job_body.py | 98 ------- .../models/update_job_response_200.py | 58 ---- .../models/update_target_body.py | 137 --------- .../models/update_target_body_metadata.py | 43 --- .../update_target_body_variables_item.py | 81 ------ .../models/update_target_response_200.py | 122 -------- .../update_target_response_200_config.py | 43 --- .../update_target_response_200_metadata.py | 43 --- .../models/update_target_response_404.py | 58 ---- .../upsert_target_provider_response_200.py | 74 ----- .../models/upsert_targets_body.py | 81 ------ .../upsert_targets_body_targets_item.py | 137 --------- ...upsert_targets_body_targets_item_config.py | 43 --- ...sert_targets_body_targets_item_metadata.py | 43 --- ...argets_body_targets_item_variables_item.py | 81 ------ .../ctrlplane_api_client/py.typed | 1 - .../ctrlplane_api_client/types.py | 45 --- ctrlplane-api-client/pyproject.toml | 27 -- ctrlplane/__init__.py | 4 + openapi-python-client.yaml | 1 + pyproject.toml | 14 +- 116 files changed, 36 insertions(+), 9564 deletions(-) delete mode 100644 ctrlplane-api-client/.gitignore delete mode 100644 ctrlplane-api-client/README.md delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/__init__.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/__init__.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/__init__.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_agent_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/create_environment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/create_release.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/create_release_channel.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target_by_identifier.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/get_agent_running_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/get_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/get_next_jobs.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/get_target.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/get_target_by_identifier.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/set_target_providers_targets.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/update_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/update_job_agent.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/update_target.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_target_provider.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_targets.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/client.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/errors.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/__init__.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200_job.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_401.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_401.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_environment_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment_target_filter.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_500.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_body_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body_release_filter.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_401.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_403.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_deployment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_environment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_job_agent_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_release.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_runbook.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_target.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_approver_type_0.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_status.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_deployment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_environment.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_job_agent_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_runbook.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_status.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_variables.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item_job_agent_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_provider.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_variables_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_provider_type_0.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_variables_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_job_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_job_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_variables_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_404.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_target_provider_response_200.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_config.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_metadata.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_variables_item.py delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/py.typed delete mode 100644 ctrlplane-api-client/ctrlplane_api_client/types.py delete mode 100644 ctrlplane-api-client/pyproject.toml create mode 100644 openapi-python-client.yaml diff --git a/README.md b/README.md index 557818f..cefe37c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # ctrlplane-api-client + A client library for accessing Ctrlplane API ## Usage + First, create a client: ```python @@ -47,7 +49,7 @@ By default, when you're calling an HTTPS API it will attempt to verify that SSL ```python client = AuthenticatedClient( - base_url="https://internal_api.example.com", + base_url="https://internal_api.example.com", token="SuperSecretToken", verify_ssl="/path/to/certificate_bundle.pem", ) @@ -57,18 +59,20 @@ You can also disable certificate validation altogether, but beware that **this i ```python client = AuthenticatedClient( - base_url="https://internal_api.example.com", - token="SuperSecretToken", + base_url="https://internal_api.example.com", + token="SuperSecretToken", verify_ssl=False ) ``` Things to know: + 1. Every path/method combo becomes a Python module with four functions: - 1. `sync`: Blocking request that returns parsed data (if successful) or `None` - 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful. - 1. `asyncio`: Like `sync` but async instead of blocking - 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking + + 1. `sync`: Blocking request that returns parsed data (if successful) or `None` + 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful. + 1. `asyncio`: Like `sync` but async instead of blocking + 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking 1. All path/query params, and bodies become method arguments. 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) @@ -110,15 +114,26 @@ client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies ``` ## Building / publishing this package -This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: + +This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: + 1. Update the metadata in pyproject.toml (e.g. authors, version) 1. If you're using a private repository, configure it with Poetry - 1. `poetry config repositories. ` - 1. `poetry config http-basic. ` + 1. `poetry config repositories. ` + 1. `poetry config http-basic. ` 1. Publish the client with `poetry publish --build -r ` or, if for public PyPI, just `poetry publish --build` If you want to install this client into another project without publishing it (e.g. for development) then: + 1. If that project **is using Poetry**, you can simply do `poetry add ` from that project 1. If that project is not using Poetry: - 1. Build a wheel with `poetry build -f wheel` - 1. Install that wheel from the other project `pip install ` + 1. Build a wheel with `poetry build -f wheel` + 1. Install that wheel from the other project `pip install ` + +# Generate the client from the OpenAPI spec + +```bash +openapi-python-client generate \ + --output-path . \ + --url https://raw.githubusercontent.com/ctrlplanedev/ctrlplane/refs/heads/main/openapi.v1.json +``` diff --git a/ctrlplane-api-client/.gitignore b/ctrlplane-api-client/.gitignore deleted file mode 100644 index 79a2c3d..0000000 --- a/ctrlplane-api-client/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -__pycache__/ -build/ -dist/ -*.egg-info/ -.pytest_cache/ - -# pyenv -.python-version - -# Environments -.env -.venv - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# JetBrains -.idea/ - -/coverage.xml -/.coverage diff --git a/ctrlplane-api-client/README.md b/ctrlplane-api-client/README.md deleted file mode 100644 index 557818f..0000000 --- a/ctrlplane-api-client/README.md +++ /dev/null @@ -1,124 +0,0 @@ -# ctrlplane-api-client -A client library for accessing Ctrlplane API - -## Usage -First, create a client: - -```python -from ctrlplane_api_client import Client - -client = Client(base_url="https://api.example.com") -``` - -If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead: - -```python -from ctrlplane_api_client import AuthenticatedClient - -client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") -``` - -Now call your endpoint and use your models: - -```python -from ctrlplane_api_client.models import MyDataModel -from ctrlplane_api_client.api.my_tag import get_my_data_model -from ctrlplane_api_client.types import Response - -with client as client: - my_data: MyDataModel = get_my_data_model.sync(client=client) - # or if you need more info (e.g. status_code) - response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client) -``` - -Or do the same thing with an async version: - -```python -from ctrlplane_api_client.models import MyDataModel -from ctrlplane_api_client.api.my_tag import get_my_data_model -from ctrlplane_api_client.types import Response - -async with client as client: - my_data: MyDataModel = await get_my_data_model.asyncio(client=client) - response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client) -``` - -By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle. - -```python -client = AuthenticatedClient( - base_url="https://internal_api.example.com", - token="SuperSecretToken", - verify_ssl="/path/to/certificate_bundle.pem", -) -``` - -You can also disable certificate validation altogether, but beware that **this is a security risk**. - -```python -client = AuthenticatedClient( - base_url="https://internal_api.example.com", - token="SuperSecretToken", - verify_ssl=False -) -``` - -Things to know: -1. Every path/method combo becomes a Python module with four functions: - 1. `sync`: Blocking request that returns parsed data (if successful) or `None` - 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful. - 1. `asyncio`: Like `sync` but async instead of blocking - 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking - -1. All path/query params, and bodies become method arguments. -1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) -1. Any endpoint which did not have a tag will be in `ctrlplane_api_client.api.default` - -## Advanced customizations - -There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case): - -```python -from ctrlplane_api_client import Client - -def log_request(request): - print(f"Request event hook: {request.method} {request.url} - Waiting for response") - -def log_response(response): - request = response.request - print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}") - -client = Client( - base_url="https://api.example.com", - httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}}, -) - -# Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client() -``` - -You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url): - -```python -import httpx -from ctrlplane_api_client import Client - -client = Client( - base_url="https://api.example.com", -) -# Note that base_url needs to be re-set, as would any shared cookies, headers, etc. -client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030")) -``` - -## Building / publishing this package -This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: -1. Update the metadata in pyproject.toml (e.g. authors, version) -1. If you're using a private repository, configure it with Poetry - 1. `poetry config repositories. ` - 1. `poetry config http-basic. ` -1. Publish the client with `poetry publish --build -r ` or, if for public PyPI, just `poetry publish --build` - -If you want to install this client into another project without publishing it (e.g. for development) then: -1. If that project **is using Poetry**, you can simply do `poetry add ` from that project -1. If that project is not using Poetry: - 1. Build a wheel with `poetry build -f wheel` - 1. Install that wheel from the other project `pip install ` diff --git a/ctrlplane-api-client/ctrlplane_api_client/__init__.py b/ctrlplane-api-client/ctrlplane_api_client/__init__.py deleted file mode 100644 index abf36f4..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -"""A client library for accessing Ctrlplane API""" - -from .client import AuthenticatedClient, Client - -__all__ = ( - "AuthenticatedClient", - "Client", -) diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/__init__.py b/ctrlplane-api-client/ctrlplane_api_client/api/__init__.py deleted file mode 100644 index 81f9fa2..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains methods for accessing the API""" diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/__init__.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_agent_job.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_agent_job.py deleted file mode 100644 index d4c36c2..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_agent_job.py +++ /dev/null @@ -1,168 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.acknowledge_agent_job_response_200 import AcknowledgeAgentJobResponse200 -from ...models.acknowledge_agent_job_response_401 import AcknowledgeAgentJobResponse401 -from ...models.acknowledge_agent_job_response_404 import AcknowledgeAgentJobResponse404 -from ...types import Response - - -def _get_kwargs( - agent_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "post", - "url": f"/v1/job-agents/{agent_id}/queue/acknowledge", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - if response.status_code == 200: - response_200 = AcknowledgeAgentJobResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = AcknowledgeAgentJobResponse401.from_dict(response.json()) - - return response_401 - if response.status_code == 404: - response_404 = AcknowledgeAgentJobResponse404.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - """Acknowledge a job for an agent - - Marks a job as acknowledged by the agent - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - """Acknowledge a job for an agent - - Marks a job as acknowledged by the agent - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404] - """ - - return sync_detailed( - agent_id=agent_id, - client=client, - ).parsed - - -async def asyncio_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - """Acknowledge a job for an agent - - Marks a job as acknowledged by the agent - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404]]: - """Acknowledge a job for an agent - - Marks a job as acknowledged by the agent - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AcknowledgeAgentJobResponse200, AcknowledgeAgentJobResponse401, AcknowledgeAgentJobResponse404] - """ - - return ( - await asyncio_detailed( - agent_id=agent_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_job.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_job.py deleted file mode 100644 index ef9a3bf..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/acknowledge_job.py +++ /dev/null @@ -1,155 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.acknowledge_job_response_200 import AcknowledgeJobResponse200 -from ...models.acknowledge_job_response_401 import AcknowledgeJobResponse401 -from ...types import Response - - -def _get_kwargs( - job_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "post", - "url": f"/v1/jobs/{job_id}/acknowledge", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - if response.status_code == 200: - response_200 = AcknowledgeJobResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = AcknowledgeJobResponse401.from_dict(response.json()) - - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - """Acknowledge a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]] - """ - - kwargs = _get_kwargs( - job_id=job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - """Acknowledge a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401] - """ - - return sync_detailed( - job_id=job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - """Acknowledge a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]] - """ - - kwargs = _get_kwargs( - job_id=job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401]]: - """Acknowledge a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[AcknowledgeJobResponse200, AcknowledgeJobResponse401] - """ - - return ( - await asyncio_detailed( - job_id=job_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_environment.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/create_environment.py deleted file mode 100644 index 9593b92..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_environment.py +++ /dev/null @@ -1,165 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.create_environment_body import CreateEnvironmentBody -from ...models.create_environment_response_200 import CreateEnvironmentResponse200 -from ...models.create_environment_response_500 import CreateEnvironmentResponse500 -from ...types import Response - - -def _get_kwargs( - *, - body: CreateEnvironmentBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "post", - "url": "/v1/environments", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - if response.status_code == 200: - response_200 = CreateEnvironmentResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 500: - response_500 = CreateEnvironmentResponse500.from_dict(response.json()) - - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateEnvironmentBody, -) -> Response[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - """Create an environment - - Args: - body (CreateEnvironmentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - body: CreateEnvironmentBody, -) -> Optional[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - """Create an environment - - Args: - body (CreateEnvironmentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateEnvironmentBody, -) -> Response[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - """Create an environment - - Args: - body (CreateEnvironmentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - body: CreateEnvironmentBody, -) -> Optional[Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500]]: - """Create an environment - - Args: - body (CreateEnvironmentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CreateEnvironmentResponse200, CreateEnvironmentResponse500] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release.py deleted file mode 100644 index 1dfa02e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release.py +++ /dev/null @@ -1,160 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.create_release_body import CreateReleaseBody -from ...models.create_release_response_200 import CreateReleaseResponse200 -from ...types import Response - - -def _get_kwargs( - *, - body: CreateReleaseBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "post", - "url": "/v1/releases", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[CreateReleaseResponse200]: - if response.status_code == 200: - response_200 = CreateReleaseResponse200.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[CreateReleaseResponse200]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseBody, -) -> Response[CreateReleaseResponse200]: - """Creates a release - - Args: - body (CreateReleaseBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CreateReleaseResponse200] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseBody, -) -> Optional[CreateReleaseResponse200]: - """Creates a release - - Args: - body (CreateReleaseBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CreateReleaseResponse200 - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseBody, -) -> Response[CreateReleaseResponse200]: - """Creates a release - - Args: - body (CreateReleaseBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CreateReleaseResponse200] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseBody, -) -> Optional[CreateReleaseResponse200]: - """Creates a release - - Args: - body (CreateReleaseBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CreateReleaseResponse200 - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release_channel.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release_channel.py deleted file mode 100644 index c2a8483..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/create_release_channel.py +++ /dev/null @@ -1,183 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.create_release_channel_body import CreateReleaseChannelBody -from ...models.create_release_channel_response_200 import CreateReleaseChannelResponse200 -from ...models.create_release_channel_response_401 import CreateReleaseChannelResponse401 -from ...models.create_release_channel_response_403 import CreateReleaseChannelResponse403 -from ...types import Response - - -def _get_kwargs( - deployment_id: str, - *, - body: CreateReleaseChannelBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "post", - "url": f"/v1/deployments/{deployment_id}/release-channels", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - if response.status_code == 200: - response_200 = CreateReleaseChannelResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = CreateReleaseChannelResponse401.from_dict(response.json()) - - return response_401 - if response.status_code == 403: - response_403 = CreateReleaseChannelResponse403.from_dict(response.json()) - - return response_403 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseChannelBody, -) -> Response[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - """Create a release channel - - Args: - deployment_id (str): - body (CreateReleaseChannelBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]] - """ - - kwargs = _get_kwargs( - deployment_id=deployment_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseChannelBody, -) -> Optional[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - """Create a release channel - - Args: - deployment_id (str): - body (CreateReleaseChannelBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403] - """ - - return sync_detailed( - deployment_id=deployment_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseChannelBody, -) -> Response[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - """Create a release channel - - Args: - deployment_id (str): - body (CreateReleaseChannelBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]] - """ - - kwargs = _get_kwargs( - deployment_id=deployment_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateReleaseChannelBody, -) -> Optional[Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403]]: - """Create a release channel - - Args: - deployment_id (str): - body (CreateReleaseChannelBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CreateReleaseChannelResponse200, CreateReleaseChannelResponse401, CreateReleaseChannelResponse403] - """ - - return ( - await asyncio_detailed( - deployment_id=deployment_id, - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target.py deleted file mode 100644 index 6f1781b..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target.py +++ /dev/null @@ -1,161 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.delete_target_response_200 import DeleteTargetResponse200 -from ...models.delete_target_response_404 import DeleteTargetResponse404 -from ...types import Response - - -def _get_kwargs( - target_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "delete", - "url": f"/v1/targets/{target_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - if response.status_code == 200: - response_200 = DeleteTargetResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = DeleteTargetResponse404.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - """Delete a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - """Delete a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteTargetResponse200, DeleteTargetResponse404] - """ - - return sync_detailed( - target_id=target_id, - client=client, - ).parsed - - -async def asyncio_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - """Delete a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, DeleteTargetResponse200, DeleteTargetResponse404]]: - """Delete a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteTargetResponse200, DeleteTargetResponse404] - """ - - return ( - await asyncio_detailed( - target_id=target_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target_by_identifier.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target_by_identifier.py deleted file mode 100644 index f39664e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/delete_target_by_identifier.py +++ /dev/null @@ -1,177 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.delete_target_by_identifier_response_200 import DeleteTargetByIdentifierResponse200 -from ...models.delete_target_by_identifier_response_404 import DeleteTargetByIdentifierResponse404 -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - identifier: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "delete", - "url": f"/v1/workspaces/{workspace_id}/targets/identifier/{identifier}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - if response.status_code == 200: - response_200 = DeleteTargetByIdentifierResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = DeleteTargetByIdentifierResponse404.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - """Delete a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - identifier=identifier, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - """Delete a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404] - """ - - return sync_detailed( - workspace_id=workspace_id, - identifier=identifier, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - """Delete a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - identifier=identifier, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404]]: - """Delete a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteTargetByIdentifierResponse200, DeleteTargetByIdentifierResponse404] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - identifier=identifier, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_agent_running_job.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/get_agent_running_job.py deleted file mode 100644 index 7b1a97d..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_agent_running_job.py +++ /dev/null @@ -1,155 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_agent_running_job_response_200_item import GetAgentRunningJobResponse200Item -from ...types import Response - - -def _get_kwargs( - agent_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/job-agents/{agent_id}/jobs/running", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[List["GetAgentRunningJobResponse200Item"]]: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = GetAgentRunningJobResponse200Item.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[List["GetAgentRunningJobResponse200Item"]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[List["GetAgentRunningJobResponse200Item"]]: - """Get a agents running jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[List['GetAgentRunningJobResponse200Item']] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[List["GetAgentRunningJobResponse200Item"]]: - """Get a agents running jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - List['GetAgentRunningJobResponse200Item'] - """ - - return sync_detailed( - agent_id=agent_id, - client=client, - ).parsed - - -async def asyncio_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[List["GetAgentRunningJobResponse200Item"]]: - """Get a agents running jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[List['GetAgentRunningJobResponse200Item']] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[List["GetAgentRunningJobResponse200Item"]]: - """Get a agents running jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - List['GetAgentRunningJobResponse200Item'] - """ - - return ( - await asyncio_detailed( - agent_id=agent_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_job.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/get_job.py deleted file mode 100644 index e33c845..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_job.py +++ /dev/null @@ -1,150 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_job_response_200 import GetJobResponse200 -from ...types import Response - - -def _get_kwargs( - job_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/jobs/{job_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[GetJobResponse200]: - if response.status_code == 200: - response_200 = GetJobResponse200.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[GetJobResponse200]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[GetJobResponse200]: - """Get a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetJobResponse200] - """ - - kwargs = _get_kwargs( - job_id=job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[GetJobResponse200]: - """Get a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetJobResponse200 - """ - - return sync_detailed( - job_id=job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[GetJobResponse200]: - """Get a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetJobResponse200] - """ - - kwargs = _get_kwargs( - job_id=job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[GetJobResponse200]: - """Get a job - - Args: - job_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetJobResponse200 - """ - - return ( - await asyncio_detailed( - job_id=job_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_next_jobs.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/get_next_jobs.py deleted file mode 100644 index 0b8947e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_next_jobs.py +++ /dev/null @@ -1,150 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_next_jobs_response_200 import GetNextJobsResponse200 -from ...types import Response - - -def _get_kwargs( - agent_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/job-agents/{agent_id}/queue/next", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[GetNextJobsResponse200]: - if response.status_code == 200: - response_200 = GetNextJobsResponse200.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[GetNextJobsResponse200]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[GetNextJobsResponse200]: - """Get the next jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetNextJobsResponse200] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[GetNextJobsResponse200]: - """Get the next jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetNextJobsResponse200 - """ - - return sync_detailed( - agent_id=agent_id, - client=client, - ).parsed - - -async def asyncio_detailed( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[GetNextJobsResponse200]: - """Get the next jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetNextJobsResponse200] - """ - - kwargs = _get_kwargs( - agent_id=agent_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - agent_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[GetNextJobsResponse200]: - """Get the next jobs - - Args: - agent_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetNextJobsResponse200 - """ - - return ( - await asyncio_detailed( - agent_id=agent_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target.py deleted file mode 100644 index fbb931e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target.py +++ /dev/null @@ -1,161 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_target_response_200 import GetTargetResponse200 -from ...models.get_target_response_404 import GetTargetResponse404 -from ...types import Response - - -def _get_kwargs( - target_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/targets/{target_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - if response.status_code == 200: - response_200 = GetTargetResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = GetTargetResponse404.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - """Get a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, GetTargetResponse200, GetTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - """Get a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, GetTargetResponse200, GetTargetResponse404] - """ - - return sync_detailed( - target_id=target_id, - client=client, - ).parsed - - -async def asyncio_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - """Get a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, GetTargetResponse200, GetTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, GetTargetResponse200, GetTargetResponse404]]: - """Get a target - - Args: - target_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, GetTargetResponse200, GetTargetResponse404] - """ - - return ( - await asyncio_detailed( - target_id=target_id, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target_by_identifier.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target_by_identifier.py deleted file mode 100644 index bdfb6bb..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/get_target_by_identifier.py +++ /dev/null @@ -1,177 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_target_by_identifier_response_200 import GetTargetByIdentifierResponse200 -from ...models.get_target_by_identifier_response_404 import GetTargetByIdentifierResponse404 -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - identifier: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/workspaces/{workspace_id}/targets/identifier/{identifier}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - if response.status_code == 200: - response_200 = GetTargetByIdentifierResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = GetTargetByIdentifierResponse404.from_dict(response.json()) - - return response_404 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - """Get a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - identifier=identifier, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - """Get a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404] - """ - - return sync_detailed( - workspace_id=workspace_id, - identifier=identifier, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - """Get a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - identifier=identifier, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - identifier: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404]]: - """Get a target by identifier - - Args: - workspace_id (str): - identifier (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, GetTargetByIdentifierResponse200, GetTargetByIdentifierResponse404] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - identifier=identifier, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/set_target_providers_targets.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/set_target_providers_targets.py deleted file mode 100644 index 0ab7166..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/set_target_providers_targets.py +++ /dev/null @@ -1,116 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.set_target_providers_targets_body import SetTargetProvidersTargetsBody -from ...types import Response - - -def _get_kwargs( - provider_id: str, - *, - body: SetTargetProvidersTargetsBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "patch", - "url": f"/v1/target-providers/{provider_id}/set", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: - if response.status_code == 200: - return None - if response.status_code == 400: - return None - if response.status_code == 404: - return None - if response.status_code == 500: - return None - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - provider_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SetTargetProvidersTargetsBody, -) -> Response[Any]: - """Sets the target for a provider. - - Args: - provider_id (str): - body (SetTargetProvidersTargetsBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any] - """ - - kwargs = _get_kwargs( - provider_id=provider_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -async def asyncio_detailed( - provider_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SetTargetProvidersTargetsBody, -) -> Response[Any]: - """Sets the target for a provider. - - Args: - provider_id (str): - body (SetTargetProvidersTargetsBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any] - """ - - kwargs = _get_kwargs( - provider_id=provider_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job.py deleted file mode 100644 index bdef466..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job.py +++ /dev/null @@ -1,173 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.update_job_body import UpdateJobBody -from ...models.update_job_response_200 import UpdateJobResponse200 -from ...types import Response - - -def _get_kwargs( - job_id: str, - *, - body: UpdateJobBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "patch", - "url": f"/v1/jobs/{job_id}", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[UpdateJobResponse200]: - if response.status_code == 200: - response_200 = UpdateJobResponse200.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[UpdateJobResponse200]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobBody, -) -> Response[UpdateJobResponse200]: - """Update a job - - Args: - job_id (str): - body (UpdateJobBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[UpdateJobResponse200] - """ - - kwargs = _get_kwargs( - job_id=job_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobBody, -) -> Optional[UpdateJobResponse200]: - """Update a job - - Args: - job_id (str): - body (UpdateJobBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - UpdateJobResponse200 - """ - - return sync_detailed( - job_id=job_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobBody, -) -> Response[UpdateJobResponse200]: - """Update a job - - Args: - job_id (str): - body (UpdateJobBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[UpdateJobResponse200] - """ - - kwargs = _get_kwargs( - job_id=job_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - job_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobBody, -) -> Optional[UpdateJobResponse200]: - """Update a job - - Args: - job_id (str): - body (UpdateJobBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - UpdateJobResponse200 - """ - - return ( - await asyncio_detailed( - job_id=job_id, - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job_agent.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job_agent.py deleted file mode 100644 index a2be342..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_job_agent.py +++ /dev/null @@ -1,163 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.update_job_agent_body import UpdateJobAgentBody -from ...models.update_job_agent_response_200 import UpdateJobAgentResponse200 -from ...types import Response - - -def _get_kwargs( - *, - body: UpdateJobAgentBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "patch", - "url": "/v1/job-agents/name", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, UpdateJobAgentResponse200]]: - if response.status_code == 200: - response_200 = UpdateJobAgentResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, UpdateJobAgentResponse200]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobAgentBody, -) -> Response[Union[Any, UpdateJobAgentResponse200]]: - """Upserts the agent - - Args: - body (UpdateJobAgentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpdateJobAgentResponse200]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobAgentBody, -) -> Optional[Union[Any, UpdateJobAgentResponse200]]: - """Upserts the agent - - Args: - body (UpdateJobAgentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpdateJobAgentResponse200] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobAgentBody, -) -> Response[Union[Any, UpdateJobAgentResponse200]]: - """Upserts the agent - - Args: - body (UpdateJobAgentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpdateJobAgentResponse200]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - body: UpdateJobAgentBody, -) -> Optional[Union[Any, UpdateJobAgentResponse200]]: - """Upserts the agent - - Args: - body (UpdateJobAgentBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpdateJobAgentResponse200] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_target.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/update_target.py deleted file mode 100644 index 79922b5..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/update_target.py +++ /dev/null @@ -1,184 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.update_target_body import UpdateTargetBody -from ...models.update_target_response_200 import UpdateTargetResponse200 -from ...models.update_target_response_404 import UpdateTargetResponse404 -from ...types import Response - - -def _get_kwargs( - target_id: str, - *, - body: UpdateTargetBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "patch", - "url": f"/v1/targets/{target_id}", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - if response.status_code == 200: - response_200 = UpdateTargetResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = UpdateTargetResponse404.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateTargetBody, -) -> Response[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - """Update a target - - Args: - target_id (str): - body (UpdateTargetBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateTargetBody, -) -> Optional[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - """Update a target - - Args: - target_id (str): - body (UpdateTargetBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpdateTargetResponse200, UpdateTargetResponse404] - """ - - return sync_detailed( - target_id=target_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateTargetBody, -) -> Response[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - """Update a target - - Args: - target_id (str): - body (UpdateTargetBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]] - """ - - kwargs = _get_kwargs( - target_id=target_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - target_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateTargetBody, -) -> Optional[Union[Any, UpdateTargetResponse200, UpdateTargetResponse404]]: - """Update a target - - Args: - target_id (str): - body (UpdateTargetBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpdateTargetResponse200, UpdateTargetResponse404] - """ - - return ( - await asyncio_detailed( - target_id=target_id, - client=client, - body=body, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_target_provider.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_target_provider.py deleted file mode 100644 index 7ddf04b..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_target_provider.py +++ /dev/null @@ -1,175 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.upsert_target_provider_response_200 import UpsertTargetProviderResponse200 -from ...types import Response - - -def _get_kwargs( - workspace_id: str, - name: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { - "method": "get", - "url": f"/v1/workspaces/{workspace_id}/target-providers/name/{name}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, UpsertTargetProviderResponse200]]: - if response.status_code == 200: - response_200 = UpsertTargetProviderResponse200.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = cast(Any, None) - return response_404 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, UpsertTargetProviderResponse200]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - workspace_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, UpsertTargetProviderResponse200]]: - """Upserts a target provider. - - Args: - workspace_id (str): - name (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpsertTargetProviderResponse200]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - name=name, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - workspace_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, UpsertTargetProviderResponse200]]: - """Upserts a target provider. - - Args: - workspace_id (str): - name (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpsertTargetProviderResponse200] - """ - - return sync_detailed( - workspace_id=workspace_id, - name=name, - client=client, - ).parsed - - -async def asyncio_detailed( - workspace_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, UpsertTargetProviderResponse200]]: - """Upserts a target provider. - - Args: - workspace_id (str): - name (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, UpsertTargetProviderResponse200]] - """ - - kwargs = _get_kwargs( - workspace_id=workspace_id, - name=name, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - workspace_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, UpsertTargetProviderResponse200]]: - """Upserts a target provider. - - Args: - workspace_id (str): - name (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, UpsertTargetProviderResponse200] - """ - - return ( - await asyncio_detailed( - workspace_id=workspace_id, - name=name, - client=client, - ) - ).parsed diff --git a/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_targets.py b/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_targets.py deleted file mode 100644 index 128d088..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/api/default/upsert_targets.py +++ /dev/null @@ -1,103 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.upsert_targets_body import UpsertTargetsBody -from ...types import Response - - -def _get_kwargs( - *, - body: UpsertTargetsBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} - - _kwargs: Dict[str, Any] = { - "method": "post", - "url": "/v1/targets", - } - - _body = body.to_dict() - - _kwargs["json"] = _body - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: - if response.status_code == 200: - return None - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: UpsertTargetsBody, -) -> Response[Any]: - """Create or update multiple targets - - Args: - body (UpsertTargetsBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: UpsertTargetsBody, -) -> Response[Any]: - """Create or update multiple targets - - Args: - body (UpsertTargetsBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) diff --git a/ctrlplane-api-client/ctrlplane_api_client/client.py b/ctrlplane-api-client/ctrlplane_api_client/client.py deleted file mode 100644 index 0f6d15e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/client.py +++ /dev/null @@ -1,268 +0,0 @@ -import ssl -from typing import Any, Dict, Optional, Union - -import httpx -from attrs import define, evolve, field - - -@define -class Client: - """A class for keeping track of data related to the API - - The following are accepted as keyword arguments and will be used to construct httpx Clients internally: - - ``base_url``: The base URL for the API, all requests are made to a relative path to this URL - - ``cookies``: A dictionary of cookies to be sent with every request - - ``headers``: A dictionary of headers to be sent with every request - - ``timeout``: The maximum amount of a time a request can take. API functions will raise - httpx.TimeoutException if this is exceeded. - - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. - - ``follow_redirects``: Whether or not to follow redirects. Default value is False. - - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - - - Attributes: - raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a - status code that was not documented in the source OpenAPI document. Can also be provided as a keyword - argument to the constructor. - """ - - raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - - def with_headers(self, headers: Dict[str, str]) -> "Client": - """Get a new client matching this one with additional headers""" - if self._client is not None: - self._client.headers.update(headers) - if self._async_client is not None: - self._async_client.headers.update(headers) - return evolve(self, headers={**self._headers, **headers}) - - def with_cookies(self, cookies: Dict[str, str]) -> "Client": - """Get a new client matching this one with additional cookies""" - if self._client is not None: - self._client.cookies.update(cookies) - if self._async_client is not None: - self._async_client.cookies.update(cookies) - return evolve(self, cookies={**self._cookies, **cookies}) - - def with_timeout(self, timeout: httpx.Timeout) -> "Client": - """Get a new client matching this one with a new timeout (in seconds)""" - if self._client is not None: - self._client.timeout = timeout - if self._async_client is not None: - self._async_client.timeout = timeout - return evolve(self, timeout=timeout) - - def set_httpx_client(self, client: httpx.Client) -> "Client": - """Manually set the underlying httpx.Client - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._client = client - return self - - def get_httpx_client(self) -> httpx.Client: - """Get the underlying httpx.Client, constructing a new one if not previously set""" - if self._client is None: - self._client = httpx.Client( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._client - - def __enter__(self) -> "Client": - """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" - self.get_httpx_client().__enter__() - return self - - def __exit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for internal httpx.Client (see httpx docs)""" - self.get_httpx_client().__exit__(*args, **kwargs) - - def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": - """Manually the underlying httpx.AsyncClient - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._async_client = async_client - return self - - def get_async_httpx_client(self) -> httpx.AsyncClient: - """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" - if self._async_client is None: - self._async_client = httpx.AsyncClient( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._async_client - - async def __aenter__(self) -> "Client": - """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" - await self.get_async_httpx_client().__aenter__() - return self - - async def __aexit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" - await self.get_async_httpx_client().__aexit__(*args, **kwargs) - - -@define -class AuthenticatedClient: - """A Client which has been authenticated for use on secured endpoints - - The following are accepted as keyword arguments and will be used to construct httpx Clients internally: - - ``base_url``: The base URL for the API, all requests are made to a relative path to this URL - - ``cookies``: A dictionary of cookies to be sent with every request - - ``headers``: A dictionary of headers to be sent with every request - - ``timeout``: The maximum amount of a time a request can take. API functions will raise - httpx.TimeoutException if this is exceeded. - - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. - - ``follow_redirects``: Whether or not to follow redirects. Default value is False. - - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - - - Attributes: - raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a - status code that was not documented in the source OpenAPI document. Can also be provided as a keyword - argument to the constructor. - token: The token to use for authentication - prefix: The prefix to use for the Authorization header - auth_header_name: The name of the Authorization header - """ - - raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - - token: str - prefix: str = "Bearer" - auth_header_name: str = "Authorization" - - def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": - """Get a new client matching this one with additional headers""" - if self._client is not None: - self._client.headers.update(headers) - if self._async_client is not None: - self._async_client.headers.update(headers) - return evolve(self, headers={**self._headers, **headers}) - - def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": - """Get a new client matching this one with additional cookies""" - if self._client is not None: - self._client.cookies.update(cookies) - if self._async_client is not None: - self._async_client.cookies.update(cookies) - return evolve(self, cookies={**self._cookies, **cookies}) - - def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": - """Get a new client matching this one with a new timeout (in seconds)""" - if self._client is not None: - self._client.timeout = timeout - if self._async_client is not None: - self._async_client.timeout = timeout - return evolve(self, timeout=timeout) - - def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": - """Manually set the underlying httpx.Client - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._client = client - return self - - def get_httpx_client(self) -> httpx.Client: - """Get the underlying httpx.Client, constructing a new one if not previously set""" - if self._client is None: - self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token - self._client = httpx.Client( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._client - - def __enter__(self) -> "AuthenticatedClient": - """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" - self.get_httpx_client().__enter__() - return self - - def __exit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for internal httpx.Client (see httpx docs)""" - self.get_httpx_client().__exit__(*args, **kwargs) - - def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": - """Manually the underlying httpx.AsyncClient - - **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. - """ - self._async_client = async_client - return self - - def get_async_httpx_client(self) -> httpx.AsyncClient: - """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" - if self._async_client is None: - self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token - self._async_client = httpx.AsyncClient( - base_url=self._base_url, - cookies=self._cookies, - headers=self._headers, - timeout=self._timeout, - verify=self._verify_ssl, - follow_redirects=self._follow_redirects, - **self._httpx_args, - ) - return self._async_client - - async def __aenter__(self) -> "AuthenticatedClient": - """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" - await self.get_async_httpx_client().__aenter__() - return self - - async def __aexit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" - await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/ctrlplane-api-client/ctrlplane_api_client/errors.py b/ctrlplane-api-client/ctrlplane_api_client/errors.py deleted file mode 100644 index 5f92e76..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/errors.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Contains shared errors types that can be raised from API functions""" - - -class UnexpectedStatus(Exception): - """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" - - def __init__(self, status_code: int, content: bytes): - self.status_code = status_code - self.content = content - - super().__init__( - f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" - ) - - -__all__ = ["UnexpectedStatus"] diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/__init__.py b/ctrlplane-api-client/ctrlplane_api_client/models/__init__.py deleted file mode 100644 index fcb2a8e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/__init__.py +++ /dev/null @@ -1,173 +0,0 @@ -"""Contains all the data models used in inputs/outputs""" - -from .acknowledge_agent_job_response_200 import AcknowledgeAgentJobResponse200 -from .acknowledge_agent_job_response_200_job import AcknowledgeAgentJobResponse200Job -from .acknowledge_agent_job_response_401 import AcknowledgeAgentJobResponse401 -from .acknowledge_agent_job_response_404 import AcknowledgeAgentJobResponse404 -from .acknowledge_job_response_200 import AcknowledgeJobResponse200 -from .acknowledge_job_response_401 import AcknowledgeJobResponse401 -from .create_environment_body import CreateEnvironmentBody -from .create_environment_response_200 import CreateEnvironmentResponse200 -from .create_environment_response_200_environment import CreateEnvironmentResponse200Environment -from .create_environment_response_200_environment_target_filter import ( - CreateEnvironmentResponse200EnvironmentTargetFilter, -) -from .create_environment_response_500 import CreateEnvironmentResponse500 -from .create_release_body import CreateReleaseBody -from .create_release_body_metadata import CreateReleaseBodyMetadata -from .create_release_channel_body import CreateReleaseChannelBody -from .create_release_channel_body_release_filter import CreateReleaseChannelBodyReleaseFilter -from .create_release_channel_response_200 import CreateReleaseChannelResponse200 -from .create_release_channel_response_401 import CreateReleaseChannelResponse401 -from .create_release_channel_response_403 import CreateReleaseChannelResponse403 -from .create_release_response_200 import CreateReleaseResponse200 -from .create_release_response_200_metadata import CreateReleaseResponse200Metadata -from .delete_target_by_identifier_response_200 import DeleteTargetByIdentifierResponse200 -from .delete_target_by_identifier_response_404 import DeleteTargetByIdentifierResponse404 -from .delete_target_response_200 import DeleteTargetResponse200 -from .delete_target_response_404 import DeleteTargetResponse404 -from .get_agent_running_job_response_200_item import GetAgentRunningJobResponse200Item -from .get_agent_running_job_response_200_item_config import GetAgentRunningJobResponse200ItemConfig -from .get_agent_running_job_response_200_item_deployment import GetAgentRunningJobResponse200ItemDeployment -from .get_agent_running_job_response_200_item_environment import GetAgentRunningJobResponse200ItemEnvironment -from .get_agent_running_job_response_200_item_job_agent_config import GetAgentRunningJobResponse200ItemJobAgentConfig -from .get_agent_running_job_response_200_item_release import GetAgentRunningJobResponse200ItemRelease -from .get_agent_running_job_response_200_item_runbook import GetAgentRunningJobResponse200ItemRunbook -from .get_agent_running_job_response_200_item_target import GetAgentRunningJobResponse200ItemTarget -from .get_job_response_200 import GetJobResponse200 -from .get_job_response_200_approval_type_0 import GetJobResponse200ApprovalType0 -from .get_job_response_200_approval_type_0_approver_type_0 import GetJobResponse200ApprovalType0ApproverType0 -from .get_job_response_200_approval_type_0_status import GetJobResponse200ApprovalType0Status -from .get_job_response_200_deployment import GetJobResponse200Deployment -from .get_job_response_200_environment import GetJobResponse200Environment -from .get_job_response_200_job_agent_config import GetJobResponse200JobAgentConfig -from .get_job_response_200_release import GetJobResponse200Release -from .get_job_response_200_release_config import GetJobResponse200ReleaseConfig -from .get_job_response_200_release_metadata import GetJobResponse200ReleaseMetadata -from .get_job_response_200_runbook import GetJobResponse200Runbook -from .get_job_response_200_status import GetJobResponse200Status -from .get_job_response_200_target import GetJobResponse200Target -from .get_job_response_200_target_config import GetJobResponse200TargetConfig -from .get_job_response_200_target_metadata import GetJobResponse200TargetMetadata -from .get_job_response_200_variables import GetJobResponse200Variables -from .get_next_jobs_response_200 import GetNextJobsResponse200 -from .get_next_jobs_response_200_jobs_item import GetNextJobsResponse200JobsItem -from .get_next_jobs_response_200_jobs_item_job_agent_config import GetNextJobsResponse200JobsItemJobAgentConfig -from .get_target_by_identifier_response_200 import GetTargetByIdentifierResponse200 -from .get_target_by_identifier_response_200_metadata import GetTargetByIdentifierResponse200Metadata -from .get_target_by_identifier_response_200_provider import GetTargetByIdentifierResponse200Provider -from .get_target_by_identifier_response_200_variables_item import GetTargetByIdentifierResponse200VariablesItem -from .get_target_by_identifier_response_404 import GetTargetByIdentifierResponse404 -from .get_target_response_200 import GetTargetResponse200 -from .get_target_response_200_config import GetTargetResponse200Config -from .get_target_response_200_metadata import GetTargetResponse200Metadata -from .get_target_response_200_provider_type_0 import GetTargetResponse200ProviderType0 -from .get_target_response_200_variables_item import GetTargetResponse200VariablesItem -from .get_target_response_404 import GetTargetResponse404 -from .set_target_providers_targets_body import SetTargetProvidersTargetsBody -from .set_target_providers_targets_body_targets_item import SetTargetProvidersTargetsBodyTargetsItem -from .set_target_providers_targets_body_targets_item_config import SetTargetProvidersTargetsBodyTargetsItemConfig -from .set_target_providers_targets_body_targets_item_metadata import SetTargetProvidersTargetsBodyTargetsItemMetadata -from .update_job_agent_body import UpdateJobAgentBody -from .update_job_agent_response_200 import UpdateJobAgentResponse200 -from .update_job_body import UpdateJobBody -from .update_job_response_200 import UpdateJobResponse200 -from .update_target_body import UpdateTargetBody -from .update_target_body_metadata import UpdateTargetBodyMetadata -from .update_target_body_variables_item import UpdateTargetBodyVariablesItem -from .update_target_response_200 import UpdateTargetResponse200 -from .update_target_response_200_config import UpdateTargetResponse200Config -from .update_target_response_200_metadata import UpdateTargetResponse200Metadata -from .update_target_response_404 import UpdateTargetResponse404 -from .upsert_target_provider_response_200 import UpsertTargetProviderResponse200 -from .upsert_targets_body import UpsertTargetsBody -from .upsert_targets_body_targets_item import UpsertTargetsBodyTargetsItem -from .upsert_targets_body_targets_item_config import UpsertTargetsBodyTargetsItemConfig -from .upsert_targets_body_targets_item_metadata import UpsertTargetsBodyTargetsItemMetadata -from .upsert_targets_body_targets_item_variables_item import UpsertTargetsBodyTargetsItemVariablesItem - -__all__ = ( - "AcknowledgeAgentJobResponse200", - "AcknowledgeAgentJobResponse200Job", - "AcknowledgeAgentJobResponse401", - "AcknowledgeAgentJobResponse404", - "AcknowledgeJobResponse200", - "AcknowledgeJobResponse401", - "CreateEnvironmentBody", - "CreateEnvironmentResponse200", - "CreateEnvironmentResponse200Environment", - "CreateEnvironmentResponse200EnvironmentTargetFilter", - "CreateEnvironmentResponse500", - "CreateReleaseBody", - "CreateReleaseBodyMetadata", - "CreateReleaseChannelBody", - "CreateReleaseChannelBodyReleaseFilter", - "CreateReleaseChannelResponse200", - "CreateReleaseChannelResponse401", - "CreateReleaseChannelResponse403", - "CreateReleaseResponse200", - "CreateReleaseResponse200Metadata", - "DeleteTargetByIdentifierResponse200", - "DeleteTargetByIdentifierResponse404", - "DeleteTargetResponse200", - "DeleteTargetResponse404", - "GetAgentRunningJobResponse200Item", - "GetAgentRunningJobResponse200ItemConfig", - "GetAgentRunningJobResponse200ItemDeployment", - "GetAgentRunningJobResponse200ItemEnvironment", - "GetAgentRunningJobResponse200ItemJobAgentConfig", - "GetAgentRunningJobResponse200ItemRelease", - "GetAgentRunningJobResponse200ItemRunbook", - "GetAgentRunningJobResponse200ItemTarget", - "GetJobResponse200", - "GetJobResponse200ApprovalType0", - "GetJobResponse200ApprovalType0ApproverType0", - "GetJobResponse200ApprovalType0Status", - "GetJobResponse200Deployment", - "GetJobResponse200Environment", - "GetJobResponse200JobAgentConfig", - "GetJobResponse200Release", - "GetJobResponse200ReleaseConfig", - "GetJobResponse200ReleaseMetadata", - "GetJobResponse200Runbook", - "GetJobResponse200Status", - "GetJobResponse200Target", - "GetJobResponse200TargetConfig", - "GetJobResponse200TargetMetadata", - "GetJobResponse200Variables", - "GetNextJobsResponse200", - "GetNextJobsResponse200JobsItem", - "GetNextJobsResponse200JobsItemJobAgentConfig", - "GetTargetByIdentifierResponse200", - "GetTargetByIdentifierResponse200Metadata", - "GetTargetByIdentifierResponse200Provider", - "GetTargetByIdentifierResponse200VariablesItem", - "GetTargetByIdentifierResponse404", - "GetTargetResponse200", - "GetTargetResponse200Config", - "GetTargetResponse200Metadata", - "GetTargetResponse200ProviderType0", - "GetTargetResponse200VariablesItem", - "GetTargetResponse404", - "SetTargetProvidersTargetsBody", - "SetTargetProvidersTargetsBodyTargetsItem", - "SetTargetProvidersTargetsBodyTargetsItemConfig", - "SetTargetProvidersTargetsBodyTargetsItemMetadata", - "UpdateJobAgentBody", - "UpdateJobAgentResponse200", - "UpdateJobBody", - "UpdateJobResponse200", - "UpdateTargetBody", - "UpdateTargetBodyMetadata", - "UpdateTargetBodyVariablesItem", - "UpdateTargetResponse200", - "UpdateTargetResponse200Config", - "UpdateTargetResponse200Metadata", - "UpdateTargetResponse404", - "UpsertTargetProviderResponse200", - "UpsertTargetsBody", - "UpsertTargetsBodyTargetsItem", - "UpsertTargetsBodyTargetsItemConfig", - "UpsertTargetsBodyTargetsItemMetadata", - "UpsertTargetsBodyTargetsItemVariablesItem", -) diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200.py deleted file mode 100644 index 85dbde4..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200.py +++ /dev/null @@ -1,71 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.acknowledge_agent_job_response_200_job import AcknowledgeAgentJobResponse200Job - - -T = TypeVar("T", bound="AcknowledgeAgentJobResponse200") - - -@_attrs_define -class AcknowledgeAgentJobResponse200: - """ - Attributes: - job (Union[Unset, AcknowledgeAgentJobResponse200Job]): - """ - - job: Union[Unset, "AcknowledgeAgentJobResponse200Job"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - job: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.job, Unset): - job = self.job.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if job is not UNSET: - field_dict["job"] = job - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.acknowledge_agent_job_response_200_job import AcknowledgeAgentJobResponse200Job - - d = src_dict.copy() - _job = d.pop("job", UNSET) - job: Union[Unset, AcknowledgeAgentJobResponse200Job] - if isinstance(_job, Unset): - job = UNSET - else: - job = AcknowledgeAgentJobResponse200Job.from_dict(_job) - - acknowledge_agent_job_response_200 = cls( - job=job, - ) - - acknowledge_agent_job_response_200.additional_properties = d - return acknowledge_agent_job_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200_job.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200_job.py deleted file mode 100644 index fcb0a84..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_200_job.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AcknowledgeAgentJobResponse200Job") - - -@_attrs_define -class AcknowledgeAgentJobResponse200Job: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - acknowledge_agent_job_response_200_job = cls() - - acknowledge_agent_job_response_200_job.additional_properties = d - return acknowledge_agent_job_response_200_job - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_401.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_401.py deleted file mode 100644 index 1b79e55..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_401.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AcknowledgeAgentJobResponse401") - - -@_attrs_define -class AcknowledgeAgentJobResponse401: - """ - Attributes: - error (Union[Unset, str]): - """ - - error: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error is not UNSET: - field_dict["error"] = error - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error", UNSET) - - acknowledge_agent_job_response_401 = cls( - error=error, - ) - - acknowledge_agent_job_response_401.additional_properties = d - return acknowledge_agent_job_response_401 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_404.py deleted file mode 100644 index 0514eb6..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_agent_job_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AcknowledgeAgentJobResponse404") - - -@_attrs_define -class AcknowledgeAgentJobResponse404: - """ - Attributes: - error (Union[Unset, str]): - """ - - error: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error is not UNSET: - field_dict["error"] = error - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error", UNSET) - - acknowledge_agent_job_response_404 = cls( - error=error, - ) - - acknowledge_agent_job_response_404.additional_properties = d - return acknowledge_agent_job_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_200.py deleted file mode 100644 index da9460e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_200.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AcknowledgeJobResponse200") - - -@_attrs_define -class AcknowledgeJobResponse200: - """ - Attributes: - sucess (bool): - """ - - sucess: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - sucess = self.sucess - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "sucess": sucess, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - sucess = d.pop("sucess") - - acknowledge_job_response_200 = cls( - sucess=sucess, - ) - - acknowledge_job_response_200.additional_properties = d - return acknowledge_job_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_401.py b/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_401.py deleted file mode 100644 index 36ccf36..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/acknowledge_job_response_401.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="AcknowledgeJobResponse401") - - -@_attrs_define -class AcknowledgeJobResponse401: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - acknowledge_job_response_401 = cls( - error=error, - ) - - acknowledge_job_response_401.additional_properties = d - return acknowledge_job_response_401 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_body.py deleted file mode 100644 index 335190e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_body.py +++ /dev/null @@ -1,78 +0,0 @@ -import datetime -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreateEnvironmentBody") - - -@_attrs_define -class CreateEnvironmentBody: - """ - Attributes: - system_id (str): - expires_at (Union[Unset, datetime.datetime]): - """ - - system_id: str - expires_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - system_id = self.system_id - - expires_at: Union[Unset, str] = UNSET - if not isinstance(self.expires_at, Unset): - expires_at = self.expires_at.isoformat() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "systemId": system_id, - } - ) - if expires_at is not UNSET: - field_dict["expiresAt"] = expires_at - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - system_id = d.pop("systemId") - - _expires_at = d.pop("expiresAt", UNSET) - expires_at: Union[Unset, datetime.datetime] - if isinstance(_expires_at, Unset): - expires_at = UNSET - else: - expires_at = isoparse(_expires_at) - - create_environment_body = cls( - system_id=system_id, - expires_at=expires_at, - ) - - create_environment_body.additional_properties = d - return create_environment_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200.py deleted file mode 100644 index e7843ff..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200.py +++ /dev/null @@ -1,71 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.create_environment_response_200_environment import CreateEnvironmentResponse200Environment - - -T = TypeVar("T", bound="CreateEnvironmentResponse200") - - -@_attrs_define -class CreateEnvironmentResponse200: - """ - Attributes: - environment (Union[Unset, CreateEnvironmentResponse200Environment]): - """ - - environment: Union[Unset, "CreateEnvironmentResponse200Environment"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - environment: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.environment, Unset): - environment = self.environment.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if environment is not UNSET: - field_dict["environment"] = environment - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_environment_response_200_environment import CreateEnvironmentResponse200Environment - - d = src_dict.copy() - _environment = d.pop("environment", UNSET) - environment: Union[Unset, CreateEnvironmentResponse200Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = CreateEnvironmentResponse200Environment.from_dict(_environment) - - create_environment_response_200 = cls( - environment=environment, - ) - - create_environment_response_200.additional_properties = d - return create_environment_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment.py deleted file mode 100644 index 7126161..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment.py +++ /dev/null @@ -1,118 +0,0 @@ -import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.create_environment_response_200_environment_target_filter import ( - CreateEnvironmentResponse200EnvironmentTargetFilter, - ) - - -T = TypeVar("T", bound="CreateEnvironmentResponse200Environment") - - -@_attrs_define -class CreateEnvironmentResponse200Environment: - """ - Attributes: - system_id (str): - expires_at (Union[None, Unset, datetime.datetime]): - target_filter (Union[Unset, CreateEnvironmentResponse200EnvironmentTargetFilter]): - """ - - system_id: str - expires_at: Union[None, Unset, datetime.datetime] = UNSET - target_filter: Union[Unset, "CreateEnvironmentResponse200EnvironmentTargetFilter"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - system_id = self.system_id - - expires_at: Union[None, Unset, str] - if isinstance(self.expires_at, Unset): - expires_at = UNSET - elif isinstance(self.expires_at, datetime.datetime): - expires_at = self.expires_at.isoformat() - else: - expires_at = self.expires_at - - target_filter: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.target_filter, Unset): - target_filter = self.target_filter.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "systemId": system_id, - } - ) - if expires_at is not UNSET: - field_dict["expiresAt"] = expires_at - if target_filter is not UNSET: - field_dict["targetFilter"] = target_filter - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_environment_response_200_environment_target_filter import ( - CreateEnvironmentResponse200EnvironmentTargetFilter, - ) - - d = src_dict.copy() - system_id = d.pop("systemId") - - def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - expires_at_type_0 = isoparse(data) - - return expires_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - expires_at = _parse_expires_at(d.pop("expiresAt", UNSET)) - - _target_filter = d.pop("targetFilter", UNSET) - target_filter: Union[Unset, CreateEnvironmentResponse200EnvironmentTargetFilter] - if isinstance(_target_filter, Unset): - target_filter = UNSET - else: - target_filter = CreateEnvironmentResponse200EnvironmentTargetFilter.from_dict(_target_filter) - - create_environment_response_200_environment = cls( - system_id=system_id, - expires_at=expires_at, - target_filter=target_filter, - ) - - create_environment_response_200_environment.additional_properties = d - return create_environment_response_200_environment - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment_target_filter.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment_target_filter.py deleted file mode 100644 index 4abe7f2..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_200_environment_target_filter.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateEnvironmentResponse200EnvironmentTargetFilter") - - -@_attrs_define -class CreateEnvironmentResponse200EnvironmentTargetFilter: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - create_environment_response_200_environment_target_filter = cls() - - create_environment_response_200_environment_target_filter.additional_properties = d - return create_environment_response_200_environment_target_filter - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_500.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_500.py deleted file mode 100644 index 4aa25bb..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_environment_response_500.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateEnvironmentResponse500") - - -@_attrs_define -class CreateEnvironmentResponse500: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - create_environment_response_500 = cls( - error=error, - ) - - create_environment_response_500.additional_properties = d - return create_environment_response_500 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body.py deleted file mode 100644 index 7174f79..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body.py +++ /dev/null @@ -1,90 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.create_release_body_metadata import CreateReleaseBodyMetadata - - -T = TypeVar("T", bound="CreateReleaseBody") - - -@_attrs_define -class CreateReleaseBody: - """ - Attributes: - version (str): - deployment_id (str): - metadata (Union[Unset, CreateReleaseBodyMetadata]): - """ - - version: str - deployment_id: str - metadata: Union[Unset, "CreateReleaseBodyMetadata"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - version = self.version - - deployment_id = self.deployment_id - - metadata: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "version": version, - "deploymentId": deployment_id, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_release_body_metadata import CreateReleaseBodyMetadata - - d = src_dict.copy() - version = d.pop("version") - - deployment_id = d.pop("deploymentId") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, CreateReleaseBodyMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = CreateReleaseBodyMetadata.from_dict(_metadata) - - create_release_body = cls( - version=version, - deployment_id=deployment_id, - metadata=metadata, - ) - - create_release_body.additional_properties = d - return create_release_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body_metadata.py deleted file mode 100644 index 5b3b614..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_body_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateReleaseBodyMetadata") - - -@_attrs_define -class CreateReleaseBodyMetadata: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - create_release_body_metadata = cls() - - create_release_body_metadata.additional_properties = d - return create_release_body_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body.py deleted file mode 100644 index 3a6ca17..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body.py +++ /dev/null @@ -1,91 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.create_release_channel_body_release_filter import CreateReleaseChannelBodyReleaseFilter - - -T = TypeVar("T", bound="CreateReleaseChannelBody") - - -@_attrs_define -class CreateReleaseChannelBody: - """ - Attributes: - name (str): - description (Union[Unset, str]): - release_filter (Union[Unset, CreateReleaseChannelBodyReleaseFilter]): - """ - - name: str - description: Union[Unset, str] = UNSET - release_filter: Union[Unset, "CreateReleaseChannelBodyReleaseFilter"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - name = self.name - - description = self.description - - release_filter: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.release_filter, Unset): - release_filter = self.release_filter.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if description is not UNSET: - field_dict["description"] = description - if release_filter is not UNSET: - field_dict["releaseFilter"] = release_filter - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_release_channel_body_release_filter import CreateReleaseChannelBodyReleaseFilter - - d = src_dict.copy() - name = d.pop("name") - - description = d.pop("description", UNSET) - - _release_filter = d.pop("releaseFilter", UNSET) - release_filter: Union[Unset, CreateReleaseChannelBodyReleaseFilter] - if isinstance(_release_filter, Unset): - release_filter = UNSET - else: - release_filter = CreateReleaseChannelBodyReleaseFilter.from_dict(_release_filter) - - create_release_channel_body = cls( - name=name, - description=description, - release_filter=release_filter, - ) - - create_release_channel_body.additional_properties = d - return create_release_channel_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body_release_filter.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body_release_filter.py deleted file mode 100644 index 44ad7f1..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_body_release_filter.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateReleaseChannelBodyReleaseFilter") - - -@_attrs_define -class CreateReleaseChannelBodyReleaseFilter: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - create_release_channel_body_release_filter = cls() - - create_release_channel_body_release_filter.additional_properties = d - return create_release_channel_body_release_filter - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_200.py deleted file mode 100644 index 56054c8..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_200.py +++ /dev/null @@ -1,114 +0,0 @@ -import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreateReleaseChannelResponse200") - - -@_attrs_define -class CreateReleaseChannelResponse200: - """ - Attributes: - id (str): - name (str): - deployment_id (str): - created_at (datetime.datetime): - updated_at (datetime.datetime): - description (Union[None, Unset, str]): - """ - - id: str - name: str - deployment_id: str - created_at: datetime.datetime - updated_at: datetime.datetime - description: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - deployment_id = self.deployment_id - - created_at = self.created_at.isoformat() - - updated_at = self.updated_at.isoformat() - - description: Union[None, Unset, str] - if isinstance(self.description, Unset): - description = UNSET - else: - description = self.description - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "deploymentId": deployment_id, - "createdAt": created_at, - "updatedAt": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - deployment_id = d.pop("deploymentId") - - created_at = isoparse(d.pop("createdAt")) - - updated_at = isoparse(d.pop("updatedAt")) - - def _parse_description(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - description = _parse_description(d.pop("description", UNSET)) - - create_release_channel_response_200 = cls( - id=id, - name=name, - deployment_id=deployment_id, - created_at=created_at, - updated_at=updated_at, - description=description, - ) - - create_release_channel_response_200.additional_properties = d - return create_release_channel_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_401.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_401.py deleted file mode 100644 index 2d5ce17..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_401.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateReleaseChannelResponse401") - - -@_attrs_define -class CreateReleaseChannelResponse401: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - create_release_channel_response_401 = cls( - error=error, - ) - - create_release_channel_response_401.additional_properties = d - return create_release_channel_response_401 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_403.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_403.py deleted file mode 100644 index 72319f1..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_channel_response_403.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateReleaseChannelResponse403") - - -@_attrs_define -class CreateReleaseChannelResponse403: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - create_release_channel_response_403 = cls( - error=error, - ) - - create_release_channel_response_403.additional_properties = d - return create_release_channel_response_403 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200.py deleted file mode 100644 index e94397c..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200.py +++ /dev/null @@ -1,89 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.create_release_response_200_metadata import CreateReleaseResponse200Metadata - - -T = TypeVar("T", bound="CreateReleaseResponse200") - - -@_attrs_define -class CreateReleaseResponse200: - """ - Attributes: - id (Union[Unset, str]): - version (Union[Unset, str]): - metadata (Union[Unset, CreateReleaseResponse200Metadata]): - """ - - id: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - metadata: Union[Unset, "CreateReleaseResponse200Metadata"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - version = self.version - - metadata: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if version is not UNSET: - field_dict["version"] = version - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.create_release_response_200_metadata import CreateReleaseResponse200Metadata - - d = src_dict.copy() - id = d.pop("id", UNSET) - - version = d.pop("version", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, CreateReleaseResponse200Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = CreateReleaseResponse200Metadata.from_dict(_metadata) - - create_release_response_200 = cls( - id=id, - version=version, - metadata=metadata, - ) - - create_release_response_200.additional_properties = d - return create_release_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200_metadata.py deleted file mode 100644 index 3e3b4ac..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/create_release_response_200_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateReleaseResponse200Metadata") - - -@_attrs_define -class CreateReleaseResponse200Metadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - create_release_response_200_metadata = cls() - - create_release_response_200_metadata.additional_properties = d - return create_release_response_200_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_200.py deleted file mode 100644 index 23237ca..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_200.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="DeleteTargetByIdentifierResponse200") - - -@_attrs_define -class DeleteTargetByIdentifierResponse200: - """ - Attributes: - success (Union[Unset, bool]): Example: True. - """ - - success: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - success = self.success - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if success is not UNSET: - field_dict["success"] = success - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - success = d.pop("success", UNSET) - - delete_target_by_identifier_response_200 = cls( - success=success, - ) - - delete_target_by_identifier_response_200.additional_properties = d - return delete_target_by_identifier_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_404.py deleted file mode 100644 index c7ef74d..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_by_identifier_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="DeleteTargetByIdentifierResponse404") - - -@_attrs_define -class DeleteTargetByIdentifierResponse404: - """ - Attributes: - error (Union[Unset, str]): Example: Target not found. - """ - - error: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error is not UNSET: - field_dict["error"] = error - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error", UNSET) - - delete_target_by_identifier_response_404 = cls( - error=error, - ) - - delete_target_by_identifier_response_404.additional_properties = d - return delete_target_by_identifier_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_200.py deleted file mode 100644 index f2f72c2..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_200.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DeleteTargetResponse200") - - -@_attrs_define -class DeleteTargetResponse200: - """ - Attributes: - success (bool): - """ - - success: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - success = self.success - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "success": success, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - success = d.pop("success") - - delete_target_response_200 = cls( - success=success, - ) - - delete_target_response_200.additional_properties = d - return delete_target_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_404.py deleted file mode 100644 index 92c976d..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/delete_target_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DeleteTargetResponse404") - - -@_attrs_define -class DeleteTargetResponse404: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - delete_target_response_404 = cls( - error=error, - ) - - delete_target_response_404.additional_properties = d - return delete_target_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item.py deleted file mode 100644 index 6732923..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item.py +++ /dev/null @@ -1,222 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_agent_running_job_response_200_item_config import GetAgentRunningJobResponse200ItemConfig - from ..models.get_agent_running_job_response_200_item_deployment import GetAgentRunningJobResponse200ItemDeployment - from ..models.get_agent_running_job_response_200_item_environment import ( - GetAgentRunningJobResponse200ItemEnvironment, - ) - from ..models.get_agent_running_job_response_200_item_job_agent_config import ( - GetAgentRunningJobResponse200ItemJobAgentConfig, - ) - from ..models.get_agent_running_job_response_200_item_release import GetAgentRunningJobResponse200ItemRelease - from ..models.get_agent_running_job_response_200_item_runbook import GetAgentRunningJobResponse200ItemRunbook - from ..models.get_agent_running_job_response_200_item_target import GetAgentRunningJobResponse200ItemTarget - - -T = TypeVar("T", bound="GetAgentRunningJobResponse200Item") - - -@_attrs_define -class GetAgentRunningJobResponse200Item: - """ - Attributes: - id (str): - status (str): - message (str): - job_agent_id (str): - job_agent_config (GetAgentRunningJobResponse200ItemJobAgentConfig): - external_id (Union[None, str]): - config (GetAgentRunningJobResponse200ItemConfig): - release (Union[Unset, GetAgentRunningJobResponse200ItemRelease]): - deployment (Union[Unset, GetAgentRunningJobResponse200ItemDeployment]): - runbook (Union[Unset, GetAgentRunningJobResponse200ItemRunbook]): - target (Union[Unset, GetAgentRunningJobResponse200ItemTarget]): - environment (Union[Unset, GetAgentRunningJobResponse200ItemEnvironment]): - """ - - id: str - status: str - message: str - job_agent_id: str - job_agent_config: "GetAgentRunningJobResponse200ItemJobAgentConfig" - external_id: Union[None, str] - config: "GetAgentRunningJobResponse200ItemConfig" - release: Union[Unset, "GetAgentRunningJobResponse200ItemRelease"] = UNSET - deployment: Union[Unset, "GetAgentRunningJobResponse200ItemDeployment"] = UNSET - runbook: Union[Unset, "GetAgentRunningJobResponse200ItemRunbook"] = UNSET - target: Union[Unset, "GetAgentRunningJobResponse200ItemTarget"] = UNSET - environment: Union[Unset, "GetAgentRunningJobResponse200ItemEnvironment"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - status = self.status - - message = self.message - - job_agent_id = self.job_agent_id - - job_agent_config = self.job_agent_config.to_dict() - - external_id: Union[None, str] - external_id = self.external_id - - config = self.config.to_dict() - - release: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.release, Unset): - release = self.release.to_dict() - - deployment: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.deployment, Unset): - deployment = self.deployment.to_dict() - - runbook: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.runbook, Unset): - runbook = self.runbook.to_dict() - - target: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.target, Unset): - target = self.target.to_dict() - - environment: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.environment, Unset): - environment = self.environment.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "status": status, - "message": message, - "jobAgentId": job_agent_id, - "jobAgentConfig": job_agent_config, - "externalId": external_id, - "config": config, - } - ) - if release is not UNSET: - field_dict["release"] = release - if deployment is not UNSET: - field_dict["deployment"] = deployment - if runbook is not UNSET: - field_dict["runbook"] = runbook - if target is not UNSET: - field_dict["target"] = target - if environment is not UNSET: - field_dict["environment"] = environment - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_agent_running_job_response_200_item_config import GetAgentRunningJobResponse200ItemConfig - from ..models.get_agent_running_job_response_200_item_deployment import ( - GetAgentRunningJobResponse200ItemDeployment, - ) - from ..models.get_agent_running_job_response_200_item_environment import ( - GetAgentRunningJobResponse200ItemEnvironment, - ) - from ..models.get_agent_running_job_response_200_item_job_agent_config import ( - GetAgentRunningJobResponse200ItemJobAgentConfig, - ) - from ..models.get_agent_running_job_response_200_item_release import GetAgentRunningJobResponse200ItemRelease - from ..models.get_agent_running_job_response_200_item_runbook import GetAgentRunningJobResponse200ItemRunbook - from ..models.get_agent_running_job_response_200_item_target import GetAgentRunningJobResponse200ItemTarget - - d = src_dict.copy() - id = d.pop("id") - - status = d.pop("status") - - message = d.pop("message") - - job_agent_id = d.pop("jobAgentId") - - job_agent_config = GetAgentRunningJobResponse200ItemJobAgentConfig.from_dict(d.pop("jobAgentConfig")) - - def _parse_external_id(data: object) -> Union[None, str]: - if data is None: - return data - return cast(Union[None, str], data) - - external_id = _parse_external_id(d.pop("externalId")) - - config = GetAgentRunningJobResponse200ItemConfig.from_dict(d.pop("config")) - - _release = d.pop("release", UNSET) - release: Union[Unset, GetAgentRunningJobResponse200ItemRelease] - if isinstance(_release, Unset): - release = UNSET - else: - release = GetAgentRunningJobResponse200ItemRelease.from_dict(_release) - - _deployment = d.pop("deployment", UNSET) - deployment: Union[Unset, GetAgentRunningJobResponse200ItemDeployment] - if isinstance(_deployment, Unset): - deployment = UNSET - else: - deployment = GetAgentRunningJobResponse200ItemDeployment.from_dict(_deployment) - - _runbook = d.pop("runbook", UNSET) - runbook: Union[Unset, GetAgentRunningJobResponse200ItemRunbook] - if isinstance(_runbook, Unset): - runbook = UNSET - else: - runbook = GetAgentRunningJobResponse200ItemRunbook.from_dict(_runbook) - - _target = d.pop("target", UNSET) - target: Union[Unset, GetAgentRunningJobResponse200ItemTarget] - if isinstance(_target, Unset): - target = UNSET - else: - target = GetAgentRunningJobResponse200ItemTarget.from_dict(_target) - - _environment = d.pop("environment", UNSET) - environment: Union[Unset, GetAgentRunningJobResponse200ItemEnvironment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = GetAgentRunningJobResponse200ItemEnvironment.from_dict(_environment) - - get_agent_running_job_response_200_item = cls( - id=id, - status=status, - message=message, - job_agent_id=job_agent_id, - job_agent_config=job_agent_config, - external_id=external_id, - config=config, - release=release, - deployment=deployment, - runbook=runbook, - target=target, - environment=environment, - ) - - get_agent_running_job_response_200_item.additional_properties = d - return get_agent_running_job_response_200_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_config.py deleted file mode 100644 index 1ce040f..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemConfig") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_config = cls() - - get_agent_running_job_response_200_item_config.additional_properties = d - return get_agent_running_job_response_200_item_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_deployment.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_deployment.py deleted file mode 100644 index d0b0028..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_deployment.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemDeployment") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemDeployment: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_deployment = cls() - - get_agent_running_job_response_200_item_deployment.additional_properties = d - return get_agent_running_job_response_200_item_deployment - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_environment.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_environment.py deleted file mode 100644 index 2ac8259..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_environment.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemEnvironment") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemEnvironment: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_environment = cls() - - get_agent_running_job_response_200_item_environment.additional_properties = d - return get_agent_running_job_response_200_item_environment - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_job_agent_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_job_agent_config.py deleted file mode 100644 index 510f265..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_job_agent_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemJobAgentConfig") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemJobAgentConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_job_agent_config = cls() - - get_agent_running_job_response_200_item_job_agent_config.additional_properties = d - return get_agent_running_job_response_200_item_job_agent_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_release.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_release.py deleted file mode 100644 index d3be087..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_release.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemRelease") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemRelease: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_release = cls() - - get_agent_running_job_response_200_item_release.additional_properties = d - return get_agent_running_job_response_200_item_release - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_runbook.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_runbook.py deleted file mode 100644 index 00044ee..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_runbook.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemRunbook") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemRunbook: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_runbook = cls() - - get_agent_running_job_response_200_item_runbook.additional_properties = d - return get_agent_running_job_response_200_item_runbook - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_target.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_target.py deleted file mode 100644 index c7d3eb2..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_agent_running_job_response_200_item_target.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetAgentRunningJobResponse200ItemTarget") - - -@_attrs_define -class GetAgentRunningJobResponse200ItemTarget: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_agent_running_job_response_200_item_target = cls() - - get_agent_running_job_response_200_item_target.additional_properties = d - return get_agent_running_job_response_200_item_target - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200.py deleted file mode 100644 index 5b78961..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200.py +++ /dev/null @@ -1,255 +0,0 @@ -import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.get_job_response_200_status import GetJobResponse200Status -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_job_response_200_approval_type_0 import GetJobResponse200ApprovalType0 - from ..models.get_job_response_200_deployment import GetJobResponse200Deployment - from ..models.get_job_response_200_environment import GetJobResponse200Environment - from ..models.get_job_response_200_job_agent_config import GetJobResponse200JobAgentConfig - from ..models.get_job_response_200_release import GetJobResponse200Release - from ..models.get_job_response_200_runbook import GetJobResponse200Runbook - from ..models.get_job_response_200_target import GetJobResponse200Target - from ..models.get_job_response_200_variables import GetJobResponse200Variables - - -T = TypeVar("T", bound="GetJobResponse200") - - -@_attrs_define -class GetJobResponse200: - """ - Attributes: - id (str): - status (GetJobResponse200Status): - variables (GetJobResponse200Variables): - created_at (datetime.datetime): - updated_at (datetime.datetime): - job_agent_config (GetJobResponse200JobAgentConfig): Configuration for the Job Agent - external_id (Union[None, Unset, str]): External job identifier (e.g. GitHub workflow run ID) - release (Union[Unset, GetJobResponse200Release]): - deployment (Union[Unset, GetJobResponse200Deployment]): - runbook (Union[Unset, GetJobResponse200Runbook]): - target (Union[Unset, GetJobResponse200Target]): - environment (Union[Unset, GetJobResponse200Environment]): - approval (Union['GetJobResponse200ApprovalType0', None, Unset]): - """ - - id: str - status: GetJobResponse200Status - variables: "GetJobResponse200Variables" - created_at: datetime.datetime - updated_at: datetime.datetime - job_agent_config: "GetJobResponse200JobAgentConfig" - external_id: Union[None, Unset, str] = UNSET - release: Union[Unset, "GetJobResponse200Release"] = UNSET - deployment: Union[Unset, "GetJobResponse200Deployment"] = UNSET - runbook: Union[Unset, "GetJobResponse200Runbook"] = UNSET - target: Union[Unset, "GetJobResponse200Target"] = UNSET - environment: Union[Unset, "GetJobResponse200Environment"] = UNSET - approval: Union["GetJobResponse200ApprovalType0", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - from ..models.get_job_response_200_approval_type_0 import GetJobResponse200ApprovalType0 - - id = self.id - - status = self.status.value - - variables = self.variables.to_dict() - - created_at = self.created_at.isoformat() - - updated_at = self.updated_at.isoformat() - - job_agent_config = self.job_agent_config.to_dict() - - external_id: Union[None, Unset, str] - if isinstance(self.external_id, Unset): - external_id = UNSET - else: - external_id = self.external_id - - release: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.release, Unset): - release = self.release.to_dict() - - deployment: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.deployment, Unset): - deployment = self.deployment.to_dict() - - runbook: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.runbook, Unset): - runbook = self.runbook.to_dict() - - target: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.target, Unset): - target = self.target.to_dict() - - environment: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.environment, Unset): - environment = self.environment.to_dict() - - approval: Union[Dict[str, Any], None, Unset] - if isinstance(self.approval, Unset): - approval = UNSET - elif isinstance(self.approval, GetJobResponse200ApprovalType0): - approval = self.approval.to_dict() - else: - approval = self.approval - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "status": status, - "variables": variables, - "createdAt": created_at, - "updatedAt": updated_at, - "jobAgentConfig": job_agent_config, - } - ) - if external_id is not UNSET: - field_dict["externalId"] = external_id - if release is not UNSET: - field_dict["release"] = release - if deployment is not UNSET: - field_dict["deployment"] = deployment - if runbook is not UNSET: - field_dict["runbook"] = runbook - if target is not UNSET: - field_dict["target"] = target - if environment is not UNSET: - field_dict["environment"] = environment - if approval is not UNSET: - field_dict["approval"] = approval - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_job_response_200_approval_type_0 import GetJobResponse200ApprovalType0 - from ..models.get_job_response_200_deployment import GetJobResponse200Deployment - from ..models.get_job_response_200_environment import GetJobResponse200Environment - from ..models.get_job_response_200_job_agent_config import GetJobResponse200JobAgentConfig - from ..models.get_job_response_200_release import GetJobResponse200Release - from ..models.get_job_response_200_runbook import GetJobResponse200Runbook - from ..models.get_job_response_200_target import GetJobResponse200Target - from ..models.get_job_response_200_variables import GetJobResponse200Variables - - d = src_dict.copy() - id = d.pop("id") - - status = GetJobResponse200Status(d.pop("status")) - - variables = GetJobResponse200Variables.from_dict(d.pop("variables")) - - created_at = isoparse(d.pop("createdAt")) - - updated_at = isoparse(d.pop("updatedAt")) - - job_agent_config = GetJobResponse200JobAgentConfig.from_dict(d.pop("jobAgentConfig")) - - def _parse_external_id(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - external_id = _parse_external_id(d.pop("externalId", UNSET)) - - _release = d.pop("release", UNSET) - release: Union[Unset, GetJobResponse200Release] - if isinstance(_release, Unset): - release = UNSET - else: - release = GetJobResponse200Release.from_dict(_release) - - _deployment = d.pop("deployment", UNSET) - deployment: Union[Unset, GetJobResponse200Deployment] - if isinstance(_deployment, Unset): - deployment = UNSET - else: - deployment = GetJobResponse200Deployment.from_dict(_deployment) - - _runbook = d.pop("runbook", UNSET) - runbook: Union[Unset, GetJobResponse200Runbook] - if isinstance(_runbook, Unset): - runbook = UNSET - else: - runbook = GetJobResponse200Runbook.from_dict(_runbook) - - _target = d.pop("target", UNSET) - target: Union[Unset, GetJobResponse200Target] - if isinstance(_target, Unset): - target = UNSET - else: - target = GetJobResponse200Target.from_dict(_target) - - _environment = d.pop("environment", UNSET) - environment: Union[Unset, GetJobResponse200Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = GetJobResponse200Environment.from_dict(_environment) - - def _parse_approval(data: object) -> Union["GetJobResponse200ApprovalType0", None, Unset]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - approval_type_0 = GetJobResponse200ApprovalType0.from_dict(data) - - return approval_type_0 - except: # noqa: E722 - pass - return cast(Union["GetJobResponse200ApprovalType0", None, Unset], data) - - approval = _parse_approval(d.pop("approval", UNSET)) - - get_job_response_200 = cls( - id=id, - status=status, - variables=variables, - created_at=created_at, - updated_at=updated_at, - job_agent_config=job_agent_config, - external_id=external_id, - release=release, - deployment=deployment, - runbook=runbook, - target=target, - environment=environment, - approval=approval, - ) - - get_job_response_200.additional_properties = d - return get_job_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0.py deleted file mode 100644 index 3df025e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.get_job_response_200_approval_type_0_status import GetJobResponse200ApprovalType0Status -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_job_response_200_approval_type_0_approver_type_0 import ( - GetJobResponse200ApprovalType0ApproverType0, - ) - - -T = TypeVar("T", bound="GetJobResponse200ApprovalType0") - - -@_attrs_define -class GetJobResponse200ApprovalType0: - """ - Attributes: - id (str): - status (GetJobResponse200ApprovalType0Status): - approver (Union['GetJobResponse200ApprovalType0ApproverType0', None, Unset]): Null when status is pending, - contains approver details when approved or rejected - """ - - id: str - status: GetJobResponse200ApprovalType0Status - approver: Union["GetJobResponse200ApprovalType0ApproverType0", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - from ..models.get_job_response_200_approval_type_0_approver_type_0 import ( - GetJobResponse200ApprovalType0ApproverType0, - ) - - id = self.id - - status = self.status.value - - approver: Union[Dict[str, Any], None, Unset] - if isinstance(self.approver, Unset): - approver = UNSET - elif isinstance(self.approver, GetJobResponse200ApprovalType0ApproverType0): - approver = self.approver.to_dict() - else: - approver = self.approver - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "status": status, - } - ) - if approver is not UNSET: - field_dict["approver"] = approver - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_job_response_200_approval_type_0_approver_type_0 import ( - GetJobResponse200ApprovalType0ApproverType0, - ) - - d = src_dict.copy() - id = d.pop("id") - - status = GetJobResponse200ApprovalType0Status(d.pop("status")) - - def _parse_approver(data: object) -> Union["GetJobResponse200ApprovalType0ApproverType0", None, Unset]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - approver_type_0 = GetJobResponse200ApprovalType0ApproverType0.from_dict(data) - - return approver_type_0 - except: # noqa: E722 - pass - return cast(Union["GetJobResponse200ApprovalType0ApproverType0", None, Unset], data) - - approver = _parse_approver(d.pop("approver", UNSET)) - - get_job_response_200_approval_type_0 = cls( - id=id, - status=status, - approver=approver, - ) - - get_job_response_200_approval_type_0.additional_properties = d - return get_job_response_200_approval_type_0 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_approver_type_0.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_approver_type_0.py deleted file mode 100644 index 25242a4..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_approver_type_0.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200ApprovalType0ApproverType0") - - -@_attrs_define -class GetJobResponse200ApprovalType0ApproverType0: - """Null when status is pending, contains approver details when approved or rejected - - Attributes: - id (str): - name (str): - """ - - id: str - name: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - get_job_response_200_approval_type_0_approver_type_0 = cls( - id=id, - name=name, - ) - - get_job_response_200_approval_type_0_approver_type_0.additional_properties = d - return get_job_response_200_approval_type_0_approver_type_0 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_status.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_status.py deleted file mode 100644 index fdf8b9a..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_approval_type_0_status.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class GetJobResponse200ApprovalType0Status(str, Enum): - APPROVED = "approved" - PENDING = "pending" - REJECTED = "rejected" - - def __str__(self) -> str: - return str(self.value) diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_deployment.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_deployment.py deleted file mode 100644 index 8ca116a..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_deployment.py +++ /dev/null @@ -1,93 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetJobResponse200Deployment") - - -@_attrs_define -class GetJobResponse200Deployment: - """ - Attributes: - id (str): - slug (str): - system_id (str): - job_agent_id (str): - name (Union[Unset, str]): - """ - - id: str - slug: str - system_id: str - job_agent_id: str - name: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - slug = self.slug - - system_id = self.system_id - - job_agent_id = self.job_agent_id - - name = self.name - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "slug": slug, - "systemId": system_id, - "jobAgentId": job_agent_id, - } - ) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - slug = d.pop("slug") - - system_id = d.pop("systemId") - - job_agent_id = d.pop("jobAgentId") - - name = d.pop("name", UNSET) - - get_job_response_200_deployment = cls( - id=id, - slug=slug, - system_id=system_id, - job_agent_id=job_agent_id, - name=name, - ) - - get_job_response_200_deployment.additional_properties = d - return get_job_response_200_deployment - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_environment.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_environment.py deleted file mode 100644 index 18cf678..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_environment.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200Environment") - - -@_attrs_define -class GetJobResponse200Environment: - """ - Attributes: - id (str): - name (str): - system_id (str): - """ - - id: str - name: str - system_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - system_id = self.system_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "systemId": system_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - system_id = d.pop("systemId") - - get_job_response_200_environment = cls( - id=id, - name=name, - system_id=system_id, - ) - - get_job_response_200_environment.additional_properties = d - return get_job_response_200_environment - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_job_agent_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_job_agent_config.py deleted file mode 100644 index 5ed7152..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_job_agent_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200JobAgentConfig") - - -@_attrs_define -class GetJobResponse200JobAgentConfig: - """Configuration for the Job Agent""" - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_job_agent_config = cls() - - get_job_response_200_job_agent_config.additional_properties = d - return get_job_response_200_job_agent_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release.py deleted file mode 100644 index b3f1142..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release.py +++ /dev/null @@ -1,90 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.get_job_response_200_release_config import GetJobResponse200ReleaseConfig - from ..models.get_job_response_200_release_metadata import GetJobResponse200ReleaseMetadata - - -T = TypeVar("T", bound="GetJobResponse200Release") - - -@_attrs_define -class GetJobResponse200Release: - """ - Attributes: - id (str): - version (str): - metadata (GetJobResponse200ReleaseMetadata): - config (GetJobResponse200ReleaseConfig): - """ - - id: str - version: str - metadata: "GetJobResponse200ReleaseMetadata" - config: "GetJobResponse200ReleaseConfig" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - version = self.version - - metadata = self.metadata.to_dict() - - config = self.config.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "version": version, - "metadata": metadata, - "config": config, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_job_response_200_release_config import GetJobResponse200ReleaseConfig - from ..models.get_job_response_200_release_metadata import GetJobResponse200ReleaseMetadata - - d = src_dict.copy() - id = d.pop("id") - - version = d.pop("version") - - metadata = GetJobResponse200ReleaseMetadata.from_dict(d.pop("metadata")) - - config = GetJobResponse200ReleaseConfig.from_dict(d.pop("config")) - - get_job_response_200_release = cls( - id=id, - version=version, - metadata=metadata, - config=config, - ) - - get_job_response_200_release.additional_properties = d - return get_job_response_200_release - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_config.py deleted file mode 100644 index acf1c65..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200ReleaseConfig") - - -@_attrs_define -class GetJobResponse200ReleaseConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_release_config = cls() - - get_job_response_200_release_config.additional_properties = d - return get_job_response_200_release_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_metadata.py deleted file mode 100644 index 52ac5f8..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_release_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200ReleaseMetadata") - - -@_attrs_define -class GetJobResponse200ReleaseMetadata: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_release_metadata = cls() - - get_job_response_200_release_metadata.additional_properties = d - return get_job_response_200_release_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_runbook.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_runbook.py deleted file mode 100644 index b78a7ae..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_runbook.py +++ /dev/null @@ -1,82 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200Runbook") - - -@_attrs_define -class GetJobResponse200Runbook: - """ - Attributes: - id (str): - name (str): - system_id (str): - job_agent_id (str): - """ - - id: str - name: str - system_id: str - job_agent_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - system_id = self.system_id - - job_agent_id = self.job_agent_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "systemId": system_id, - "jobAgentId": job_agent_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - system_id = d.pop("systemId") - - job_agent_id = d.pop("jobAgentId") - - get_job_response_200_runbook = cls( - id=id, - name=name, - system_id=system_id, - job_agent_id=job_agent_id, - ) - - get_job_response_200_runbook.additional_properties = d - return get_job_response_200_runbook - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_status.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_status.py deleted file mode 100644 index 007e376..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_status.py +++ /dev/null @@ -1,17 +0,0 @@ -from enum import Enum - - -class GetJobResponse200Status(str, Enum): - ACTION_REQUIRED = "action_required" - CANCELLED = "cancelled" - COMPLETED = "completed" - EXTERNAL_RUN_NOT_FOUND = "external_run_not_found" - FAILURE = "failure" - INVALID_INTEGRATION = "invalid_integration" - INVALID_JOB_AGENT = "invalid_job_agent" - IN_PROGRESS = "in_progress" - PENDING = "pending" - SKIPPED = "skipped" - - def __str__(self) -> str: - return str(self.value) diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target.py deleted file mode 100644 index 8461758..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target.py +++ /dev/null @@ -1,122 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.get_job_response_200_target_config import GetJobResponse200TargetConfig - from ..models.get_job_response_200_target_metadata import GetJobResponse200TargetMetadata - - -T = TypeVar("T", bound="GetJobResponse200Target") - - -@_attrs_define -class GetJobResponse200Target: - """ - Attributes: - id (str): - name (str): - version (str): - kind (str): - identifier (str): - workspace_id (str): - config (GetJobResponse200TargetConfig): - metadata (GetJobResponse200TargetMetadata): - """ - - id: str - name: str - version: str - kind: str - identifier: str - workspace_id: str - config: "GetJobResponse200TargetConfig" - metadata: "GetJobResponse200TargetMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - version = self.version - - kind = self.kind - - identifier = self.identifier - - workspace_id = self.workspace_id - - config = self.config.to_dict() - - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "version": version, - "kind": kind, - "identifier": identifier, - "workspaceId": workspace_id, - "config": config, - "metadata": metadata, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_job_response_200_target_config import GetJobResponse200TargetConfig - from ..models.get_job_response_200_target_metadata import GetJobResponse200TargetMetadata - - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - version = d.pop("version") - - kind = d.pop("kind") - - identifier = d.pop("identifier") - - workspace_id = d.pop("workspaceId") - - config = GetJobResponse200TargetConfig.from_dict(d.pop("config")) - - metadata = GetJobResponse200TargetMetadata.from_dict(d.pop("metadata")) - - get_job_response_200_target = cls( - id=id, - name=name, - version=version, - kind=kind, - identifier=identifier, - workspace_id=workspace_id, - config=config, - metadata=metadata, - ) - - get_job_response_200_target.additional_properties = d - return get_job_response_200_target - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_config.py deleted file mode 100644 index 466b3cc..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200TargetConfig") - - -@_attrs_define -class GetJobResponse200TargetConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_target_config = cls() - - get_job_response_200_target_config.additional_properties = d - return get_job_response_200_target_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_metadata.py deleted file mode 100644 index 23a99eb..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_target_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200TargetMetadata") - - -@_attrs_define -class GetJobResponse200TargetMetadata: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_target_metadata = cls() - - get_job_response_200_target_metadata.additional_properties = d - return get_job_response_200_target_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_variables.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_variables.py deleted file mode 100644 index 6c1c970..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_job_response_200_variables.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetJobResponse200Variables") - - -@_attrs_define -class GetJobResponse200Variables: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_job_response_200_variables = cls() - - get_job_response_200_variables.additional_properties = d - return get_job_response_200_variables - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200.py deleted file mode 100644 index 3794396..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_next_jobs_response_200_jobs_item import GetNextJobsResponse200JobsItem - - -T = TypeVar("T", bound="GetNextJobsResponse200") - - -@_attrs_define -class GetNextJobsResponse200: - """ - Attributes: - jobs (Union[Unset, List['GetNextJobsResponse200JobsItem']]): - """ - - jobs: Union[Unset, List["GetNextJobsResponse200JobsItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - jobs: Union[Unset, List[Dict[str, Any]]] = UNSET - if not isinstance(self.jobs, Unset): - jobs = [] - for jobs_item_data in self.jobs: - jobs_item = jobs_item_data.to_dict() - jobs.append(jobs_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if jobs is not UNSET: - field_dict["jobs"] = jobs - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_next_jobs_response_200_jobs_item import GetNextJobsResponse200JobsItem - - d = src_dict.copy() - jobs = [] - _jobs = d.pop("jobs", UNSET) - for jobs_item_data in _jobs or []: - jobs_item = GetNextJobsResponse200JobsItem.from_dict(jobs_item_data) - - jobs.append(jobs_item) - - get_next_jobs_response_200 = cls( - jobs=jobs, - ) - - get_next_jobs_response_200.additional_properties = d - return get_next_jobs_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item.py deleted file mode 100644 index 5bb386e..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item.py +++ /dev/null @@ -1,108 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.get_next_jobs_response_200_jobs_item_job_agent_config import ( - GetNextJobsResponse200JobsItemJobAgentConfig, - ) - - -T = TypeVar("T", bound="GetNextJobsResponse200JobsItem") - - -@_attrs_define -class GetNextJobsResponse200JobsItem: - """ - Attributes: - id (str): The job ID - status (str): - job_agent_id (str): - job_agent_config (GetNextJobsResponse200JobsItemJobAgentConfig): - message (str): - release_job_trigger_id (str): - """ - - id: str - status: str - job_agent_id: str - job_agent_config: "GetNextJobsResponse200JobsItemJobAgentConfig" - message: str - release_job_trigger_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - status = self.status - - job_agent_id = self.job_agent_id - - job_agent_config = self.job_agent_config.to_dict() - - message = self.message - - release_job_trigger_id = self.release_job_trigger_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "status": status, - "jobAgentId": job_agent_id, - "jobAgentConfig": job_agent_config, - "message": message, - "releaseJobTriggerId": release_job_trigger_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_next_jobs_response_200_jobs_item_job_agent_config import ( - GetNextJobsResponse200JobsItemJobAgentConfig, - ) - - d = src_dict.copy() - id = d.pop("id") - - status = d.pop("status") - - job_agent_id = d.pop("jobAgentId") - - job_agent_config = GetNextJobsResponse200JobsItemJobAgentConfig.from_dict(d.pop("jobAgentConfig")) - - message = d.pop("message") - - release_job_trigger_id = d.pop("releaseJobTriggerId") - - get_next_jobs_response_200_jobs_item = cls( - id=id, - status=status, - job_agent_id=job_agent_id, - job_agent_config=job_agent_config, - message=message, - release_job_trigger_id=release_job_trigger_id, - ) - - get_next_jobs_response_200_jobs_item.additional_properties = d - return get_next_jobs_response_200_jobs_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item_job_agent_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item_job_agent_config.py deleted file mode 100644 index 47878cd..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_next_jobs_response_200_jobs_item_job_agent_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetNextJobsResponse200JobsItemJobAgentConfig") - - -@_attrs_define -class GetNextJobsResponse200JobsItemJobAgentConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_next_jobs_response_200_jobs_item_job_agent_config = cls() - - get_next_jobs_response_200_jobs_item_job_agent_config.additional_properties = d - return get_next_jobs_response_200_jobs_item_job_agent_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200.py deleted file mode 100644 index ba38baf..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200.py +++ /dev/null @@ -1,149 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_target_by_identifier_response_200_metadata import GetTargetByIdentifierResponse200Metadata - from ..models.get_target_by_identifier_response_200_provider import GetTargetByIdentifierResponse200Provider - from ..models.get_target_by_identifier_response_200_variables_item import ( - GetTargetByIdentifierResponse200VariablesItem, - ) - - -T = TypeVar("T", bound="GetTargetByIdentifierResponse200") - - -@_attrs_define -class GetTargetByIdentifierResponse200: - """ - Attributes: - id (str): - identifier (str): - workspace_id (str): - provider_id (str): - provider (Union[Unset, GetTargetByIdentifierResponse200Provider]): - variables (Union[Unset, List['GetTargetByIdentifierResponse200VariablesItem']]): - metadata (Union[Unset, GetTargetByIdentifierResponse200Metadata]): - """ - - id: str - identifier: str - workspace_id: str - provider_id: str - provider: Union[Unset, "GetTargetByIdentifierResponse200Provider"] = UNSET - variables: Union[Unset, List["GetTargetByIdentifierResponse200VariablesItem"]] = UNSET - metadata: Union[Unset, "GetTargetByIdentifierResponse200Metadata"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - identifier = self.identifier - - workspace_id = self.workspace_id - - provider_id = self.provider_id - - provider: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.provider, Unset): - provider = self.provider.to_dict() - - variables: Union[Unset, List[Dict[str, Any]]] = UNSET - if not isinstance(self.variables, Unset): - variables = [] - for variables_item_data in self.variables: - variables_item = variables_item_data.to_dict() - variables.append(variables_item) - - metadata: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "identifier": identifier, - "workspaceId": workspace_id, - "providerId": provider_id, - } - ) - if provider is not UNSET: - field_dict["provider"] = provider - if variables is not UNSET: - field_dict["variables"] = variables - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_target_by_identifier_response_200_metadata import GetTargetByIdentifierResponse200Metadata - from ..models.get_target_by_identifier_response_200_provider import GetTargetByIdentifierResponse200Provider - from ..models.get_target_by_identifier_response_200_variables_item import ( - GetTargetByIdentifierResponse200VariablesItem, - ) - - d = src_dict.copy() - id = d.pop("id") - - identifier = d.pop("identifier") - - workspace_id = d.pop("workspaceId") - - provider_id = d.pop("providerId") - - _provider = d.pop("provider", UNSET) - provider: Union[Unset, GetTargetByIdentifierResponse200Provider] - if isinstance(_provider, Unset): - provider = UNSET - else: - provider = GetTargetByIdentifierResponse200Provider.from_dict(_provider) - - variables = [] - _variables = d.pop("variables", UNSET) - for variables_item_data in _variables or []: - variables_item = GetTargetByIdentifierResponse200VariablesItem.from_dict(variables_item_data) - - variables.append(variables_item) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, GetTargetByIdentifierResponse200Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = GetTargetByIdentifierResponse200Metadata.from_dict(_metadata) - - get_target_by_identifier_response_200 = cls( - id=id, - identifier=identifier, - workspace_id=workspace_id, - provider_id=provider_id, - provider=provider, - variables=variables, - metadata=metadata, - ) - - get_target_by_identifier_response_200.additional_properties = d - return get_target_by_identifier_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_metadata.py deleted file mode 100644 index 7f2d77a..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTargetByIdentifierResponse200Metadata") - - -@_attrs_define -class GetTargetByIdentifierResponse200Metadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_target_by_identifier_response_200_metadata = cls() - - get_target_by_identifier_response_200_metadata.additional_properties = d - return get_target_by_identifier_response_200_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_provider.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_provider.py deleted file mode 100644 index 3d9884f..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_provider.py +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetTargetByIdentifierResponse200Provider") - - -@_attrs_define -class GetTargetByIdentifierResponse200Provider: - """ - Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - workspace_id (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - workspace_id = self.workspace_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - if workspace_id is not UNSET: - field_dict["workspaceId"] = workspace_id - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - workspace_id = d.pop("workspaceId", UNSET) - - get_target_by_identifier_response_200_provider = cls( - id=id, - name=name, - workspace_id=workspace_id, - ) - - get_target_by_identifier_response_200_provider.additional_properties = d - return get_target_by_identifier_response_200_provider - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_variables_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_variables_item.py deleted file mode 100644 index 9186ba3..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_200_variables_item.py +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetTargetByIdentifierResponse200VariablesItem") - - -@_attrs_define -class GetTargetByIdentifierResponse200VariablesItem: - """ - Attributes: - id (Union[Unset, str]): - key (Union[Unset, str]): - value (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - key: Union[Unset, str] = UNSET - value: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - key = self.key - - value = self.value - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if key is not UNSET: - field_dict["key"] = key - if value is not UNSET: - field_dict["value"] = value - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id", UNSET) - - key = d.pop("key", UNSET) - - value = d.pop("value", UNSET) - - get_target_by_identifier_response_200_variables_item = cls( - id=id, - key=key, - value=value, - ) - - get_target_by_identifier_response_200_variables_item.additional_properties = d - return get_target_by_identifier_response_200_variables_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_404.py deleted file mode 100644 index 912c088..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_by_identifier_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetTargetByIdentifierResponse404") - - -@_attrs_define -class GetTargetByIdentifierResponse404: - """ - Attributes: - error (Union[Unset, str]): Example: Target not found. - """ - - error: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error is not UNSET: - field_dict["error"] = error - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error", UNSET) - - get_target_by_identifier_response_404 = cls( - error=error, - ) - - get_target_by_identifier_response_404.additional_properties = d - return get_target_by_identifier_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200.py deleted file mode 100644 index ad3208a..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200.py +++ /dev/null @@ -1,219 +0,0 @@ -import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.get_target_response_200_config import GetTargetResponse200Config - from ..models.get_target_response_200_metadata import GetTargetResponse200Metadata - from ..models.get_target_response_200_provider_type_0 import GetTargetResponse200ProviderType0 - from ..models.get_target_response_200_variables_item import GetTargetResponse200VariablesItem - - -T = TypeVar("T", bound="GetTargetResponse200") - - -@_attrs_define -class GetTargetResponse200: - """ - Attributes: - id (str): - name (str): - workspace_id (str): - kind (str): - identifier (str): - version (str): - config (GetTargetResponse200Config): - updated_at (datetime.datetime): - metadata (GetTargetResponse200Metadata): - locked_at (Union[None, Unset, datetime.datetime]): - provider (Union['GetTargetResponse200ProviderType0', None, Unset]): - variables (Union[Unset, List['GetTargetResponse200VariablesItem']]): - """ - - id: str - name: str - workspace_id: str - kind: str - identifier: str - version: str - config: "GetTargetResponse200Config" - updated_at: datetime.datetime - metadata: "GetTargetResponse200Metadata" - locked_at: Union[None, Unset, datetime.datetime] = UNSET - provider: Union["GetTargetResponse200ProviderType0", None, Unset] = UNSET - variables: Union[Unset, List["GetTargetResponse200VariablesItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - from ..models.get_target_response_200_provider_type_0 import GetTargetResponse200ProviderType0 - - id = self.id - - name = self.name - - workspace_id = self.workspace_id - - kind = self.kind - - identifier = self.identifier - - version = self.version - - config = self.config.to_dict() - - updated_at = self.updated_at.isoformat() - - metadata = self.metadata.to_dict() - - locked_at: Union[None, Unset, str] - if isinstance(self.locked_at, Unset): - locked_at = UNSET - elif isinstance(self.locked_at, datetime.datetime): - locked_at = self.locked_at.isoformat() - else: - locked_at = self.locked_at - - provider: Union[Dict[str, Any], None, Unset] - if isinstance(self.provider, Unset): - provider = UNSET - elif isinstance(self.provider, GetTargetResponse200ProviderType0): - provider = self.provider.to_dict() - else: - provider = self.provider - - variables: Union[Unset, List[Dict[str, Any]]] = UNSET - if not isinstance(self.variables, Unset): - variables = [] - for variables_item_data in self.variables: - variables_item = variables_item_data.to_dict() - variables.append(variables_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "workspaceId": workspace_id, - "kind": kind, - "identifier": identifier, - "version": version, - "config": config, - "updatedAt": updated_at, - "metadata": metadata, - } - ) - if locked_at is not UNSET: - field_dict["lockedAt"] = locked_at - if provider is not UNSET: - field_dict["provider"] = provider - if variables is not UNSET: - field_dict["variables"] = variables - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_target_response_200_config import GetTargetResponse200Config - from ..models.get_target_response_200_metadata import GetTargetResponse200Metadata - from ..models.get_target_response_200_provider_type_0 import GetTargetResponse200ProviderType0 - from ..models.get_target_response_200_variables_item import GetTargetResponse200VariablesItem - - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - workspace_id = d.pop("workspaceId") - - kind = d.pop("kind") - - identifier = d.pop("identifier") - - version = d.pop("version") - - config = GetTargetResponse200Config.from_dict(d.pop("config")) - - updated_at = isoparse(d.pop("updatedAt")) - - metadata = GetTargetResponse200Metadata.from_dict(d.pop("metadata")) - - def _parse_locked_at(data: object) -> Union[None, Unset, datetime.datetime]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - locked_at_type_0 = isoparse(data) - - return locked_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - locked_at = _parse_locked_at(d.pop("lockedAt", UNSET)) - - def _parse_provider(data: object) -> Union["GetTargetResponse200ProviderType0", None, Unset]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - provider_type_0 = GetTargetResponse200ProviderType0.from_dict(data) - - return provider_type_0 - except: # noqa: E722 - pass - return cast(Union["GetTargetResponse200ProviderType0", None, Unset], data) - - provider = _parse_provider(d.pop("provider", UNSET)) - - variables = [] - _variables = d.pop("variables", UNSET) - for variables_item_data in _variables or []: - variables_item = GetTargetResponse200VariablesItem.from_dict(variables_item_data) - - variables.append(variables_item) - - get_target_response_200 = cls( - id=id, - name=name, - workspace_id=workspace_id, - kind=kind, - identifier=identifier, - version=version, - config=config, - updated_at=updated_at, - metadata=metadata, - locked_at=locked_at, - provider=provider, - variables=variables, - ) - - get_target_response_200.additional_properties = d - return get_target_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_config.py deleted file mode 100644 index 6a39fd4..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTargetResponse200Config") - - -@_attrs_define -class GetTargetResponse200Config: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_target_response_200_config = cls() - - get_target_response_200_config.additional_properties = d - return get_target_response_200_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_metadata.py deleted file mode 100644 index a28e385..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTargetResponse200Metadata") - - -@_attrs_define -class GetTargetResponse200Metadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - get_target_response_200_metadata = cls() - - get_target_response_200_metadata.additional_properties = d - return get_target_response_200_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_provider_type_0.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_provider_type_0.py deleted file mode 100644 index 1a6e9fa..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_provider_type_0.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetTargetResponse200ProviderType0") - - -@_attrs_define -class GetTargetResponse200ProviderType0: - """ - Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - """ - - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id", UNSET) - - name = d.pop("name", UNSET) - - get_target_response_200_provider_type_0 = cls( - id=id, - name=name, - ) - - get_target_response_200_provider_type_0.additional_properties = d - return get_target_response_200_provider_type_0 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_variables_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_variables_item.py deleted file mode 100644 index 3d7fbd0..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_200_variables_item.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetTargetResponse200VariablesItem") - - -@_attrs_define -class GetTargetResponse200VariablesItem: - """ - Attributes: - key (str): - value (Union[bool, float, str]): - sensitive (Union[Unset, bool]): Default: False. - """ - - key: str - value: Union[bool, float, str] - sensitive: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - key = self.key - - value: Union[bool, float, str] - value = self.value - - sensitive = self.sensitive - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "key": key, - "value": value, - } - ) - if sensitive is not UNSET: - field_dict["sensitive"] = sensitive - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - key = d.pop("key") - - def _parse_value(data: object) -> Union[bool, float, str]: - return cast(Union[bool, float, str], data) - - value = _parse_value(d.pop("value")) - - sensitive = d.pop("sensitive", UNSET) - - get_target_response_200_variables_item = cls( - key=key, - value=value, - sensitive=sensitive, - ) - - get_target_response_200_variables_item.additional_properties = d - return get_target_response_200_variables_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_404.py deleted file mode 100644 index 4418d2b..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/get_target_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTargetResponse404") - - -@_attrs_define -class GetTargetResponse404: - """ - Attributes: - error (str): Example: Target not found. - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - get_target_response_404 = cls( - error=error, - ) - - get_target_response_404.additional_properties = d - return get_target_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body.py deleted file mode 100644 index d2c8032..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body.py +++ /dev/null @@ -1,72 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.set_target_providers_targets_body_targets_item import SetTargetProvidersTargetsBodyTargetsItem - - -T = TypeVar("T", bound="SetTargetProvidersTargetsBody") - - -@_attrs_define -class SetTargetProvidersTargetsBody: - """ - Attributes: - targets (List['SetTargetProvidersTargetsBodyTargetsItem']): - """ - - targets: List["SetTargetProvidersTargetsBodyTargetsItem"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - targets = [] - for targets_item_data in self.targets: - targets_item = targets_item_data.to_dict() - targets.append(targets_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "targets": targets, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.set_target_providers_targets_body_targets_item import SetTargetProvidersTargetsBodyTargetsItem - - d = src_dict.copy() - targets = [] - _targets = d.pop("targets") - for targets_item_data in _targets: - targets_item = SetTargetProvidersTargetsBodyTargetsItem.from_dict(targets_item_data) - - targets.append(targets_item) - - set_target_providers_targets_body = cls( - targets=targets, - ) - - set_target_providers_targets_body.additional_properties = d - return set_target_providers_targets_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item.py deleted file mode 100644 index 400882c..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.set_target_providers_targets_body_targets_item_config import ( - SetTargetProvidersTargetsBodyTargetsItemConfig, - ) - from ..models.set_target_providers_targets_body_targets_item_metadata import ( - SetTargetProvidersTargetsBodyTargetsItemMetadata, - ) - - -T = TypeVar("T", bound="SetTargetProvidersTargetsBodyTargetsItem") - - -@_attrs_define -class SetTargetProvidersTargetsBodyTargetsItem: - """ - Attributes: - identifier (str): - name (str): - version (str): - kind (str): - config (SetTargetProvidersTargetsBodyTargetsItemConfig): - metadata (SetTargetProvidersTargetsBodyTargetsItemMetadata): - """ - - identifier: str - name: str - version: str - kind: str - config: "SetTargetProvidersTargetsBodyTargetsItemConfig" - metadata: "SetTargetProvidersTargetsBodyTargetsItemMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - identifier = self.identifier - - name = self.name - - version = self.version - - kind = self.kind - - config = self.config.to_dict() - - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "identifier": identifier, - "name": name, - "version": version, - "kind": kind, - "config": config, - "metadata": metadata, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.set_target_providers_targets_body_targets_item_config import ( - SetTargetProvidersTargetsBodyTargetsItemConfig, - ) - from ..models.set_target_providers_targets_body_targets_item_metadata import ( - SetTargetProvidersTargetsBodyTargetsItemMetadata, - ) - - d = src_dict.copy() - identifier = d.pop("identifier") - - name = d.pop("name") - - version = d.pop("version") - - kind = d.pop("kind") - - config = SetTargetProvidersTargetsBodyTargetsItemConfig.from_dict(d.pop("config")) - - metadata = SetTargetProvidersTargetsBodyTargetsItemMetadata.from_dict(d.pop("metadata")) - - set_target_providers_targets_body_targets_item = cls( - identifier=identifier, - name=name, - version=version, - kind=kind, - config=config, - metadata=metadata, - ) - - set_target_providers_targets_body_targets_item.additional_properties = d - return set_target_providers_targets_body_targets_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_config.py deleted file mode 100644 index ce3c122..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SetTargetProvidersTargetsBodyTargetsItemConfig") - - -@_attrs_define -class SetTargetProvidersTargetsBodyTargetsItemConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - set_target_providers_targets_body_targets_item_config = cls() - - set_target_providers_targets_body_targets_item_config.additional_properties = d - return set_target_providers_targets_body_targets_item_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_metadata.py deleted file mode 100644 index f9e5daf..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/set_target_providers_targets_body_targets_item_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SetTargetProvidersTargetsBodyTargetsItemMetadata") - - -@_attrs_define -class SetTargetProvidersTargetsBodyTargetsItemMetadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - set_target_providers_targets_body_targets_item_metadata = cls() - - set_target_providers_targets_body_targets_item_metadata.additional_properties = d - return set_target_providers_targets_body_targets_item_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_body.py deleted file mode 100644 index 80a6d64..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_body.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateJobAgentBody") - - -@_attrs_define -class UpdateJobAgentBody: - """ - Attributes: - workspace_id (str): - name (str): - type (str): - """ - - workspace_id: str - name: str - type: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - workspace_id = self.workspace_id - - name = self.name - - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "workspaceId": workspace_id, - "name": name, - "type": type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - workspace_id = d.pop("workspaceId") - - name = d.pop("name") - - type = d.pop("type") - - update_job_agent_body = cls( - workspace_id=workspace_id, - name=name, - type=type, - ) - - update_job_agent_body.additional_properties = d - return update_job_agent_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_response_200.py deleted file mode 100644 index 259e3c5..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_agent_response_200.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateJobAgentResponse200") - - -@_attrs_define -class UpdateJobAgentResponse200: - """ - Attributes: - id (str): - name (str): - workspace_id (str): - """ - - id: str - name: str - workspace_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - workspace_id = self.workspace_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "workspaceId": workspace_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - workspace_id = d.pop("workspaceId") - - update_job_agent_response_200 = cls( - id=id, - name=name, - workspace_id=workspace_id, - ) - - update_job_agent_response_200.additional_properties = d - return update_job_agent_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_job_body.py deleted file mode 100644 index e46c86b..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_body.py +++ /dev/null @@ -1,98 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="UpdateJobBody") - - -@_attrs_define -class UpdateJobBody: - """ - Attributes: - status (Union[Unset, str]): - message (Union[None, Unset, str]): - external_id (Union[None, Unset, str]): - """ - - status: Union[Unset, str] = UNSET - message: Union[None, Unset, str] = UNSET - external_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - status = self.status - - message: Union[None, Unset, str] - if isinstance(self.message, Unset): - message = UNSET - else: - message = self.message - - external_id: Union[None, Unset, str] - if isinstance(self.external_id, Unset): - external_id = UNSET - else: - external_id = self.external_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if status is not UNSET: - field_dict["status"] = status - if message is not UNSET: - field_dict["message"] = message - if external_id is not UNSET: - field_dict["externalId"] = external_id - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - status = d.pop("status", UNSET) - - def _parse_message(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - message = _parse_message(d.pop("message", UNSET)) - - def _parse_external_id(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - external_id = _parse_external_id(d.pop("externalId", UNSET)) - - update_job_body = cls( - status=status, - message=message, - external_id=external_id, - ) - - update_job_body.additional_properties = d - return update_job_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_job_response_200.py deleted file mode 100644 index 829eb28..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_job_response_200.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateJobResponse200") - - -@_attrs_define -class UpdateJobResponse200: - """ - Attributes: - id (str): - """ - - id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - update_job_response_200 = cls( - id=id, - ) - - update_job_response_200.additional_properties = d - return update_job_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body.py deleted file mode 100644 index 452f0c3..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body.py +++ /dev/null @@ -1,137 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.update_target_body_metadata import UpdateTargetBodyMetadata - from ..models.update_target_body_variables_item import UpdateTargetBodyVariablesItem - - -T = TypeVar("T", bound="UpdateTargetBody") - - -@_attrs_define -class UpdateTargetBody: - """ - Attributes: - name (Union[Unset, str]): - version (Union[Unset, str]): - kind (Union[Unset, str]): - identifier (Union[Unset, str]): - workspace_id (Union[Unset, str]): - metadata (Union[Unset, UpdateTargetBodyMetadata]): - variables (Union[Unset, List['UpdateTargetBodyVariablesItem']]): - """ - - name: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - kind: Union[Unset, str] = UNSET - identifier: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET - metadata: Union[Unset, "UpdateTargetBodyMetadata"] = UNSET - variables: Union[Unset, List["UpdateTargetBodyVariablesItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - name = self.name - - version = self.version - - kind = self.kind - - identifier = self.identifier - - workspace_id = self.workspace_id - - metadata: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - variables: Union[Unset, List[Dict[str, Any]]] = UNSET - if not isinstance(self.variables, Unset): - variables = [] - for variables_item_data in self.variables: - variables_item = variables_item_data.to_dict() - variables.append(variables_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - if version is not UNSET: - field_dict["version"] = version - if kind is not UNSET: - field_dict["kind"] = kind - if identifier is not UNSET: - field_dict["identifier"] = identifier - if workspace_id is not UNSET: - field_dict["workspaceId"] = workspace_id - if metadata is not UNSET: - field_dict["metadata"] = metadata - if variables is not UNSET: - field_dict["variables"] = variables - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_target_body_metadata import UpdateTargetBodyMetadata - from ..models.update_target_body_variables_item import UpdateTargetBodyVariablesItem - - d = src_dict.copy() - name = d.pop("name", UNSET) - - version = d.pop("version", UNSET) - - kind = d.pop("kind", UNSET) - - identifier = d.pop("identifier", UNSET) - - workspace_id = d.pop("workspaceId", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, UpdateTargetBodyMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = UpdateTargetBodyMetadata.from_dict(_metadata) - - variables = [] - _variables = d.pop("variables", UNSET) - for variables_item_data in _variables or []: - variables_item = UpdateTargetBodyVariablesItem.from_dict(variables_item_data) - - variables.append(variables_item) - - update_target_body = cls( - name=name, - version=version, - kind=kind, - identifier=identifier, - workspace_id=workspace_id, - metadata=metadata, - variables=variables, - ) - - update_target_body.additional_properties = d - return update_target_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_metadata.py deleted file mode 100644 index 11aeb48..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTargetBodyMetadata") - - -@_attrs_define -class UpdateTargetBodyMetadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - update_target_body_metadata = cls() - - update_target_body_metadata.additional_properties = d - return update_target_body_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_variables_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_variables_item.py deleted file mode 100644 index b9b82da..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_body_variables_item.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="UpdateTargetBodyVariablesItem") - - -@_attrs_define -class UpdateTargetBodyVariablesItem: - """ - Attributes: - key (str): - value (Union[bool, float, str]): - sensitive (Union[Unset, bool]): Default: False. - """ - - key: str - value: Union[bool, float, str] - sensitive: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - key = self.key - - value: Union[bool, float, str] - value = self.value - - sensitive = self.sensitive - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "key": key, - "value": value, - } - ) - if sensitive is not UNSET: - field_dict["sensitive"] = sensitive - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - key = d.pop("key") - - def _parse_value(data: object) -> Union[bool, float, str]: - return cast(Union[bool, float, str], data) - - value = _parse_value(d.pop("value")) - - sensitive = d.pop("sensitive", UNSET) - - update_target_body_variables_item = cls( - key=key, - value=value, - sensitive=sensitive, - ) - - update_target_body_variables_item.additional_properties = d - return update_target_body_variables_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200.py deleted file mode 100644 index 291f44c..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200.py +++ /dev/null @@ -1,122 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.update_target_response_200_config import UpdateTargetResponse200Config - from ..models.update_target_response_200_metadata import UpdateTargetResponse200Metadata - - -T = TypeVar("T", bound="UpdateTargetResponse200") - - -@_attrs_define -class UpdateTargetResponse200: - """ - Attributes: - id (str): - name (str): - workspace_id (str): - kind (str): - identifier (str): - version (str): - config (UpdateTargetResponse200Config): - metadata (UpdateTargetResponse200Metadata): - """ - - id: str - name: str - workspace_id: str - kind: str - identifier: str - version: str - config: "UpdateTargetResponse200Config" - metadata: "UpdateTargetResponse200Metadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - workspace_id = self.workspace_id - - kind = self.kind - - identifier = self.identifier - - version = self.version - - config = self.config.to_dict() - - metadata = self.metadata.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "workspaceId": workspace_id, - "kind": kind, - "identifier": identifier, - "version": version, - "config": config, - "metadata": metadata, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_target_response_200_config import UpdateTargetResponse200Config - from ..models.update_target_response_200_metadata import UpdateTargetResponse200Metadata - - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - workspace_id = d.pop("workspaceId") - - kind = d.pop("kind") - - identifier = d.pop("identifier") - - version = d.pop("version") - - config = UpdateTargetResponse200Config.from_dict(d.pop("config")) - - metadata = UpdateTargetResponse200Metadata.from_dict(d.pop("metadata")) - - update_target_response_200 = cls( - id=id, - name=name, - workspace_id=workspace_id, - kind=kind, - identifier=identifier, - version=version, - config=config, - metadata=metadata, - ) - - update_target_response_200.additional_properties = d - return update_target_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_config.py deleted file mode 100644 index 6d85e83..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTargetResponse200Config") - - -@_attrs_define -class UpdateTargetResponse200Config: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - update_target_response_200_config = cls() - - update_target_response_200_config.additional_properties = d - return update_target_response_200_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_metadata.py deleted file mode 100644 index 5e76b8a..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_200_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTargetResponse200Metadata") - - -@_attrs_define -class UpdateTargetResponse200Metadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - update_target_response_200_metadata = cls() - - update_target_response_200_metadata.additional_properties = d - return update_target_response_200_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_404.py b/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_404.py deleted file mode 100644 index 9a4b8fa..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/update_target_response_404.py +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTargetResponse404") - - -@_attrs_define -class UpdateTargetResponse404: - """ - Attributes: - error (str): - """ - - error: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error = self.error - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "error": error, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - error = d.pop("error") - - update_target_response_404 = cls( - error=error, - ) - - update_target_response_404.additional_properties = d - return update_target_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_target_provider_response_200.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_target_provider_response_200.py deleted file mode 100644 index faebc27..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_target_provider_response_200.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpsertTargetProviderResponse200") - - -@_attrs_define -class UpsertTargetProviderResponse200: - """ - Attributes: - id (str): - name (str): - workspace_id (str): - """ - - id: str - name: str - workspace_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - - name = self.name - - workspace_id = self.workspace_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "workspaceId": workspace_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - id = d.pop("id") - - name = d.pop("name") - - workspace_id = d.pop("workspaceId") - - upsert_target_provider_response_200 = cls( - id=id, - name=name, - workspace_id=workspace_id, - ) - - upsert_target_provider_response_200.additional_properties = d - return upsert_target_provider_response_200 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body.py deleted file mode 100644 index 5772e74..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.upsert_targets_body_targets_item import UpsertTargetsBodyTargetsItem - - -T = TypeVar("T", bound="UpsertTargetsBody") - - -@_attrs_define -class UpsertTargetsBody: - """ - Attributes: - workspace_id (UUID): - targets (List['UpsertTargetsBodyTargetsItem']): - """ - - workspace_id: UUID - targets: List["UpsertTargetsBodyTargetsItem"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - workspace_id = str(self.workspace_id) - - targets = [] - for targets_item_data in self.targets: - targets_item = targets_item_data.to_dict() - targets.append(targets_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "workspaceId": workspace_id, - "targets": targets, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.upsert_targets_body_targets_item import UpsertTargetsBodyTargetsItem - - d = src_dict.copy() - workspace_id = UUID(d.pop("workspaceId")) - - targets = [] - _targets = d.pop("targets") - for targets_item_data in _targets: - targets_item = UpsertTargetsBodyTargetsItem.from_dict(targets_item_data) - - targets.append(targets_item) - - upsert_targets_body = cls( - workspace_id=workspace_id, - targets=targets, - ) - - upsert_targets_body.additional_properties = d - return upsert_targets_body - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item.py deleted file mode 100644 index 68491b4..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item.py +++ /dev/null @@ -1,137 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.upsert_targets_body_targets_item_config import UpsertTargetsBodyTargetsItemConfig - from ..models.upsert_targets_body_targets_item_metadata import UpsertTargetsBodyTargetsItemMetadata - from ..models.upsert_targets_body_targets_item_variables_item import UpsertTargetsBodyTargetsItemVariablesItem - - -T = TypeVar("T", bound="UpsertTargetsBodyTargetsItem") - - -@_attrs_define -class UpsertTargetsBodyTargetsItem: - """ - Attributes: - name (str): - kind (str): - identifier (str): - version (str): - config (UpsertTargetsBodyTargetsItemConfig): - metadata (Union[Unset, UpsertTargetsBodyTargetsItemMetadata]): - variables (Union[Unset, List['UpsertTargetsBodyTargetsItemVariablesItem']]): - """ - - name: str - kind: str - identifier: str - version: str - config: "UpsertTargetsBodyTargetsItemConfig" - metadata: Union[Unset, "UpsertTargetsBodyTargetsItemMetadata"] = UNSET - variables: Union[Unset, List["UpsertTargetsBodyTargetsItemVariablesItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - name = self.name - - kind = self.kind - - identifier = self.identifier - - version = self.version - - config = self.config.to_dict() - - metadata: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - variables: Union[Unset, List[Dict[str, Any]]] = UNSET - if not isinstance(self.variables, Unset): - variables = [] - for variables_item_data in self.variables: - variables_item = variables_item_data.to_dict() - variables.append(variables_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "kind": kind, - "identifier": identifier, - "version": version, - "config": config, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - if variables is not UNSET: - field_dict["variables"] = variables - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.upsert_targets_body_targets_item_config import UpsertTargetsBodyTargetsItemConfig - from ..models.upsert_targets_body_targets_item_metadata import UpsertTargetsBodyTargetsItemMetadata - from ..models.upsert_targets_body_targets_item_variables_item import UpsertTargetsBodyTargetsItemVariablesItem - - d = src_dict.copy() - name = d.pop("name") - - kind = d.pop("kind") - - identifier = d.pop("identifier") - - version = d.pop("version") - - config = UpsertTargetsBodyTargetsItemConfig.from_dict(d.pop("config")) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, UpsertTargetsBodyTargetsItemMetadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = UpsertTargetsBodyTargetsItemMetadata.from_dict(_metadata) - - variables = [] - _variables = d.pop("variables", UNSET) - for variables_item_data in _variables or []: - variables_item = UpsertTargetsBodyTargetsItemVariablesItem.from_dict(variables_item_data) - - variables.append(variables_item) - - upsert_targets_body_targets_item = cls( - name=name, - kind=kind, - identifier=identifier, - version=version, - config=config, - metadata=metadata, - variables=variables, - ) - - upsert_targets_body_targets_item.additional_properties = d - return upsert_targets_body_targets_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_config.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_config.py deleted file mode 100644 index f4045cd..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_config.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpsertTargetsBodyTargetsItemConfig") - - -@_attrs_define -class UpsertTargetsBodyTargetsItemConfig: - """ """ - - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - upsert_targets_body_targets_item_config = cls() - - upsert_targets_body_targets_item_config.additional_properties = d - return upsert_targets_body_targets_item_config - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_metadata.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_metadata.py deleted file mode 100644 index 330f6cf..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_metadata.py +++ /dev/null @@ -1,43 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpsertTargetsBodyTargetsItemMetadata") - - -@_attrs_define -class UpsertTargetsBodyTargetsItemMetadata: - """ """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - upsert_targets_body_targets_item_metadata = cls() - - upsert_targets_body_targets_item_metadata.additional_properties = d - return upsert_targets_body_targets_item_metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_variables_item.py b/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_variables_item.py deleted file mode 100644 index a28c8e0..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/models/upsert_targets_body_targets_item_variables_item.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="UpsertTargetsBodyTargetsItemVariablesItem") - - -@_attrs_define -class UpsertTargetsBodyTargetsItemVariablesItem: - """ - Attributes: - key (str): - value (Union[bool, float, str]): - sensitive (Union[Unset, bool]): - """ - - key: str - value: Union[bool, float, str] - sensitive: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - key = self.key - - value: Union[bool, float, str] - value = self.value - - sensitive = self.sensitive - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "key": key, - "value": value, - } - ) - if sensitive is not UNSET: - field_dict["sensitive"] = sensitive - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - key = d.pop("key") - - def _parse_value(data: object) -> Union[bool, float, str]: - return cast(Union[bool, float, str], data) - - value = _parse_value(d.pop("value")) - - sensitive = d.pop("sensitive", UNSET) - - upsert_targets_body_targets_item_variables_item = cls( - key=key, - value=value, - sensitive=sensitive, - ) - - upsert_targets_body_targets_item_variables_item.additional_properties = d - return upsert_targets_body_targets_item_variables_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/ctrlplane-api-client/ctrlplane_api_client/py.typed b/ctrlplane-api-client/ctrlplane_api_client/py.typed deleted file mode 100644 index 1aad327..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561 \ No newline at end of file diff --git a/ctrlplane-api-client/ctrlplane_api_client/types.py b/ctrlplane-api-client/ctrlplane_api_client/types.py deleted file mode 100644 index 21fac10..0000000 --- a/ctrlplane-api-client/ctrlplane_api_client/types.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Contains some shared types for properties""" - -from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar - -from attrs import define - - -class Unset: - def __bool__(self) -> Literal[False]: - return False - - -UNSET: Unset = Unset() - -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] - - -@define -class File: - """Contains information for file uploads""" - - payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None - - def to_tuple(self) -> FileJsonType: - """Return a tuple representation that httpx will accept for multipart/form-data""" - return self.file_name, self.payload, self.mime_type - - -T = TypeVar("T") - - -@define -class Response(Generic[T]): - """A response from an endpoint""" - - status_code: HTTPStatus - content: bytes - headers: MutableMapping[str, str] - parsed: Optional[T] - - -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] diff --git a/ctrlplane-api-client/pyproject.toml b/ctrlplane-api-client/pyproject.toml deleted file mode 100644 index 1afc9f8..0000000 --- a/ctrlplane-api-client/pyproject.toml +++ /dev/null @@ -1,27 +0,0 @@ -[tool.poetry] -name = "ctrlplane-api-client" -version = "1.0.0" -description = "A client library for accessing Ctrlplane API" -authors = [] -readme = "README.md" -packages = [ - {include = "ctrlplane_api_client"}, -] -include = ["CHANGELOG.md", "ctrlplane_api_client/py.typed"] - - -[tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" -python-dateutil = "^2.8.0" - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.ruff] -line-length = 120 - -[tool.ruff.lint] -select = ["F", "I", "UP"] diff --git a/ctrlplane/__init__.py b/ctrlplane/__init__.py index abf36f4..da1b390 100644 --- a/ctrlplane/__init__.py +++ b/ctrlplane/__init__.py @@ -2,6 +2,10 @@ from .client import AuthenticatedClient, Client + +__version__ = "0.1.0" + + __all__ = ( "AuthenticatedClient", "Client", diff --git a/openapi-python-client.yaml b/openapi-python-client.yaml new file mode 100644 index 0000000..fefddfe --- /dev/null +++ b/openapi-python-client.yaml @@ -0,0 +1 @@ +# openapi-python-client generate diff --git a/pyproject.toml b/pyproject.toml index 3855c87..aa736e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,11 +7,9 @@ name = "ctrlplane" dynamic = ["version"] description = "A client library for accessing Ctrlplane API" authors = [{ name = "Ctrlplane", email = "support@ctrlplane.dev" }] -readme = "package_readme.md" -license = { file = "LICENSE" } +readme = "README.md" requires-python = ">=3.7" dependencies = [ - "python = ^3.8", "httpx>=0.20.0,<0.28.0", "attrs>=21.3.0", "python-dateutil>=2.8.0", @@ -42,13 +40,6 @@ packages = [ ] include = ["CHANGELOG.md", "ctrlplane_api_client/py.typed"] - -[tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" -python-dateutil = "^2.8.0" - [tool.hatch.build.targets.sdist] include = [ "ctrlplane", @@ -81,3 +72,6 @@ ignore-overlong-task-comments = true [tool.ruff.lint.pydocstyle] convention = "google" + +[tool.hatch.version] +path = "ctrlplane/__init__.py"