diff --git a/.gitignore b/.gitignore index 61be670..2ba29ad 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ **/__pycache__/ .ruff_cache/ .vscode/ -griptape_cloud_python_client/generated/ +griptape_cloud_client/generated/ Griptape.openapi.yaml diff --git a/griptape_cloud_client/generated/.gitignore b/griptape_cloud_client/generated/.gitignore deleted file mode 100644 index 79a2c3d..0000000 --- a/griptape_cloud_client/generated/.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/griptape_cloud_client/generated/README.md b/griptape_cloud_client/generated/README.md deleted file mode 100644 index c44e1f0..0000000 --- a/griptape_cloud_client/generated/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# griptape-cloud-client - -A client library for accessing Griptape Cloud - -## Usage - -First, create a client: - -```python -from griptape_cloud_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 griptape_cloud_client import AuthenticatedClient - -client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") -``` - -Now call your endpoint and use your models: - -```python -from griptape_cloud_client.models import MyDataModel -from griptape_cloud_client.api.my_tag import get_my_data_model -from griptape_cloud_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 griptape_cloud_client.models import MyDataModel -from griptape_cloud_client.api.my_tag import get_my_data_model -from griptape_cloud_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 `griptape_cloud_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 griptape_cloud_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 griptape_cloud_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/griptape_cloud_client/generated/griptape_cloud_client/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/__init__.py deleted file mode 100644 index 8de1dea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -"""A client library for accessing Griptape Cloud""" - -from .client import AuthenticatedClient, Client - -__all__ = ( - "AuthenticatedClient", - "Client", -) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/__init__.py deleted file mode 100644 index 81f9fa2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains methods for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_api_key.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_api_key.py deleted file mode 100644 index e2fd092..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_api_key.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_api_key_request_content import CreateApiKeyRequestContent -from ...models.create_api_key_response_content import CreateApiKeyResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - user_id: str, - *, - body: CreateApiKeyRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/users/{user_id}/api-keys", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateApiKeyResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - body (CreateApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - body (CreateApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - user_id=user_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - body (CreateApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - body (CreateApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_organization_api_key.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_organization_api_key.py deleted file mode 100644 index a2e3829..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/create_organization_api_key.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_organization_api_key_request_content import CreateOrganizationApiKeyRequestContent -from ...models.create_organization_api_key_response_content import CreateOrganizationApiKeyResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, - *, - body: CreateOrganizationApiKeyRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/organizations/{organization_id}/api-keys", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateOrganizationApiKeyResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateOrganizationApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateOrganizationApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateOrganizationApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateOrganizationApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateOrganizationApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateOrganizationApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateOrganizationApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateOrganizationApiKeyRequestContent): - - 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[ClientErrorResponseContent, CreateOrganizationApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/delete_api_key.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/delete_api_key.py deleted file mode 100644 index 44635ec..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/delete_api_key.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - api_key_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/api-keys/{api_key_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - api_key_id=api_key_id, - client=client, - ).parsed - - -async def asyncio_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - api_key_id=api_key_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/get_api_key.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/get_api_key.py deleted file mode 100644 index 6888922..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/get_api_key.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_api_key_response_content import GetApiKeyResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - api_key_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/api-keys/{api_key_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetApiKeyResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - api_key_id=api_key_id, - client=client, - ).parsed - - -async def asyncio_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent]]: - """ - Args: - api_key_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[ClientErrorResponseContent, GetApiKeyResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - api_key_id=api_key_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_api_keys.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_api_keys.py deleted file mode 100644 index f634d5a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_api_keys.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_api_keys_response_content import ListApiKeysResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - user_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/users/{user_id}/api-keys", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListApiKeysResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - user_id=user_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListApiKeysResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_organization_api_keys.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_organization_api_keys.py deleted file mode 100644 index ff6d7a9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/list_organization_api_keys.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_organization_api_keys_response_content import ListOrganizationApiKeysResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - organization_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/organizations/{organization_id}/api-keys", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListOrganizationApiKeysResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationApiKeysResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/update_api_key.py b/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/update_api_key.py deleted file mode 100644 index b0a7771..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/api_keys/update_api_key.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_api_key_request_content import UpdateApiKeyRequestContent -from ...models.update_api_key_response_content import UpdateApiKeyResponseContent -from ...types import Response - - -def _get_kwargs( - api_key_id: str, - *, - body: UpdateApiKeyRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/api-keys/{api_key_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - if response.status_code == 200: - response_200 = UpdateApiKeyResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - """ - Args: - api_key_id (str): - body (UpdateApiKeyRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - """ - Args: - api_key_id (str): - body (UpdateApiKeyRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent] - """ - - return sync_detailed( - api_key_id=api_key_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateApiKeyRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - """ - Args: - api_key_id (str): - body (UpdateApiKeyRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]] - """ - - kwargs = _get_kwargs( - api_key_id=api_key_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - api_key_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateApiKeyRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent]]: - """ - Args: - api_key_id (str): - body (UpdateApiKeyRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateApiKeyResponseContent] - """ - - return ( - await asyncio_detailed( - api_key_id=api_key_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset.py deleted file mode 100644 index 1213d59..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset.py +++ /dev/null @@ -1,216 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_asset_request_content import CreateAssetRequestContent -from ...models.create_asset_response_content import CreateAssetResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, - *, - body: CreateAssetRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "put", - "url": f"/buckets/{bucket_id}/assets", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CreateAssetResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 201: - response_201 = CreateAssetResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - body (CreateAssetRequestContent): - - 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[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - body (CreateAssetRequestContent): - - 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[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - body (CreateAssetRequestContent): - - 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[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - body (CreateAssetRequestContent): - - 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[ClientErrorResponseContent, CreateAssetResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset_url.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset_url.py deleted file mode 100644 index a3ffa54..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/create_asset_url.py +++ /dev/null @@ -1,224 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_asset_url_request_content import CreateAssetUrlRequestContent -from ...models.create_asset_url_response_content import CreateAssetUrlResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, - name: str, - *, - body: CreateAssetUrlRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/buckets/{bucket_id}/asset-urls/{name}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CreateAssetUrlResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetUrlRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - body (CreateAssetUrlRequestContent): - - 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[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetUrlRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - body (CreateAssetUrlRequestContent): - - 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[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - name=name, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetUrlRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - body (CreateAssetUrlRequestContent): - - 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[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssetUrlRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - body (CreateAssetUrlRequestContent): - - 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[ClientErrorResponseContent, CreateAssetUrlResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - name=name, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/delete_asset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/delete_asset.py deleted file mode 100644 index 9870270..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/delete_asset.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, - name: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/buckets/{bucket_id}/assets/{name}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - name=name, - client=client, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - name=name, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/get_asset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/get_asset.py deleted file mode 100644 index c4a1c63..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/get_asset.py +++ /dev/null @@ -1,223 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_asset_response_content import GetAssetResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - bucket_id: str, - name: str, - *, - include_contents: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["include_contents"] = include_contents - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/buckets/{bucket_id}/assets/{name}", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetAssetResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - include_contents: Union[Unset, bool] = UNSET, -) -> Response[Union[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - include_contents (Union[Unset, bool]): true/false to include contents for the asset. - - 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[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - include_contents=include_contents, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - include_contents: Union[Unset, bool] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - include_contents (Union[Unset, bool]): true/false to include contents for the asset. - - 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[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - name=name, - client=client, - include_contents=include_contents, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - include_contents: Union[Unset, bool] = UNSET, -) -> Response[Union[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - include_contents (Union[Unset, bool]): true/false to include contents for the asset. - - 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[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - name=name, - include_contents=include_contents, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - name: str, - *, - client: Union[AuthenticatedClient, Client], - include_contents: Union[Unset, bool] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - name (str): - include_contents (Union[Unset, bool]): true/false to include contents for the asset. - - 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[ClientErrorResponseContent, GetAssetResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - name=name, - client=client, - include_contents=include_contents, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/list_assets.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assets/list_assets.py deleted file mode 100644 index b3e16bb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assets/list_assets.py +++ /dev/null @@ -1,255 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_assets_response_content import ListAssetsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - bucket_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - prefix: Union[Unset, str] = UNSET, - postfix: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["prefix"] = prefix - - params["postfix"] = postfix - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/buckets/{bucket_id}/assets", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListAssetsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - prefix: Union[Unset, str] = UNSET, - postfix: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - prefix (Union[Unset, str]): - postfix (Union[Unset, 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[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - page=page, - page_size=page_size, - prefix=prefix, - postfix=postfix, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - prefix: Union[Unset, str] = UNSET, - postfix: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - prefix (Union[Unset, str]): - postfix (Union[Unset, 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[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - client=client, - page=page, - page_size=page_size, - prefix=prefix, - postfix=postfix, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - prefix: Union[Unset, str] = UNSET, - postfix: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - prefix (Union[Unset, str]): - postfix (Union[Unset, 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[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - page=page, - page_size=page_size, - prefix=prefix, - postfix=postfix, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - prefix: Union[Unset, str] = UNSET, - postfix: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - prefix (Union[Unset, str]): - postfix (Union[Unset, 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[ClientErrorResponseContent, ListAssetsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - client=client, - page=page, - page_size=page_size, - prefix=prefix, - postfix=postfix, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/cancel_assistant_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/cancel_assistant_run.py deleted file mode 100644 index a108cc3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/cancel_assistant_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.cancel_assistant_run_response_content import CancelAssistantRunResponseContent -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/assistant-runs/{assistant_run_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CancelAssistantRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_run_id=assistant_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[CancelAssistantRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_run_id=assistant_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/create_assistant_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/create_assistant_run.py deleted file mode 100644 index 672f498..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/create_assistant_run.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_assistant_run_request_content import CreateAssistantRunRequestContent -from ...models.create_assistant_run_response_content import CreateAssistantRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_id: str, - *, - body: CreateAssistantRunRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/assistants/{assistant_id}/runs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateAssistantRunResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssistantRunRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - body (CreateAssistantRunRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssistantRunRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - body (CreateAssistantRunRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_id=assistant_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssistantRunRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - body (CreateAssistantRunRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssistantRunRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - body (CreateAssistantRunRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_id=assistant_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/get_assistant_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/get_assistant_run.py deleted file mode 100644 index 1277b71..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/get_assistant_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_assistant_run_response_content import GetAssistantRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/assistant-runs/{assistant_run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetAssistantRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_run_id=assistant_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, GetAssistantRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_run_id=assistant_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/list_assistant_runs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/list_assistant_runs.py deleted file mode 100644 index 7e21403..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistant_runs/list_assistant_runs.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.assistant_run_status import AssistantRunStatus -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_assistant_runs_response_content import ListAssistantRunsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - assistant_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[AssistantRunStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/assistants/{assistant_id}/runs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListAssistantRunsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[AssistantRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[AssistantRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[AssistantRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[AssistantRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_id=assistant_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[AssistantRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[AssistantRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[AssistantRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[AssistantRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListAssistantRunsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_id=assistant_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/create_assistant.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/create_assistant.py deleted file mode 100644 index 4f56bb9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/create_assistant.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_assistant_request_content import CreateAssistantRequestContent -from ...models.create_assistant_response_content import CreateAssistantResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateAssistantRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/assistants", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateAssistantResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - 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: CreateAssistantRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateAssistantRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateAssistantRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateAssistantRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateAssistantRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateAssistantRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateAssistantRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateAssistantRequestContent): - - 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[ClientErrorResponseContent, CreateAssistantResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/delete_assistant.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/delete_assistant.py deleted file mode 100644 index ec017ba..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/delete_assistant.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/assistants/{assistant_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_id=assistant_id, - client=client, - ).parsed - - -async def asyncio_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_id=assistant_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/get_assistant.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/get_assistant.py deleted file mode 100644 index 2d9ae67..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/get_assistant.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_assistant_response_content import GetAssistantResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/assistants/{assistant_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetAssistantResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_id=assistant_id, - client=client, - ).parsed - - -async def asyncio_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_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[ClientErrorResponseContent, GetAssistantResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_id=assistant_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/list_assistants.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/list_assistants.py deleted file mode 100644 index 151722a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/list_assistants.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_assistants_response_content import ListAssistantsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/assistants", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListAssistantsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListAssistantsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/update_assistant.py b/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/update_assistant.py deleted file mode 100644 index f0af20c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/assistants/update_assistant.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_assistant_request_content import UpdateAssistantRequestContent -from ...models.update_assistant_response_content import UpdateAssistantResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_id: str, - *, - body: UpdateAssistantRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/assistants/{assistant_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - if response.status_code == 200: - response_200 = UpdateAssistantResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateAssistantRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - """ - Args: - assistant_id (str): - body (UpdateAssistantRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateAssistantRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - """ - Args: - assistant_id (str): - body (UpdateAssistantRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent] - """ - - return sync_detailed( - assistant_id=assistant_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateAssistantRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - """ - Args: - assistant_id (str): - body (UpdateAssistantRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_id=assistant_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateAssistantRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent]]: - """ - Args: - assistant_id (str): - body (UpdateAssistantRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateAssistantResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_id=assistant_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/billing/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_billing_management_url.py b/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_billing_management_url.py deleted file mode 100644 index ee64665..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_billing_management_url.py +++ /dev/null @@ -1,177 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_billing_management_url_response_content import CreateBillingManagementUrlResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/billing/management-url", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ - Union[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - if response.status_code == 201: - response_201 = CreateBillingManagementUrlResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - 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], -) -> Response[ - Union[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - """ - 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[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[ - Union[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - """ - 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[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[ - Union[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - """ - 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[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[ - Union[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] -]: - """ - 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[ClientErrorResponseContent, CreateBillingManagementUrlResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_checkout_session.py b/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_checkout_session.py deleted file mode 100644 index 8595f38..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/billing/create_checkout_session.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_checkout_session_request_content import CreateCheckoutSessionRequestContent -from ...models.create_checkout_session_response_content import CreateCheckoutSessionResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateCheckoutSessionRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/billing/checkout-session", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateCheckoutSessionResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - 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: CreateCheckoutSessionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateCheckoutSessionRequestContent): - - 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[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateCheckoutSessionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateCheckoutSessionRequestContent): - - 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[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateCheckoutSessionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateCheckoutSessionRequestContent): - - 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[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateCheckoutSessionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateCheckoutSessionRequestContent): - - 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[ClientErrorResponseContent, CreateCheckoutSessionResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/create_bucket.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/create_bucket.py deleted file mode 100644 index b71112d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/create_bucket.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_bucket_request_content import CreateBucketRequestContent -from ...models.create_bucket_response_content import CreateBucketResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateBucketRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/buckets", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateBucketResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - 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: CreateBucketRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateBucketRequestContent): - - 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[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateBucketRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateBucketRequestContent): - - 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[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateBucketRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateBucketRequestContent): - - 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[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateBucketRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateBucketRequestContent): - - 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[ClientErrorResponseContent, CreateBucketResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/delete_bucket.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/delete_bucket.py deleted file mode 100644 index feeed32..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/delete_bucket.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/buckets/{bucket_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - client=client, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/get_bucket.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/get_bucket.py deleted file mode 100644 index dc97b7e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/get_bucket.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_bucket_response_content import GetBucketResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/buckets/{bucket_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetBucketResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - client=client, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent]]: - """ - Args: - bucket_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[ClientErrorResponseContent, GetBucketResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/list_buckets.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/list_buckets.py deleted file mode 100644 index 01248c9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/list_buckets.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_buckets_response_content import ListBucketsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/buckets", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListBucketsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListBucketsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/update_bucket.py b/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/update_bucket.py deleted file mode 100644 index 8b45fa3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/buckets/update_bucket.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_bucket_request_content import UpdateBucketRequestContent -from ...models.update_bucket_response_content import UpdateBucketResponseContent -from ...types import Response - - -def _get_kwargs( - bucket_id: str, - *, - body: UpdateBucketRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/buckets/{bucket_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - if response.status_code == 200: - response_200 = UpdateBucketResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateBucketRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - """ - Args: - bucket_id (str): - body (UpdateBucketRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateBucketRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - """ - Args: - bucket_id (str): - body (UpdateBucketRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent] - """ - - return sync_detailed( - bucket_id=bucket_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateBucketRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - """ - Args: - bucket_id (str): - body (UpdateBucketRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]] - """ - - kwargs = _get_kwargs( - bucket_id=bucket_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - bucket_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateBucketRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent]]: - """ - Args: - bucket_id (str): - body (UpdateBucketRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateBucketResponseContent] - """ - - return ( - await asyncio_detailed( - bucket_id=bucket_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message.py b/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message.py deleted file mode 100644 index 36f3d3d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_chat_message_request_content import CreateChatMessageRequestContent -from ...models.create_chat_message_response_content import CreateChatMessageResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateChatMessageRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/chat/messages", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateChatMessageResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - 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: CreateChatMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateChatMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateChatMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateChatMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message_stream.py b/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message_stream.py deleted file mode 100644 index f1e4ab4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/chat_messages/create_chat_message_stream.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_chat_message_stream_request_content import CreateChatMessageStreamRequestContent -from ...models.create_chat_message_stream_response_content import CreateChatMessageStreamResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateChatMessageStreamRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/chat/messages/stream", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateChatMessageStreamResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - 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: CreateChatMessageStreamRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageStreamRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateChatMessageStreamRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageStreamRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateChatMessageStreamRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageStreamRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateChatMessageStreamRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateChatMessageStreamRequestContent): - - 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[ClientErrorResponseContent, CreateChatMessageStreamResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/configs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/configs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/configs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/configs/get_config.py b/griptape_cloud_client/generated/griptape_cloud_client/api/configs/get_config.py deleted file mode 100644 index 6c43eb0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/configs/get_config.py +++ /dev/null @@ -1,165 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_config_response_content import GetConfigResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/config", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetConfigResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetConfigResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/connections/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/create_connection.py b/griptape_cloud_client/generated/griptape_cloud_client/api/connections/create_connection.py deleted file mode 100644 index b21354e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/create_connection.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_connection_request_content import CreateConnectionRequestContent -from ...models.create_connection_response_content import CreateConnectionResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateConnectionRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/connections", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateConnectionResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - 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: CreateConnectionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateConnectionRequestContent): - - 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[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateConnectionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateConnectionRequestContent): - - 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[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateConnectionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateConnectionRequestContent): - - 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[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateConnectionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateConnectionRequestContent): - - 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[ClientErrorResponseContent, CreateConnectionResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/delete_connection.py b/griptape_cloud_client/generated/griptape_cloud_client/api/connections/delete_connection.py deleted file mode 100644 index c6ad7af..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/delete_connection.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - connection_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/connections/{connection_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - connection_id=connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - connection_id=connection_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/get_token.py b/griptape_cloud_client/generated/griptape_cloud_client/api/connections/get_token.py deleted file mode 100644 index 8979162..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/get_token.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_token_response_content import GetTokenResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - connection_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/connections/{connection_id}/access-token", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetTokenResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - connection_id=connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - connection_id=connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - connection_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent]]: - """ - Args: - connection_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[ClientErrorResponseContent, GetTokenResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - connection_id=connection_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/list_connections.py b/griptape_cloud_client/generated/griptape_cloud_client/api/connections/list_connections.py deleted file mode 100644 index 44cbf84..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/connections/list_connections.py +++ /dev/null @@ -1,227 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_connections_response_content import ListConnectionsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - type_: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["type"] = type_ - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/connections", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListConnectionsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - type_: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - type_ (Union[Unset, 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[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - type_=type_, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - type_ (Union[Unset, 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[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - type_=type_, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - type_: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - type_ (Union[Unset, 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[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - type_=type_, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - type_ (Union[Unset, 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[ClientErrorResponseContent, ListConnectionsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - type_=type_, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/get_credit_balance.py b/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/get_credit_balance.py deleted file mode 100644 index 5961782..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/get_credit_balance.py +++ /dev/null @@ -1,165 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_credit_balance_response_content import GetCreditBalanceResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/api/credits/balance", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetCreditBalanceResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetCreditBalanceResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/list_credit_transactions.py b/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/list_credit_transactions.py deleted file mode 100644 index 5f614bc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/credits_/list_credit_transactions.py +++ /dev/null @@ -1,206 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/api/credits/transactions", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/create_data_connector.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/create_data_connector.py deleted file mode 100644 index 574d21a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/create_data_connector.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_data_connector_request_content import CreateDataConnectorRequestContent -from ...models.create_data_connector_response_content import CreateDataConnectorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateDataConnectorRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/data-connectors", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateDataConnectorResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - 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: CreateDataConnectorRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateDataConnectorRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateDataConnectorRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateDataConnectorRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, CreateDataConnectorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/delete_data_connector.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/delete_data_connector.py deleted file mode 100644 index d087314..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/delete_data_connector.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - data_connector_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/data-connectors/{data_connector_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_connector_id=data_connector_id, - client=client, - ).parsed - - -async def asyncio_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_connector_id=data_connector_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/get_data_connector.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/get_data_connector.py deleted file mode 100644 index 438ac7b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/get_data_connector.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_data_connector_response_content import GetDataConnectorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - data_connector_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/data-connectors/{data_connector_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetDataConnectorResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_connector_id=data_connector_id, - client=client, - ).parsed - - -async def asyncio_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, GetDataConnectorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_connector_id=data_connector_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/list_data_connectors.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/list_data_connectors.py deleted file mode 100644 index d0811b3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/list_data_connectors.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_data_connectors_response_content import ListDataConnectorsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/data-connectors", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListDataConnectorsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListDataConnectorsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/update_data_connector.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/update_data_connector.py deleted file mode 100644 index c56c5a3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_connectors/update_data_connector.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_data_connector_request_content import UpdateDataConnectorRequestContent -from ...models.update_data_connector_response_content import UpdateDataConnectorResponseContent -from ...types import Response - - -def _get_kwargs( - data_connector_id: str, - *, - body: UpdateDataConnectorRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/data-connectors/{data_connector_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - if response.status_code == 200: - response_200 = UpdateDataConnectorResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateDataConnectorRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - """ - Args: - data_connector_id (str): - body (UpdateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateDataConnectorRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - """ - Args: - data_connector_id (str): - body (UpdateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent] - """ - - return sync_detailed( - data_connector_id=data_connector_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateDataConnectorRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - """ - Args: - data_connector_id (str): - body (UpdateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateDataConnectorRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent]]: - """ - Args: - data_connector_id (str): - body (UpdateDataConnectorRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateDataConnectorResponseContent] - """ - - return ( - await asyncio_detailed( - data_connector_id=data_connector_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/cancel_data_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/cancel_data_job.py deleted file mode 100644 index e0bc535..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/cancel_data_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.cancel_data_job_response_content import CancelDataJobResponseContent -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - data_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/data-jobs/{data_job_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CancelDataJobResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_job_id=data_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_job_id=data_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_job_id=data_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[CancelDataJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_job_id=data_job_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/create_data_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/create_data_job.py deleted file mode 100644 index 268d111..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/create_data_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_data_job_response_content import CreateDataJobResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - data_connector_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/data-connectors/{data_connector_id}/data-jobs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = CreateDataJobResponseContent.from_dict(response.json()) - - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_connector_id=data_connector_id, - client=client, - ).parsed - - -async def asyncio_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_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[ClientErrorResponseContent, CreateDataJobResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_connector_id=data_connector_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/get_data_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/get_data_job.py deleted file mode 100644 index bff2a19..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/get_data_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_data_job_response_content import GetDataJobResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - data_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/data-jobs/{data_job_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetDataJobResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_job_id=data_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_job_id=data_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_job_id=data_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_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[ClientErrorResponseContent, GetDataJobResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_job_id=data_job_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/list_data_jobs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/list_data_jobs.py deleted file mode 100644 index 30a283b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/data_jobs/list_data_jobs.py +++ /dev/null @@ -1,248 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.data_job_status import DataJobStatus -from ...models.list_data_jobs_response_content import ListDataJobsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - data_connector_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DataJobStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/data-connectors/{data_connector_id}/data-jobs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListDataJobsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DataJobStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DataJobStatus]]): Comma-separated list of statuses to filter by. - - 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[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DataJobStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DataJobStatus]]): Comma-separated list of statuses to filter by. - - 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[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - data_connector_id=data_connector_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DataJobStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DataJobStatus]]): Comma-separated list of statuses to filter by. - - 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[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - data_connector_id=data_connector_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - data_connector_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DataJobStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - data_connector_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DataJobStatus]]): Comma-separated list of statuses to filter by. - - 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[ClientErrorResponseContent, ListDataJobsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - data_connector_id=data_connector_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/default/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/default/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/default/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/default/list_users.py b/griptape_cloud_client/generated/griptape_cloud_client/api/default/list_users.py deleted file mode 100644 index 6a8f9c4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/default/list_users.py +++ /dev/null @@ -1,165 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_users_response_content import ListUsersResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/users", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListUsersResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ListUsersResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_function_deployment.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_function_deployment.py deleted file mode 100644 index 9821d54..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_function_deployment.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_function_deployment_request_content import CreateFunctionDeploymentRequestContent -from ...models.create_function_deployment_response_content import CreateFunctionDeploymentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, - *, - body: CreateFunctionDeploymentRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/functions/{function_id}/deployments", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = CreateFunctionDeploymentResponseContent.from_dict(response.json()) - - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateFunctionDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - body (CreateFunctionDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateFunctionDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - body (CreateFunctionDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateFunctionDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - body (CreateFunctionDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateFunctionDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - body (CreateFunctionDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_structure_deployment.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_structure_deployment.py deleted file mode 100644 index 48eb3f3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_structure_deployment.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_structure_deployment_request_content import CreateStructureDeploymentRequestContent -from ...models.create_structure_deployment_response_content import CreateStructureDeploymentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_id: str, - *, - body: CreateStructureDeploymentRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/structures/{structure_id}/deployments", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = CreateStructureDeploymentResponseContent.from_dict(response.json()) - - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateStructureDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_tool_deployment.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_tool_deployment.py deleted file mode 100644 index 535a4fb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/create_tool_deployment.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_tool_deployment_request_content import CreateToolDeploymentRequestContent -from ...models.create_tool_deployment_response_content import CreateToolDeploymentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, - *, - body: CreateToolDeploymentRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/tools/{tool_id}/deployments", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = CreateToolDeploymentResponseContent.from_dict(response.json()) - - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateToolDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - body (CreateToolDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateToolDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - body (CreateToolDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateToolDeploymentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - body (CreateToolDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateToolDeploymentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - body (CreateToolDeploymentRequestContent): - - 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[ClientErrorResponseContent, CreateToolDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/get_deployment.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/get_deployment.py deleted file mode 100644 index 3dedfea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/get_deployment.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_deployment_response_content import GetDeploymentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - deployment_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/deployments/{deployment_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetDeploymentResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - deployment_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[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - deployment_id=deployment_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - deployment_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[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - deployment_id=deployment_id, - client=client, - ).parsed - - -async def asyncio_detailed( - deployment_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - deployment_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[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - deployment_id=deployment_id, - ) - - 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], -) -> Optional[Union[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - deployment_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[ClientErrorResponseContent, GetDeploymentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - deployment_id=deployment_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_function_deployments.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_function_deployments.py deleted file mode 100644 index 9b43867..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_function_deployments.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_function_deployments_response_content import ListFunctionDeploymentsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - function_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/functions/{function_id}/deployments", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListFunctionDeploymentsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_structure_deployments.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_structure_deployments.py deleted file mode 100644 index fdbe396..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_structure_deployments.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.deployment_status import DeploymentStatus -from ...models.list_structure_deployments_response_content import ListStructureDeploymentsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DeploymentStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structures/{structure_id}/deployments", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListStructureDeploymentsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DeploymentStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DeploymentStatus]]): Comma-separated list of deployment statuses - to filter by. - - 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[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DeploymentStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DeploymentStatus]]): Comma-separated list of deployment statuses - to filter by. - - 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[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DeploymentStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DeploymentStatus]]): Comma-separated list of deployment statuses - to filter by. - - 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[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[DeploymentStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[DeploymentStatus]]): Comma-separated list of deployment statuses - to filter by. - - 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[ClientErrorResponseContent, ListStructureDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_tool_deployments.py b/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_tool_deployments.py deleted file mode 100644 index 875b83e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/deployments/list_tool_deployments.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_tool_deployments_response_content import ListToolDeploymentsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - tool_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tools/{tool_id}/deployments", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListToolDeploymentsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolDeploymentsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/create_events.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/create_events.py deleted file mode 100644 index 135a824..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/create_events.py +++ /dev/null @@ -1,209 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_events_request_content import CreateEventsRequestContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_run_id: str, - *, - body: CreateEventsRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/structure-runs/{structure_run_id}/events", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = cast(Any, None) - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateEventsRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - body (CreateEventsRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateEventsRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - body (CreateEventsRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateEventsRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - body (CreateEventsRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateEventsRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - body (CreateEventsRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_assistant_run_events_sse.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_assistant_run_events_sse.py deleted file mode 100644 index 0c5f1ae..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_assistant_run_events_sse.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - assistant_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/assistant-runs/{assistant_run_id}/events/stream", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - if response.status_code == 200: - response_200 = response.text - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str] - """ - - return sync_detailed( - assistant_run_id=assistant_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - assistant_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str] - """ - - return ( - await asyncio_detailed( - assistant_run_id=assistant_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_event.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_event.py deleted file mode 100644 index e15bdab..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_event.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_event_response_content import GetEventResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - event_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/events/{event_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetEventResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - event_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - """ - Args: - event_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[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - event_id=event_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - event_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - """ - Args: - event_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[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - event_id=event_id, - client=client, - ).parsed - - -async def asyncio_detailed( - event_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - """ - Args: - event_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[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - event_id=event_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - event_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent]]: - """ - Args: - event_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[ClientErrorResponseContent, GetEventResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - event_id=event_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_structure_run_events_sse.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_structure_run_events_sse.py deleted file mode 100644 index e16c688..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/get_structure_run_events_sse.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structure-runs/{structure_run_id}/events/stream", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - if response.status_code == 200: - response_200 = response.text - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, str]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ServiceErrorResponseContent, str] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_assistant_events.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_assistant_events.py deleted file mode 100644 index c82c75e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_assistant_events.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_assistant_events_response_content import ListAssistantEventsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - assistant_run_id: str, - *, - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["limit"] = limit - - params["offset"] = offset - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/assistant-runs/{assistant_run_id}/events", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListAssistantEventsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - limit=limit, - offset=offset, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - assistant_run_id=assistant_run_id, - client=client, - limit=limit, - offset=offset, - ).parsed - - -async def asyncio_detailed( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - assistant_run_id=assistant_run_id, - limit=limit, - offset=offset, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - assistant_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - assistant_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListAssistantEventsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - assistant_run_id=assistant_run_id, - client=client, - limit=limit, - offset=offset, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_events.py b/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_events.py deleted file mode 100644 index eb507a9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/events/list_events.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_events_response_content import ListEventsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_run_id: str, - *, - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["limit"] = limit - - params["offset"] = offset - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structure-runs/{structure_run_id}/events", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListEventsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - limit=limit, - offset=offset, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - limit=limit, - offset=offset, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - limit=limit, - offset=offset, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - limit: Union[Unset, str] = UNSET, - offset: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - limit (Union[Unset, str]): - offset (Union[Unset, 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[ClientErrorResponseContent, ListEventsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - limit=limit, - offset=offset, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_get.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_get.py deleted file mode 100644 index d191ba5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_get.py +++ /dev/null @@ -1,195 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/functions/{function_id}/execute", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Query parameters are passed as 'query_params' to the - function. - - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Query parameters are passed as 'query_params' to the - function. - - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Query parameters are passed as 'query_params' to the - function. - - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Query parameters are passed as 'query_params' to the - function. - - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_post.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_post.py deleted file mode 100644 index 2cc5060..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_execute/create_function_execution_post.py +++ /dev/null @@ -1,216 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, - *, - body: Any, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/functions/{function_id}/execute", - } - - _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, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Input body is passed as 'body' to the function. Query - parameters are passed as 'query_params'. - - Args: - function_id (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Input body is passed as 'body' to the function. Query - parameters are passed as 'query_params'. - - Args: - function_id (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Input body is passed as 'body' to the function. Query - parameters are passed as 'query_params'. - - Args: - function_id (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """Executes the function with the given input. Input body is passed as 'body' to the function. Query - parameters are passed as 'query_params'. - - Args: - function_id (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/get_function_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/get_function_run.py deleted file mode 100644 index 1c14026..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/get_function_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_function_run_response_content import GetFunctionRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/function-runs/{function_run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetFunctionRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_run_id=function_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_run_id=function_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_run_id=function_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, GetFunctionRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_run_id=function_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_run_logs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_run_logs.py deleted file mode 100644 index 226bcd7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_run_logs.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_function_run_logs_response_content import ListFunctionRunLogsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/function-runs/{function_run_id}/logs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListFunctionRunLogsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_run_id=function_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_run_id=function_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_run_id=function_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_run_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[ClientErrorResponseContent, ListFunctionRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_run_id=function_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_runs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_runs.py deleted file mode 100644 index 5653b93..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/function_runs/list_function_runs.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.function_run_status import FunctionRunStatus -from ...models.list_function_runs_response_content import ListFunctionRunsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - function_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[FunctionRunStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/functions/{function_id}/runs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListFunctionRunsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[FunctionRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[FunctionRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[FunctionRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[FunctionRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[FunctionRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[FunctionRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[FunctionRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[FunctionRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListFunctionRunsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/create_function.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/create_function.py deleted file mode 100644 index c51f4d2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/create_function.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_function_request_content import CreateFunctionRequestContent -from ...models.create_function_response_content import CreateFunctionResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateFunctionRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/functions", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateFunctionResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - 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: CreateFunctionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateFunctionRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateFunctionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateFunctionRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateFunctionRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateFunctionRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateFunctionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateFunctionRequestContent): - - 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[ClientErrorResponseContent, CreateFunctionResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/delete_function.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/delete_function.py deleted file mode 100644 index e676e42..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/delete_function.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/functions/{function_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/get_function.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/get_function.py deleted file mode 100644 index 6708282..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/get_function.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_function_response_content import GetFunctionResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/functions/{function_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetFunctionResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent]]: - """ - Args: - function_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[ClientErrorResponseContent, GetFunctionResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/list_functions.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/list_functions.py deleted file mode 100644 index fb9e3d3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/list_functions.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_functions_response_content import ListFunctionsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/functions", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListFunctionsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListFunctionsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/update_function.py b/griptape_cloud_client/generated/griptape_cloud_client/api/functions/update_function.py deleted file mode 100644 index 35b1886..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/functions/update_function.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_function_request_content import UpdateFunctionRequestContent -from ...models.update_function_response_content import UpdateFunctionResponseContent -from ...types import Response - - -def _get_kwargs( - function_id: str, - *, - body: UpdateFunctionRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/functions/{function_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - if response.status_code == 200: - response_200 = UpdateFunctionResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateFunctionRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - """ - Args: - function_id (str): - body (UpdateFunctionRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateFunctionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - """ - Args: - function_id (str): - body (UpdateFunctionRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent] - """ - - return sync_detailed( - function_id=function_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateFunctionRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - """ - Args: - function_id (str): - body (UpdateFunctionRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]] - """ - - kwargs = _get_kwargs( - function_id=function_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - function_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateFunctionRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent]]: - """ - Args: - function_id (str): - body (UpdateFunctionRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateFunctionResponseContent] - """ - - return ( - await asyncio_detailed( - function_id=function_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/create_integration.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/create_integration.py deleted file mode 100644 index f3b77b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/create_integration.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_integration_request_content import CreateIntegrationRequestContent -from ...models.create_integration_response_content import CreateIntegrationResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateIntegrationRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/integrations", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateIntegrationResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - 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: CreateIntegrationRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateIntegrationRequestContent): - - 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[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateIntegrationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateIntegrationRequestContent): - - 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[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateIntegrationRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateIntegrationRequestContent): - - 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[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateIntegrationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateIntegrationRequestContent): - - 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[ClientErrorResponseContent, CreateIntegrationResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/delete_integration.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/delete_integration.py deleted file mode 100644 index 84be2bd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/delete_integration.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - integration_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/integrations/{integration_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - integration_id=integration_id, - client=client, - ).parsed - - -async def asyncio_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - integration_id=integration_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/get_integration.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/get_integration.py deleted file mode 100644 index 9695570..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/get_integration.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_integration_response_content import GetIntegrationResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - integration_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/integrations/{integration_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetIntegrationResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - integration_id=integration_id, - client=client, - ).parsed - - -async def asyncio_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent]]: - """ - Args: - integration_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[ClientErrorResponseContent, GetIntegrationResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - integration_id=integration_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/list_integrations.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/list_integrations.py deleted file mode 100644 index ba7429b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/list_integrations.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_integrations_response_content import ListIntegrationsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/integrations", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListIntegrationsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListIntegrationsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/update_integration.py b/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/update_integration.py deleted file mode 100644 index 40ab1c7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/integrations/update_integration.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_integration_request_content import UpdateIntegrationRequestContent -from ...models.update_integration_response_content import UpdateIntegrationResponseContent -from ...types import Response - - -def _get_kwargs( - integration_id: str, - *, - body: UpdateIntegrationRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/integrations/{integration_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - if response.status_code == 200: - response_200 = UpdateIntegrationResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateIntegrationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - """ - Args: - integration_id (str): - body (UpdateIntegrationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateIntegrationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - """ - Args: - integration_id (str): - body (UpdateIntegrationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent] - """ - - return sync_detailed( - integration_id=integration_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateIntegrationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - """ - Args: - integration_id (str): - body (UpdateIntegrationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]] - """ - - kwargs = _get_kwargs( - integration_id=integration_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - integration_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateIntegrationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent]]: - """ - Args: - integration_id (str): - body (UpdateIntegrationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateIntegrationResponseContent] - """ - - return ( - await asyncio_detailed( - integration_id=integration_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/create_invite.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/create_invite.py deleted file mode 100644 index bbdfc6b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/create_invite.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_invite_request_content import CreateInviteRequestContent -from ...models.create_invite_response_content import CreateInviteResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, - *, - body: CreateInviteRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/organizations/{organization_id}/invites", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateInviteResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateInviteRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateInviteRequestContent): - - 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[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateInviteRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateInviteRequestContent): - - 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[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateInviteRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateInviteRequestContent): - - 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[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateInviteRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (CreateInviteRequestContent): - - 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[ClientErrorResponseContent, CreateInviteResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/delete_invite.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/delete_invite.py deleted file mode 100644 index e8afce3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/delete_invite.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - invite_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/invites/{invite_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - invite_id=invite_id, - client=client, - ).parsed - - -async def asyncio_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - invite_id=invite_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/get_invite.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/get_invite.py deleted file mode 100644 index 797489b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/get_invite.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_invite_response_content import GetInviteResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - invite_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/invites/{invite_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetInviteResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - invite_id=invite_id, - client=client, - ).parsed - - -async def asyncio_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_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[ClientErrorResponseContent, GetInviteResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - invite_id=invite_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_invites.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_invites.py deleted file mode 100644 index ea01165..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_invites.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_invites_response_content import ListInvitesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - organization_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/organizations/{organization_id}/invites", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListInvitesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListInvitesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_user_invites.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_user_invites.py deleted file mode 100644 index b78e68a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/list_user_invites.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_user_invites_response_content import ListUserInvitesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/invites", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListUserInvitesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListUserInvitesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/respond_to_invite.py b/griptape_cloud_client/generated/griptape_cloud_client/api/invites/respond_to_invite.py deleted file mode 100644 index 7e71a71..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/invites/respond_to_invite.py +++ /dev/null @@ -1,209 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.respond_to_invite_request_content import RespondToInviteRequestContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - invite_id: str, - *, - body: RespondToInviteRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/invites/{invite_id}/response", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: RespondToInviteRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_id (str): - body (RespondToInviteRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: RespondToInviteRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_id (str): - body (RespondToInviteRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - invite_id=invite_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: RespondToInviteRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_id (str): - body (RespondToInviteRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - invite_id=invite_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - invite_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: RespondToInviteRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - invite_id (str): - body (RespondToInviteRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - invite_id=invite_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/cancel_knowledge_base_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/cancel_knowledge_base_job.py deleted file mode 100644 index b324db3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/cancel_knowledge_base_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.cancel_knowledge_base_job_response_content import CancelKnowledgeBaseJobResponseContent -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/knowledge-base-jobs/{knowledge_base_job_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CancelKnowledgeBaseJobResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_job_id=knowledge_base_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_job_id=knowledge_base_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_job_id=knowledge_base_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[CancelKnowledgeBaseJobResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_job_id=knowledge_base_job_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/create_knowledge_base_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/create_knowledge_base_job.py deleted file mode 100644 index 7e5f08f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/create_knowledge_base_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_knowledge_base_job_response_content import CreateKnowledgeBaseJobResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/knowledge-bases/{knowledge_base_id}/knowledge-base-jobs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 202: - response_202 = CreateKnowledgeBaseJobResponseContent.from_dict(response.json()) - - return response_202 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, CreateKnowledgeBaseJobResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/get_knowledge_base_job.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/get_knowledge_base_job.py deleted file mode 100644 index 0b9d433..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/get_knowledge_base_job.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_knowledge_base_job_response_content import GetKnowledgeBaseJobResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_job_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-base-jobs/{knowledge_base_job_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetKnowledgeBaseJobResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_job_id=knowledge_base_job_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_job_id=knowledge_base_job_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_job_id=knowledge_base_job_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_job_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseJobResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_job_id=knowledge_base_job_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/list_knowledge_base_jobs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/list_knowledge_base_jobs.py deleted file mode 100644 index 4a9a333..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_base_jobs/list_knowledge_base_jobs.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.knowledge_base_job_status import KnowledgeBaseJobStatus -from ...models.list_knowledge_base_jobs_response_content import ListKnowledgeBaseJobsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - knowledge_base_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[KnowledgeBaseJobStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-bases/{knowledge_base_id}/knowledge-base-jobs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListKnowledgeBaseJobsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[KnowledgeBaseJobStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[KnowledgeBaseJobStatus]]): Comma-separated list of statuses to - filter by. - - 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[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[KnowledgeBaseJobStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[KnowledgeBaseJobStatus]]): Comma-separated list of statuses to - filter by. - - 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[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[KnowledgeBaseJobStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[KnowledgeBaseJobStatus]]): Comma-separated list of statuses to - filter by. - - 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[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[KnowledgeBaseJobStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[KnowledgeBaseJobStatus]]): Comma-separated list of statuses to - filter by. - - 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[ClientErrorResponseContent, ListKnowledgeBaseJobsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/create_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/create_knowledge_base.py deleted file mode 100644 index bb9ca8e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/create_knowledge_base.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_knowledge_base_request_content import CreateKnowledgeBaseRequestContent -from ...models.create_knowledge_base_response_content import CreateKnowledgeBaseResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateKnowledgeBaseRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/knowledge-bases", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateKnowledgeBaseResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - 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: CreateKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, CreateKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/delete_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/delete_knowledge_base.py deleted file mode 100644 index 3b4b3fb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/delete_knowledge_base.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/knowledge-bases/{knowledge_base_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base.py deleted file mode 100644 index 9ca114a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_knowledge_base_response_content import GetKnowledgeBaseResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-bases/{knowledge_base_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetKnowledgeBaseResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_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[ClientErrorResponseContent, GetKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_query.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_query.py deleted file mode 100644 index 62dfee4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_query.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_knowledge_base_query_response_content import GetKnowledgeBaseQueryResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_query_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-base-queries/{knowledge_base_query_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetKnowledgeBaseQueryResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_query_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_query_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[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_query_id=knowledge_base_query_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_query_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_query_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[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_query_id=knowledge_base_query_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_query_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_query_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[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_query_id=knowledge_base_query_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_query_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_query_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[ClientErrorResponseContent, GetKnowledgeBaseQueryResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_query_id=knowledge_base_query_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_search.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_search.py deleted file mode 100644 index 88e548f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/get_knowledge_base_search.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_knowledge_base_search_response_content import GetKnowledgeBaseSearchResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_search_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-base-searches/{knowledge_base_search_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetKnowledgeBaseSearchResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_search_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_search_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[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_search_id=knowledge_base_search_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_search_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_search_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[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_search_id=knowledge_base_search_id, - client=client, - ).parsed - - -async def asyncio_detailed( - knowledge_base_search_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_search_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[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_search_id=knowledge_base_search_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_search_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_search_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[ClientErrorResponseContent, GetKnowledgeBaseSearchResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_search_id=knowledge_base_search_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_queries.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_queries.py deleted file mode 100644 index 1f36f7c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_queries.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_knowledge_base_queries_response_content import ListKnowledgeBaseQueriesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - knowledge_base_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-bases/{knowledge_base_id}/queries", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListKnowledgeBaseQueriesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseQueriesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_searches.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_searches.py deleted file mode 100644 index c51486d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_base_searches.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_knowledge_base_searches_response_content import ListKnowledgeBaseSearchesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - knowledge_base_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/knowledge-bases/{knowledge_base_id}/searches", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListKnowledgeBaseSearchesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBaseSearchesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_bases.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_bases.py deleted file mode 100644 index 7842017..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/list_knowledge_bases.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_knowledge_bases_response_content import ListKnowledgeBasesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/knowledge-bases", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListKnowledgeBasesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListKnowledgeBasesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/query_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/query_knowledge_base.py deleted file mode 100644 index b5a834a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/query_knowledge_base.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.query_knowledge_base_request_content import QueryKnowledgeBaseRequestContent -from ...models.query_knowledge_base_response_content import QueryKnowledgeBaseResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, - *, - body: QueryKnowledgeBaseRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/knowledge-bases/{knowledge_base_id}/query", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = QueryKnowledgeBaseResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (QueryKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (QueryKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (QueryKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (QueryKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, QueryKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/search_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/search_knowledge_base.py deleted file mode 100644 index ea2225e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/search_knowledge_base.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.search_knowledge_base_request_content import SearchKnowledgeBaseRequestContent -from ...models.search_knowledge_base_response_content import SearchKnowledgeBaseResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, - *, - body: SearchKnowledgeBaseRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/knowledge-bases/{knowledge_base_id}/search", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = SearchKnowledgeBaseResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SearchKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (SearchKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SearchKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (SearchKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SearchKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (SearchKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: SearchKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (SearchKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, SearchKnowledgeBaseResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/update_knowledge_base.py b/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/update_knowledge_base.py deleted file mode 100644 index f83a312..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/knowledge_bases/update_knowledge_base.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_knowledge_base_request_content import UpdateKnowledgeBaseRequestContent -from ...models.update_knowledge_base_response_content import UpdateKnowledgeBaseResponseContent -from ...types import Response - - -def _get_kwargs( - knowledge_base_id: str, - *, - body: UpdateKnowledgeBaseRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/knowledge-bases/{knowledge_base_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - if response.status_code == 200: - response_200 = UpdateKnowledgeBaseResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (UpdateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (UpdateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent] - """ - - return sync_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateKnowledgeBaseRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (UpdateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]] - """ - - kwargs = _get_kwargs( - knowledge_base_id=knowledge_base_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - knowledge_base_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateKnowledgeBaseRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent]]: - """ - Args: - knowledge_base_id (str): - body (UpdateKnowledgeBaseRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateKnowledgeBaseResponseContent] - """ - - return ( - await asyncio_detailed( - knowledge_base_id=knowledge_base_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/create_library.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/create_library.py deleted file mode 100644 index 2254847..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/create_library.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_library_request_content import CreateLibraryRequestContent -from ...models.create_library_response_content import CreateLibraryResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateLibraryRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/libraries", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateLibraryResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - 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: CreateLibraryRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateLibraryRequestContent): - - 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[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateLibraryRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateLibraryRequestContent): - - 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[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateLibraryRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateLibraryRequestContent): - - 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[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateLibraryRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateLibraryRequestContent): - - 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[ClientErrorResponseContent, CreateLibraryResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/delete_library.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/delete_library.py deleted file mode 100644 index ec8cb27..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/delete_library.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - library_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/libraries/{library_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - library_id=library_id, - client=client, - ).parsed - - -async def asyncio_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - library_id=library_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/get_library.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/get_library.py deleted file mode 100644 index b8852d5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/get_library.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_library_response_content import GetLibraryResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - library_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/libraries/{library_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetLibraryResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - library_id=library_id, - client=client, - ).parsed - - -async def asyncio_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent]]: - """ - Args: - library_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[ClientErrorResponseContent, GetLibraryResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - library_id=library_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/list_libraries.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/list_libraries.py deleted file mode 100644 index 37bfae6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/list_libraries.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_libraries_response_content import ListLibrariesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/libraries", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListLibrariesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListLibrariesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/update_library.py b/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/update_library.py deleted file mode 100644 index ad7b816..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/libraries/update_library.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_library_request_content import UpdateLibraryRequestContent -from ...models.update_library_response_content import UpdateLibraryResponseContent -from ...types import Response - - -def _get_kwargs( - library_id: str, - *, - body: UpdateLibraryRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/libraries/{library_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - if response.status_code == 200: - response_200 = UpdateLibraryResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateLibraryRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - """ - Args: - library_id (str): - body (UpdateLibraryRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateLibraryRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - """ - Args: - library_id (str): - body (UpdateLibraryRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent] - """ - - return sync_detailed( - library_id=library_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateLibraryRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - """ - Args: - library_id (str): - body (UpdateLibraryRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]] - """ - - kwargs = _get_kwargs( - library_id=library_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - library_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateLibraryRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent]]: - """ - Args: - library_id (str): - body (UpdateLibraryRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateLibraryResponseContent] - """ - - return ( - await asyncio_detailed( - library_id=library_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/create_message.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/create_message.py deleted file mode 100644 index ea99b6b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/create_message.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_message_request_content import CreateMessageRequestContent -from ...models.create_message_response_content import CreateMessageResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - thread_id: str, - *, - body: CreateMessageRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/threads/{thread_id}/messages", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateMessageResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - body (CreateMessageRequestContent): - - 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[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - body (CreateMessageRequestContent): - - 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[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - thread_id=thread_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - body (CreateMessageRequestContent): - - 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[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - body (CreateMessageRequestContent): - - 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[ClientErrorResponseContent, CreateMessageResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - thread_id=thread_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/delete_message.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/delete_message.py deleted file mode 100644 index c978a4f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/delete_message.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - message_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/messages/{message_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - message_id=message_id, - client=client, - ).parsed - - -async def asyncio_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - message_id=message_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/get_message.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/get_message.py deleted file mode 100644 index 41696f5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/get_message.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_message_response_content import GetMessageResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - message_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/messages/{message_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetMessageResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - message_id=message_id, - client=client, - ).parsed - - -async def asyncio_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent]]: - """ - Args: - message_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[ClientErrorResponseContent, GetMessageResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - message_id=message_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/list_messages.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/list_messages.py deleted file mode 100644 index 7e42c14..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/list_messages.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_messages_response_content import ListMessagesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - thread_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/threads/{thread_id}/messages", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListMessagesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - thread_id=thread_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListMessagesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - thread_id=thread_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/update_message.py b/griptape_cloud_client/generated/griptape_cloud_client/api/messages/update_message.py deleted file mode 100644 index cb3a6fc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/messages/update_message.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_message_request_content import UpdateMessageRequestContent -from ...models.update_message_response_content import UpdateMessageResponseContent -from ...types import Response - - -def _get_kwargs( - message_id: str, - *, - body: UpdateMessageRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/messages/{message_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - if response.status_code == 200: - response_200 = UpdateMessageResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - """ - Args: - message_id (str): - body (UpdateMessageRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - """ - Args: - message_id (str): - body (UpdateMessageRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent] - """ - - return sync_detailed( - message_id=message_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateMessageRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - """ - Args: - message_id (str): - body (UpdateMessageRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]] - """ - - kwargs = _get_kwargs( - message_id=message_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - message_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateMessageRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent]]: - """ - Args: - message_id (str): - body (UpdateMessageRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateMessageResponseContent] - """ - - return ( - await asyncio_detailed( - message_id=message_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/models/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/models/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/models/list_models.py b/griptape_cloud_client/generated/griptape_cloud_client/api/models/list_models.py deleted file mode 100644 index f8af81b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/models/list_models.py +++ /dev/null @@ -1,242 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_models_response_content import ListModelsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - model_type: Union[Unset, str] = UNSET, - default: Union[Unset, bool] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["model_type"] = model_type - - params["default"] = default - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/models", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListModelsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - model_type: Union[Unset, str] = UNSET, - default: Union[Unset, bool] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - model_type (Union[Unset, str]): - default (Union[Unset, bool]): - - 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[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - model_type=model_type, - default=default, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - model_type: Union[Unset, str] = UNSET, - default: Union[Unset, bool] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - model_type (Union[Unset, str]): - default (Union[Unset, bool]): - - 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[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - model_type=model_type, - default=default, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - model_type: Union[Unset, str] = UNSET, - default: Union[Unset, bool] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - model_type (Union[Unset, str]): - default (Union[Unset, bool]): - - 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[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - model_type=model_type, - default=default, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - model_type: Union[Unset, str] = UNSET, - default: Union[Unset, bool] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - model_type (Union[Unset, str]): - default (Union[Unset, bool]): - - 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[ClientErrorResponseContent, ListModelsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - model_type=model_type, - default=default, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/create_organization.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/create_organization.py deleted file mode 100644 index 753dfcf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/create_organization.py +++ /dev/null @@ -1,192 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_organization_request_content import CreateOrganizationRequestContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateOrganizationRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/organizations", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent]]: - 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: CreateOrganizationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateOrganizationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateOrganizationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateOrganizationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization.py deleted file mode 100644 index 6571413..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/organizations/{organization_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization_user.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization_user.py deleted file mode 100644 index ea5a3bd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/delete_organization_user.py +++ /dev/null @@ -1,200 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, - user_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/organizations/{organization_id}/users/{user_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - user_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - user_id=user_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - user_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - user_id=user_id, - client=client, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - user_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - user_id=user_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - user_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - user_id=user_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/get_organization.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/get_organization.py deleted file mode 100644 index 6ff5174..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/get_organization.py +++ /dev/null @@ -1,183 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/organizations/{organization_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organization_users.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organization_users.py deleted file mode 100644 index 6daa179..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organization_users.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_organization_users_response_content import ListOrganizationUsersResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - organization_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/organizations/{organization_id}/users", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListOrganizationUsersResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListOrganizationUsersResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organizations.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organizations.py deleted file mode 100644 index 4216766..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/list_organizations.py +++ /dev/null @@ -1,159 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/organizations", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/update_organization.py b/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/update_organization.py deleted file mode 100644 index 6a55231..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/organizations/update_organization.py +++ /dev/null @@ -1,205 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_organization_request_content import UpdateOrganizationRequestContent -from ...types import Response - - -def _get_kwargs( - organization_id: str, - *, - body: UpdateOrganizationRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/organizations/{organization_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateOrganizationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (UpdateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateOrganizationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (UpdateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - organization_id=organization_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateOrganizationRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (UpdateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - organization_id=organization_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - organization_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateOrganizationRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - organization_id (str): - body (UpdateOrganizationRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - organization_id=organization_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/create_retriever_component.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/create_retriever_component.py deleted file mode 100644 index f7e1fe7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/create_retriever_component.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_retriever_component_request_content import CreateRetrieverComponentRequestContent -from ...models.create_retriever_component_response_content import CreateRetrieverComponentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateRetrieverComponentRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/retriever-components", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateRetrieverComponentResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - 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: CreateRetrieverComponentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRetrieverComponentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateRetrieverComponentRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRetrieverComponentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverComponentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/delete_retriever_component.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/delete_retriever_component.py deleted file mode 100644 index fde2fd2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/delete_retriever_component.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/retriever-components/{retriever_component_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - retriever_component_id=retriever_component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_component_id=retriever_component_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/get_retriever_component.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/get_retriever_component.py deleted file mode 100644 index b8257ad..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/get_retriever_component.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_retriever_component_response_content import GetRetrieverComponentResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_component_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/retriever-components/{retriever_component_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetRetrieverComponentResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - retriever_component_id=retriever_component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_component_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[ClientErrorResponseContent, GetRetrieverComponentResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_component_id=retriever_component_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/list_retriever_components.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/list_retriever_components.py deleted file mode 100644 index 182bcc5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/list_retriever_components.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_retriever_components_response_content import ListRetrieverComponentsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/retriever-components", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListRetrieverComponentsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieverComponentsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/update_retriever_component.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/update_retriever_component.py deleted file mode 100644 index 00775ec..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retriever_components/update_retriever_component.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_retriever_component_request_content import UpdateRetrieverComponentRequestContent -from ...models.update_retriever_component_response_content import UpdateRetrieverComponentResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_component_id: str, - *, - body: UpdateRetrieverComponentRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/retriever-components/{retriever_component_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - if response.status_code == 200: - response_200 = UpdateRetrieverComponentResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverComponentRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - """ - Args: - retriever_component_id (str): - body (UpdateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverComponentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - """ - Args: - retriever_component_id (str): - body (UpdateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent] - """ - - return sync_detailed( - retriever_component_id=retriever_component_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverComponentRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - """ - Args: - retriever_component_id (str): - body (UpdateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_component_id=retriever_component_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_component_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverComponentRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent]]: - """ - Args: - retriever_component_id (str): - body (UpdateRetrieverComponentRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverComponentResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_component_id=retriever_component_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/create_retriever.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/create_retriever.py deleted file mode 100644 index f88c6ad..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/create_retriever.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_retriever_request_content import CreateRetrieverRequestContent -from ...models.create_retriever_response_content import CreateRetrieverResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateRetrieverRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/retrievers", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateRetrieverResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - 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: CreateRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRetrieverRequestContent): - - 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[ClientErrorResponseContent, CreateRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/delete_retriever.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/delete_retriever.py deleted file mode 100644 index df0d673..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/delete_retriever.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/retrievers/{retriever_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - retriever_id=retriever_id, - client=client, - ).parsed - - -async def asyncio_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_id=retriever_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/get_retriever.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/get_retriever.py deleted file mode 100644 index 28395f1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/get_retriever.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_retriever_response_content import GetRetrieverResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/retrievers/{retriever_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetRetrieverResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - retriever_id=retriever_id, - client=client, - ).parsed - - -async def asyncio_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_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[ClientErrorResponseContent, GetRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_id=retriever_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/list_retrievers.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/list_retrievers.py deleted file mode 100644 index de336ec..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/list_retrievers.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_retrievers_response_content import ListRetrieversResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/retrievers", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListRetrieversResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListRetrieversResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/query_retriever.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/query_retriever.py deleted file mode 100644 index 1417810..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/query_retriever.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.query_retriever_request_content import QueryRetrieverRequestContent -from ...models.query_retriever_response_content import QueryRetrieverResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_id: str, - *, - body: QueryRetrieverRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/retrievers/{retriever_id}/query", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = QueryRetrieverResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_id (str): - body (QueryRetrieverRequestContent): - - 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[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_id (str): - body (QueryRetrieverRequestContent): - - 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[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - retriever_id=retriever_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_id (str): - body (QueryRetrieverRequestContent): - - 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[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: QueryRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent]]: - """ - Args: - retriever_id (str): - body (QueryRetrieverRequestContent): - - 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[ClientErrorResponseContent, QueryRetrieverResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_id=retriever_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/update_retriever.py b/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/update_retriever.py deleted file mode 100644 index 62a93ca..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/retrievers/update_retriever.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_retriever_request_content import UpdateRetrieverRequestContent -from ...models.update_retriever_response_content import UpdateRetrieverResponseContent -from ...types import Response - - -def _get_kwargs( - retriever_id: str, - *, - body: UpdateRetrieverRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/retrievers/{retriever_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - if response.status_code == 200: - response_200 = UpdateRetrieverResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - """ - Args: - retriever_id (str): - body (UpdateRetrieverRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - """ - Args: - retriever_id (str): - body (UpdateRetrieverRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent] - """ - - return sync_detailed( - retriever_id=retriever_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - """ - Args: - retriever_id (str): - body (UpdateRetrieverRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]] - """ - - kwargs = _get_kwargs( - retriever_id=retriever_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - retriever_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRetrieverRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent]]: - """ - Args: - retriever_id (str): - body (UpdateRetrieverRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRetrieverResponseContent] - """ - - return ( - await asyncio_detailed( - retriever_id=retriever_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/create_rule.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/create_rule.py deleted file mode 100644 index e510c58..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/create_rule.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_rule_request_content import CreateRuleRequestContent -from ...models.create_rule_response_content import CreateRuleResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateRuleRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/rules", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateRuleResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - 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: CreateRuleRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRuleRequestContent): - - 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[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRuleRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRuleRequestContent): - - 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[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateRuleRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRuleRequestContent): - - 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[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRuleRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRuleRequestContent): - - 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[ClientErrorResponseContent, CreateRuleResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/delete_rule.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/delete_rule.py deleted file mode 100644 index 5d24235..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/delete_rule.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - rule_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/rules/{rule_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - rule_id=rule_id, - client=client, - ).parsed - - -async def asyncio_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - rule_id=rule_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/get_rule.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/get_rule.py deleted file mode 100644 index 6431d63..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/get_rule.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_rule_response_content import GetRuleResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - rule_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/rules/{rule_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetRuleResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - rule_id=rule_id, - client=client, - ).parsed - - -async def asyncio_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent]]: - """ - Args: - rule_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[ClientErrorResponseContent, GetRuleResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - rule_id=rule_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/list_rules.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/list_rules.py deleted file mode 100644 index e831ebd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/list_rules.py +++ /dev/null @@ -1,227 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_rules_response_content import ListRulesResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - ruleset_id: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["ruleset_id"] = ruleset_id - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/rules", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListRulesResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - ruleset_id: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - ruleset_id (Union[Unset, 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[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ruleset_id=ruleset_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - ruleset_id: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - ruleset_id (Union[Unset, 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[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ruleset_id=ruleset_id, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - ruleset_id: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - ruleset_id (Union[Unset, 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[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ruleset_id=ruleset_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - ruleset_id: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - ruleset_id (Union[Unset, 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[ClientErrorResponseContent, ListRulesResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ruleset_id=ruleset_id, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/update_rule.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rules/update_rule.py deleted file mode 100644 index 54bd9b7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rules/update_rule.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_rule_request_content import UpdateRuleRequestContent -from ...models.update_rule_response_content import UpdateRuleResponseContent -from ...types import Response - - -def _get_kwargs( - rule_id: str, - *, - body: UpdateRuleRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/rules/{rule_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - if response.status_code == 200: - response_200 = UpdateRuleResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRuleRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - """ - Args: - rule_id (str): - body (UpdateRuleRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRuleRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - """ - Args: - rule_id (str): - body (UpdateRuleRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent] - """ - - return sync_detailed( - rule_id=rule_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRuleRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - """ - Args: - rule_id (str): - body (UpdateRuleRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]] - """ - - kwargs = _get_kwargs( - rule_id=rule_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - rule_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRuleRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent]]: - """ - Args: - rule_id (str): - body (UpdateRuleRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRuleResponseContent] - """ - - return ( - await asyncio_detailed( - rule_id=rule_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/create_ruleset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/create_ruleset.py deleted file mode 100644 index a1d472e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/create_ruleset.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_ruleset_request_content import CreateRulesetRequestContent -from ...models.create_ruleset_response_content import CreateRulesetResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateRulesetRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/rulesets", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateRulesetResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - 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: CreateRulesetRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRulesetRequestContent): - - 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[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRulesetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRulesetRequestContent): - - 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[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateRulesetRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRulesetRequestContent): - - 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[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateRulesetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateRulesetRequestContent): - - 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[ClientErrorResponseContent, CreateRulesetResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/delete_ruleset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/delete_ruleset.py deleted file mode 100644 index e473d49..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/delete_ruleset.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - ruleset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/rulesets/{ruleset_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - ruleset_id=ruleset_id, - client=client, - ).parsed - - -async def asyncio_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - ruleset_id=ruleset_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/get_ruleset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/get_ruleset.py deleted file mode 100644 index 1db1dab..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/get_ruleset.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_ruleset_response_content import GetRulesetResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - ruleset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/rulesets/{ruleset_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetRulesetResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - ruleset_id=ruleset_id, - client=client, - ).parsed - - -async def asyncio_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent]]: - """ - Args: - ruleset_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[ClientErrorResponseContent, GetRulesetResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - ruleset_id=ruleset_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/list_rulesets.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/list_rulesets.py deleted file mode 100644 index dd7aa65..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/list_rulesets.py +++ /dev/null @@ -1,227 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_rulesets_response_content import ListRulesetsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["alias"] = alias - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/rulesets", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListRulesetsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, 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[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - alias=alias, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, 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[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - alias=alias, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, 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[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - alias=alias, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, 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[ClientErrorResponseContent, ListRulesetsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - alias=alias, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/update_ruleset.py b/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/update_ruleset.py deleted file mode 100644 index e3a5048..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/rulesets/update_ruleset.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_ruleset_request_content import UpdateRulesetRequestContent -from ...models.update_ruleset_response_content import UpdateRulesetResponseContent -from ...types import Response - - -def _get_kwargs( - ruleset_id: str, - *, - body: UpdateRulesetRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/rulesets/{ruleset_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - if response.status_code == 200: - response_200 = UpdateRulesetResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRulesetRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - """ - Args: - ruleset_id (str): - body (UpdateRulesetRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRulesetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - """ - Args: - ruleset_id (str): - body (UpdateRulesetRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent] - """ - - return sync_detailed( - ruleset_id=ruleset_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRulesetRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - """ - Args: - ruleset_id (str): - body (UpdateRulesetRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]] - """ - - kwargs = _get_kwargs( - ruleset_id=ruleset_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - ruleset_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateRulesetRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent]]: - """ - Args: - ruleset_id (str): - body (UpdateRulesetRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateRulesetResponseContent] - """ - - return ( - await asyncio_detailed( - ruleset_id=ruleset_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/create_secret.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/create_secret.py deleted file mode 100644 index d3f1a24..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/create_secret.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_secret_request_content import CreateSecretRequestContent -from ...models.create_secret_response_content import CreateSecretResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateSecretRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/secrets", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateSecretResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - 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: CreateSecretRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateSecretRequestContent): - - 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[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateSecretRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateSecretRequestContent): - - 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[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateSecretRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateSecretRequestContent): - - 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[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateSecretRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateSecretRequestContent): - - 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[ClientErrorResponseContent, CreateSecretResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/delete_secret.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/delete_secret.py deleted file mode 100644 index 3bb2625..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/delete_secret.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - secret_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/secrets/{secret_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - secret_id=secret_id, - client=client, - ).parsed - - -async def asyncio_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - secret_id=secret_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/get_secret.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/get_secret.py deleted file mode 100644 index ffcd6cf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/get_secret.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_secret_response_content import GetSecretResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - secret_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/secrets/{secret_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetSecretResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - secret_id=secret_id, - client=client, - ).parsed - - -async def asyncio_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent]]: - """ - Args: - secret_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[ClientErrorResponseContent, GetSecretResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - secret_id=secret_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/list_secrets.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/list_secrets.py deleted file mode 100644 index 5a66f43..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/list_secrets.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_secrets_response_content import ListSecretsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/secrets", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListSecretsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSecretsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/update_secret.py b/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/update_secret.py deleted file mode 100644 index 61c70df..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/secrets/update_secret.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_secret_request_content import UpdateSecretRequestContent -from ...models.update_secret_response_content import UpdateSecretResponseContent -from ...types import Response - - -def _get_kwargs( - secret_id: str, - *, - body: UpdateSecretRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/secrets/{secret_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - if response.status_code == 200: - response_200 = UpdateSecretResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateSecretRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - """ - Args: - secret_id (str): - body (UpdateSecretRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateSecretRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - """ - Args: - secret_id (str): - body (UpdateSecretRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent] - """ - - return sync_detailed( - secret_id=secret_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateSecretRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - """ - Args: - secret_id (str): - body (UpdateSecretRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]] - """ - - kwargs = _get_kwargs( - secret_id=secret_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - secret_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateSecretRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent]]: - """ - Args: - secret_id (str): - body (UpdateSecretRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateSecretResponseContent] - """ - - return ( - await asyncio_detailed( - secret_id=secret_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/spans/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/spans/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/spans/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/spans/list_spans.py b/griptape_cloud_client/generated/griptape_cloud_client/api/spans/list_spans.py deleted file mode 100644 index b1f861c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/spans/list_spans.py +++ /dev/null @@ -1,225 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_spans_response_content import ListSpansResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_run_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structure-runs/{structure_run_id}/spans", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListSpansResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListSpansResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/cancel_structure_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/cancel_structure_run.py deleted file mode 100644 index c83a6a2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/cancel_structure_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.cancel_structure_run_response_content import CancelStructureRunResponseContent -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/structure-runs/{structure_run_id}/cancel", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = CancelStructureRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[CancelStructureRunResponseContent, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/create_structure_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/create_structure_run.py deleted file mode 100644 index 6821d58..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/create_structure_run.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_structure_run_request_content import CreateStructureRunRequestContent -from ...models.create_structure_run_response_content import CreateStructureRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_id: str, - *, - body: CreateStructureRunRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/structures/{structure_id}/runs", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateStructureRunResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureRunRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureRunRequestContent): - - 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[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureRunRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureRunRequestContent): - - 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[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureRunRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureRunRequestContent): - - 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[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureRunRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - body (CreateStructureRunRequestContent): - - 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[ClientErrorResponseContent, CreateStructureRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/get_structure_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/get_structure_run.py deleted file mode 100644 index 501124e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/get_structure_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_structure_run_response_content import GetStructureRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structure-runs/{structure_run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetStructureRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, GetStructureRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_run_logs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_run_logs.py deleted file mode 100644 index ae5f17b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_run_logs.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_structure_run_logs_response_content import ListStructureRunLogsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structure-runs/{structure_run_id}/logs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListStructureRunLogsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_run_id=structure_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_run_id=structure_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_run_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[ClientErrorResponseContent, ListStructureRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_run_id=structure_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_runs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_runs.py deleted file mode 100644 index 564340c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structure_runs/list_structure_runs.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_structure_runs_response_content import ListStructureRunsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.structure_run_status import StructureRunStatus -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[StructureRunStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structures/{structure_id}/runs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListStructureRunsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[StructureRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[StructureRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[StructureRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[StructureRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[StructureRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[StructureRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[StructureRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[StructureRunStatus]]): Comma-separated list of run statuses to - filter by. - - 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[ClientErrorResponseContent, ListStructureRunsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/create_structure.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/create_structure.py deleted file mode 100644 index df3a36c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/create_structure.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_structure_request_content import CreateStructureRequestContent -from ...models.create_structure_response_content import CreateStructureResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateStructureRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/structures", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateStructureResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - 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: CreateStructureRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateStructureRequestContent): - - 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[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateStructureRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateStructureRequestContent): - - 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[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateStructureRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateStructureRequestContent): - - 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[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateStructureRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateStructureRequestContent): - - 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[ClientErrorResponseContent, CreateStructureResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/delete_structure.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/delete_structure.py deleted file mode 100644 index a67bd8c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/delete_structure.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/structures/{structure_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structure.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structure.py deleted file mode 100644 index dd10b86..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structure.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_structure_response_content import GetStructureResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - structure_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structures/{structure_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetStructureResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent]]: - """ - Args: - structure_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[ClientErrorResponseContent, GetStructureResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structures_dashboard.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structures_dashboard.py deleted file mode 100644 index b735946..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/get_structures_dashboard.py +++ /dev/null @@ -1,254 +0,0 @@ -import datetime -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_structures_dashboard_response_content import GetStructuresDashboardResponseContent -from ...models.period import Period -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - start_time: Union[Unset, datetime.datetime] = UNSET, - end_time: Union[Unset, datetime.datetime] = UNSET, - period: Union[Unset, Period] = UNSET, - structure_ids: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_start_time: Union[Unset, str] = UNSET - if not isinstance(start_time, Unset): - json_start_time = start_time.isoformat() - params["start_time"] = json_start_time - - json_end_time: Union[Unset, str] = UNSET - if not isinstance(end_time, Unset): - json_end_time = end_time.isoformat() - params["end_time"] = json_end_time - - json_period: Union[Unset, str] = UNSET - if not isinstance(period, Unset): - json_period = period.value - - params["period"] = json_period - - params["structure_ids"] = structure_ids - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/dashboards/structures", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetStructuresDashboardResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - 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], - start_time: Union[Unset, datetime.datetime] = UNSET, - end_time: Union[Unset, datetime.datetime] = UNSET, - period: Union[Unset, Period] = UNSET, - structure_ids: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - """ - Args: - start_time (Union[Unset, datetime.datetime]): - end_time (Union[Unset, datetime.datetime]): - period (Union[Unset, Period]): - structure_ids (Union[Unset, 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[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - start_time=start_time, - end_time=end_time, - period=period, - structure_ids=structure_ids, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - start_time: Union[Unset, datetime.datetime] = UNSET, - end_time: Union[Unset, datetime.datetime] = UNSET, - period: Union[Unset, Period] = UNSET, - structure_ids: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - """ - Args: - start_time (Union[Unset, datetime.datetime]): - end_time (Union[Unset, datetime.datetime]): - period (Union[Unset, Period]): - structure_ids (Union[Unset, 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[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - start_time=start_time, - end_time=end_time, - period=period, - structure_ids=structure_ids, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - start_time: Union[Unset, datetime.datetime] = UNSET, - end_time: Union[Unset, datetime.datetime] = UNSET, - period: Union[Unset, Period] = UNSET, - structure_ids: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - """ - Args: - start_time (Union[Unset, datetime.datetime]): - end_time (Union[Unset, datetime.datetime]): - period (Union[Unset, Period]): - structure_ids (Union[Unset, 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[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - start_time=start_time, - end_time=end_time, - period=period, - structure_ids=structure_ids, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - start_time: Union[Unset, datetime.datetime] = UNSET, - end_time: Union[Unset, datetime.datetime] = UNSET, - period: Union[Unset, Period] = UNSET, - structure_ids: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent]]: - """ - Args: - start_time (Union[Unset, datetime.datetime]): - end_time (Union[Unset, datetime.datetime]): - period (Union[Unset, Period]): - structure_ids (Union[Unset, 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[ClientErrorResponseContent, GetStructuresDashboardResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - start_time=start_time, - end_time=end_time, - period=period, - structure_ids=structure_ids, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_get.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_get.py deleted file mode 100644 index 014deaa..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_get.py +++ /dev/null @@ -1,214 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.invoke_structure_webhook_get_response_content import InvokeStructureWebhookGetResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_id: str, - *, - api_key: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["api_key"] = api_key - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/structures/{structure_id}/webhook", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = InvokeStructureWebhookGetResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - """Invoke a webhook for a structure. Must have the `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - api_key=api_key, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - """Invoke a webhook for a structure. Must have the `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - api_key=api_key, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - """Invoke a webhook for a structure. Must have the `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - api_key=api_key, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent]]: - """Invoke a webhook for a structure. Must have the `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookGetResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - api_key=api_key, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_post.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_post.py deleted file mode 100644 index 3696af9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/invoke_structure_webhook_post.py +++ /dev/null @@ -1,230 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.invoke_structure_webhook_post_response_content import InvokeStructureWebhookPostResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - structure_id: str, - *, - api_key: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["api_key"] = api_key - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/structures/{structure_id}/webhook", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ - Union[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - if response.status_code == 200: - response_200 = InvokeStructureWebhookPostResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Response[ - Union[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - """Invoke a webhook for a structure, sending the POST body as the first Structure arg. Must have the - `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - api_key=api_key, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Optional[ - Union[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - """Invoke a webhook for a structure, sending the POST body as the first Structure arg. Must have the - `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - api_key=api_key, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Response[ - Union[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - """Invoke a webhook for a structure, sending the POST body as the first Structure arg. Must have the - `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - api_key=api_key, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - api_key: Union[Unset, str] = UNSET, -) -> Optional[ - Union[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] -]: - """Invoke a webhook for a structure, sending the POST body as the first Structure arg. Must have the - `webhook_enabled` flag set to `true`. - - Args: - structure_id (str): - api_key (Union[Unset, 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[ClientErrorResponseContent, InvokeStructureWebhookPostResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - api_key=api_key, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/list_structures.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/list_structures.py deleted file mode 100644 index 65c9339..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/list_structures.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_structures_response_content import ListStructuresResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/structures", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListStructuresResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListStructuresResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/update_structure.py b/griptape_cloud_client/generated/griptape_cloud_client/api/structures/update_structure.py deleted file mode 100644 index a2e29c0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/structures/update_structure.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_structure_request_content import UpdateStructureRequestContent -from ...models.update_structure_response_content import UpdateStructureResponseContent -from ...types import Response - - -def _get_kwargs( - structure_id: str, - *, - body: UpdateStructureRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/structures/{structure_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - if response.status_code == 200: - response_200 = UpdateStructureResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateStructureRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - """ - Args: - structure_id (str): - body (UpdateStructureRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateStructureRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - """ - Args: - structure_id (str): - body (UpdateStructureRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent] - """ - - return sync_detailed( - structure_id=structure_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateStructureRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - """ - Args: - structure_id (str): - body (UpdateStructureRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]] - """ - - kwargs = _get_kwargs( - structure_id=structure_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - structure_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateStructureRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent]]: - """ - Args: - structure_id (str): - body (UpdateStructureRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateStructureResponseContent] - """ - - return ( - await asyncio_detailed( - structure_id=structure_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/create_thread.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/create_thread.py deleted file mode 100644 index 6dccdf5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/create_thread.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_thread_request_content import CreateThreadRequestContent -from ...models.create_thread_response_content import CreateThreadResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateThreadRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/threads", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateThreadResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - 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: CreateThreadRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateThreadRequestContent): - - 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[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateThreadRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateThreadRequestContent): - - 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[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateThreadRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateThreadRequestContent): - - 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[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateThreadRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateThreadRequestContent): - - 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[ClientErrorResponseContent, CreateThreadResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/delete_thread.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/delete_thread.py deleted file mode 100644 index 645cb84..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/delete_thread.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - thread_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/threads/{thread_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - thread_id=thread_id, - client=client, - ).parsed - - -async def asyncio_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - thread_id=thread_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/get_thread.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/get_thread.py deleted file mode 100644 index 97c7b9f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/get_thread.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_thread_response_content import GetThreadResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - thread_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/threads/{thread_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetThreadResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - thread_id=thread_id, - client=client, - ).parsed - - -async def asyncio_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent]]: - """ - Args: - thread_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[ClientErrorResponseContent, GetThreadResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - thread_id=thread_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/list_threads.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/list_threads.py deleted file mode 100644 index 0269336..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/list_threads.py +++ /dev/null @@ -1,257 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_threads_response_content import ListThreadsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, - starts_with: Union[Unset, str] = UNSET, - created_by: Union[Unset, str] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params["alias"] = alias - - params["starts_with"] = starts_with - - params["created_by"] = created_by - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/threads", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListThreadsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, - starts_with: Union[Unset, str] = UNSET, - created_by: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, str]): - starts_with (Union[Unset, str]): - created_by (Union[Unset, 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[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - alias=alias, - starts_with=starts_with, - created_by=created_by, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, - starts_with: Union[Unset, str] = UNSET, - created_by: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, str]): - starts_with (Union[Unset, str]): - created_by (Union[Unset, 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[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - alias=alias, - starts_with=starts_with, - created_by=created_by, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, - starts_with: Union[Unset, str] = UNSET, - created_by: Union[Unset, str] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, str]): - starts_with (Union[Unset, str]): - created_by (Union[Unset, 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[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - alias=alias, - starts_with=starts_with, - created_by=created_by, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - alias: Union[Unset, str] = UNSET, - starts_with: Union[Unset, str] = UNSET, - created_by: Union[Unset, str] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - alias (Union[Unset, str]): - starts_with (Union[Unset, str]): - created_by (Union[Unset, 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[ClientErrorResponseContent, ListThreadsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - alias=alias, - starts_with=starts_with, - created_by=created_by, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/update_thread.py b/griptape_cloud_client/generated/griptape_cloud_client/api/threads/update_thread.py deleted file mode 100644 index 273bd51..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/threads/update_thread.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_thread_request_content import UpdateThreadRequestContent -from ...models.update_thread_response_content import UpdateThreadResponseContent -from ...types import Response - - -def _get_kwargs( - thread_id: str, - *, - body: UpdateThreadRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/threads/{thread_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - if response.status_code == 200: - response_200 = UpdateThreadResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateThreadRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - """ - Args: - thread_id (str): - body (UpdateThreadRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateThreadRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - """ - Args: - thread_id (str): - body (UpdateThreadRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent] - """ - - return sync_detailed( - thread_id=thread_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateThreadRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - """ - Args: - thread_id (str): - body (UpdateThreadRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]] - """ - - kwargs = _get_kwargs( - thread_id=thread_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - thread_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateThreadRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent]]: - """ - Args: - thread_id (str): - body (UpdateThreadRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateThreadResponseContent] - """ - - return ( - await asyncio_detailed( - thread_id=thread_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/create_tool_activity_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/create_tool_activity_run.py deleted file mode 100644 index 29fb8cd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/create_tool_activity_run.py +++ /dev/null @@ -1,221 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, - activity_path: str, - *, - body: Any, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/tools/{tool_id}/activities/{activity_path}", - } - - _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, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - activity_path: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - activity_path (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - activity_path=activity_path, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - activity_path: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - activity_path (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - activity_path=activity_path, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - activity_path: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - activity_path (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - activity_path=activity_path, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - activity_path: str, - *, - client: Union[AuthenticatedClient, Client], - body: Any, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - activity_path (str): - body (Any): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - activity_path=activity_path, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/get_tool_open_api_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/get_tool_open_api_run.py deleted file mode 100644 index 29876d4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_invoke/get_tool_open_api_run.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tools/{tool_id}/openapi", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/get_tool_run.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/get_tool_run.py deleted file mode 100644 index a52c185..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/get_tool_run.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_tool_run_response_content import GetToolRunResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tool-runs/{tool_run_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetToolRunResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_run_id=tool_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_run_id=tool_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_run_id=tool_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, GetToolRunResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_run_id=tool_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_run_logs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_run_logs.py deleted file mode 100644 index 15df759..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_run_logs.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_tool_run_logs_response_content import ListToolRunLogsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_run_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tool-runs/{tool_run_id}/logs", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListToolRunLogsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_run_id=tool_run_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_run_id=tool_run_id, - client=client, - ).parsed - - -async def asyncio_detailed( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_run_id=tool_run_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_run_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_run_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[ClientErrorResponseContent, ListToolRunLogsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_run_id=tool_run_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_runs.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_runs.py deleted file mode 100644 index 0e74bee..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tool_runs/list_tool_runs.py +++ /dev/null @@ -1,252 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_tool_runs_response_content import ListToolRunsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.tool_run_status import ToolRunStatus -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - tool_id: str, - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[ToolRunStatus]] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - json_status: Union[Unset, list[str]] = UNSET - if not isinstance(status, Unset): - json_status = [] - for status_item_data in status: - status_item = status_item_data.value - json_status.append(status_item) - - params["status"] = json_status - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tools/{tool_id}/runs", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListToolRunsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[ToolRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[ToolRunStatus]]): Comma-separated list of run statuses to filter - by. - - 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[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - page=page, - page_size=page_size, - status=status, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[ToolRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[ToolRunStatus]]): Comma-separated list of run statuses to filter - by. - - 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[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - page=page, - page_size=page_size, - status=status, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[ToolRunStatus]] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[ToolRunStatus]]): Comma-separated list of run statuses to filter - by. - - 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[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - page=page, - page_size=page_size, - status=status, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, - status: Union[Unset, list[ToolRunStatus]] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_id (str): - page (Union[Unset, float]): - page_size (Union[Unset, float]): - status (Union[Unset, list[ToolRunStatus]]): Comma-separated list of run statuses to filter - by. - - 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[ClientErrorResponseContent, ListToolRunsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - page=page, - page_size=page_size, - status=status, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/create_tool.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/create_tool.py deleted file mode 100644 index 52f7bdd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/create_tool.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_tool_request_content import CreateToolRequestContent -from ...models.create_tool_response_content import CreateToolResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateToolRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/tools", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = CreateToolResponseContent.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - 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: CreateToolRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateToolRequestContent): - - 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[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateToolRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateToolRequestContent): - - 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[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateToolRequestContent, -) -> Response[Union[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateToolRequestContent): - - 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[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateToolRequestContent, -) -> Optional[Union[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateToolRequestContent): - - 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[ClientErrorResponseContent, CreateToolResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/delete_tool.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/delete_tool.py deleted file mode 100644 index de0ba02..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/delete_tool.py +++ /dev/null @@ -1,187 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": f"/tools/{tool_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/get_tool.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/get_tool.py deleted file mode 100644 index ea969d3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/get_tool.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_tool_response_content import GetToolResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/tools/{tool_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetToolResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent]]: - """ - Args: - tool_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[ClientErrorResponseContent, GetToolResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/list_tools.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/list_tools.py deleted file mode 100644 index e2acd62..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/list_tools.py +++ /dev/null @@ -1,212 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.list_tools_response_content import ListToolsResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - params["page"] = page - - params["page_size"] = page_size - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/tools", - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = ListToolsResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - 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], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - page=page, - page_size=page_size, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Response[Union[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - page=page, - page_size=page_size, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], - page: Union[Unset, float] = UNSET, - page_size: Union[Unset, float] = UNSET, -) -> Optional[Union[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent]]: - """ - Args: - page (Union[Unset, float]): - page_size (Union[Unset, float]): - - 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[ClientErrorResponseContent, ListToolsResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - page=page, - page_size=page_size, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/update_tool.py b/griptape_cloud_client/generated/griptape_cloud_client/api/tools/update_tool.py deleted file mode 100644 index 31c05e9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/tools/update_tool.py +++ /dev/null @@ -1,211 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...models.update_tool_request_content import UpdateToolRequestContent -from ...models.update_tool_response_content import UpdateToolResponseContent -from ...types import Response - - -def _get_kwargs( - tool_id: str, - *, - body: UpdateToolRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "patch", - "url": f"/tools/{tool_id}", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - if response.status_code == 200: - response_200 = UpdateToolResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateToolRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - """ - Args: - tool_id (str): - body (UpdateToolRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateToolRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - """ - Args: - tool_id (str): - body (UpdateToolRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent] - """ - - return sync_detailed( - tool_id=tool_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateToolRequestContent, -) -> Response[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - """ - Args: - tool_id (str): - body (UpdateToolRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]] - """ - - kwargs = _get_kwargs( - tool_id=tool_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - tool_id: str, - *, - client: Union[AuthenticatedClient, Client], - body: UpdateToolRequestContent, -) -> Optional[Union[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent]]: - """ - Args: - tool_id (str): - body (UpdateToolRequestContent): - - 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[ClientErrorResponseContent, ServiceErrorResponseContent, UpdateToolResponseContent] - """ - - return ( - await asyncio_detailed( - tool_id=tool_id, - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/usage/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/create_nodes_usage.py b/griptape_cloud_client/generated/griptape_cloud_client/api/usage/create_nodes_usage.py deleted file mode 100644 index 2758d76..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/create_nodes_usage.py +++ /dev/null @@ -1,196 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.create_nodes_usage_request_content import CreateNodesUsageRequestContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - *, - body: CreateNodesUsageRequestContent, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/usage/report/nodes", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 201: - response_201 = cast(Any, None) - return response_201 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - 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: CreateNodesUsageRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateNodesUsageRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateNodesUsageRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateNodesUsageRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], - body: CreateNodesUsageRequestContent, -) -> Response[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateNodesUsageRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent]] - """ - - 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: CreateNodesUsageRequestContent, -) -> Optional[Union[Any, ClientErrorResponseContent, ServiceErrorResponseContent]]: - """ - Args: - body (CreateNodesUsageRequestContent): - - 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, ClientErrorResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/get_usage.py b/griptape_cloud_client/generated/griptape_cloud_client/api/usage/get_usage.py deleted file mode 100644 index 071c3f2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/usage/get_usage.py +++ /dev/null @@ -1,165 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_usage_response_content import GetUsageResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/usage", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetUsageResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - 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], -) -> Response[Union[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent]]: - """ - 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[ClientErrorResponseContent, GetUsageResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/users/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/api/users/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/users/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/griptape_cloud_client/generated/griptape_cloud_client/api/users/get_user.py b/griptape_cloud_client/generated/griptape_cloud_client/api/users/get_user.py deleted file mode 100644 index 77aecf3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/api/users/get_user.py +++ /dev/null @@ -1,189 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.client_error_response_content import ClientErrorResponseContent -from ...models.get_user_response_content import GetUserResponseContent -from ...models.service_error_response_content import ServiceErrorResponseContent -from ...types import Response - - -def _get_kwargs( - user_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/users/{user_id}", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - if response.status_code == 200: - response_200 = GetUserResponseContent.from_dict(response.json()) - - return response_200 - - if response.status_code == 400: - response_400 = ClientErrorResponseContent.from_dict(response.json()) - - return response_400 - - if response.status_code == 401: - response_401 = ClientErrorResponseContent.from_dict(response.json()) - - return response_401 - - if response.status_code == 403: - response_403 = ClientErrorResponseContent.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ClientErrorResponseContent.from_dict(response.json()) - - return response_404 - - if response.status_code == 406: - response_406 = ClientErrorResponseContent.from_dict(response.json()) - - return response_406 - - if response.status_code == 409: - response_409 = ClientErrorResponseContent.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = ClientErrorResponseContent.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ServiceErrorResponseContent.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[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_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[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_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[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent] - """ - - return sync_detailed( - user_id=user_id, - client=client, - ).parsed - - -async def asyncio_detailed( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_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[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]] - """ - - kwargs = _get_kwargs( - user_id=user_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - user_id: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent]]: - """ - Args: - user_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[ClientErrorResponseContent, GetUserResponseContent, ServiceErrorResponseContent] - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - ) - ).parsed diff --git a/griptape_cloud_client/generated/griptape_cloud_client/client.py b/griptape_cloud_client/generated/griptape_cloud_client/client.py deleted file mode 100644 index e80446f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/client.py +++ /dev/null @@ -1,268 +0,0 @@ -import ssl -from typing import Any, 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/griptape_cloud_client/generated/griptape_cloud_client/errors.py b/griptape_cloud_client/generated/griptape_cloud_client/errors.py deleted file mode 100644 index 5f92e76..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_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/griptape_cloud_client/generated/griptape_cloud_client/models/__init__.py b/griptape_cloud_client/generated/griptape_cloud_client/models/__init__.py deleted file mode 100644 index ed1f42b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/__init__.py +++ /dev/null @@ -1,745 +0,0 @@ -"""Contains all the data models used in inputs/outputs""" - -from .activity_duration import ActivityDuration -from .api_key_detail import ApiKeyDetail -from .artifact import Artifact -from .assert_url_operation import AssertUrlOperation -from .asset_detail import AssetDetail -from .assistant_detail import AssistantDetail -from .assistant_event_detail import AssistantEventDetail -from .assistant_run_detail import AssistantRunDetail -from .assistant_run_status import AssistantRunStatus -from .bucket_detail import BucketDetail -from .cancel_assistant_run_response_content import CancelAssistantRunResponseContent -from .cancel_data_job_response_content import CancelDataJobResponseContent -from .cancel_knowledge_base_job_response_content import CancelKnowledgeBaseJobResponseContent -from .cancel_structure_run_response_content import CancelStructureRunResponseContent -from .chat_message_driver_configuration import ChatMessageDriverConfiguration -from .chat_message_message import ChatMessageMessage -from .chat_message_tool import ChatMessageTool -from .chat_message_tool_activity import ChatMessageToolActivity -from .chat_message_usage import ChatMessageUsage -from .client_error_response_content import ClientErrorResponseContent -from .code_source_input_type_0 import CodeSourceInputType0 -from .code_source_type_0 import CodeSourceType0 -from .code_source_type_1 import CodeSourceType1 -from .confluence_detail import ConfluenceDetail -from .confluence_input import ConfluenceInput -from .connection_credentials_input_type_0 import ConnectionCredentialsInputType0 -from .connection_detail import ConnectionDetail -from .create_api_key_request_content import CreateApiKeyRequestContent -from .create_api_key_response_content import CreateApiKeyResponseContent -from .create_asset_request_content import CreateAssetRequestContent -from .create_asset_response_content import CreateAssetResponseContent -from .create_asset_url_request_content import CreateAssetUrlRequestContent -from .create_asset_url_response_content import CreateAssetUrlResponseContent -from .create_assistant_request_content import CreateAssistantRequestContent -from .create_assistant_response_content import CreateAssistantResponseContent -from .create_assistant_run_request_content import CreateAssistantRunRequestContent -from .create_assistant_run_response_content import CreateAssistantRunResponseContent -from .create_billing_management_url_response_content import CreateBillingManagementUrlResponseContent -from .create_bucket_request_content import CreateBucketRequestContent -from .create_bucket_response_content import CreateBucketResponseContent -from .create_chat_message_request_content import CreateChatMessageRequestContent -from .create_chat_message_response_content import CreateChatMessageResponseContent -from .create_chat_message_stream_request_content import CreateChatMessageStreamRequestContent -from .create_chat_message_stream_response_content import CreateChatMessageStreamResponseContent -from .create_checkout_session_request_content import CreateCheckoutSessionRequestContent -from .create_checkout_session_response_content import CreateCheckoutSessionResponseContent -from .create_connection_request_content import CreateConnectionRequestContent -from .create_connection_response_content import CreateConnectionResponseContent -from .create_data_connector_request_content import CreateDataConnectorRequestContent -from .create_data_connector_response_content import CreateDataConnectorResponseContent -from .create_data_job_response_content import CreateDataJobResponseContent -from .create_events_request_content import CreateEventsRequestContent -from .create_function_deployment_request_content import CreateFunctionDeploymentRequestContent -from .create_function_deployment_response_content import CreateFunctionDeploymentResponseContent -from .create_function_request_content import CreateFunctionRequestContent -from .create_function_response_content import CreateFunctionResponseContent -from .create_integration_request_content import CreateIntegrationRequestContent -from .create_integration_response_content import CreateIntegrationResponseContent -from .create_invite_request_content import CreateInviteRequestContent -from .create_invite_response_content import CreateInviteResponseContent -from .create_knowledge_base_job_response_content import CreateKnowledgeBaseJobResponseContent -from .create_knowledge_base_request_content import CreateKnowledgeBaseRequestContent -from .create_knowledge_base_response_content import CreateKnowledgeBaseResponseContent -from .create_library_request_content import CreateLibraryRequestContent -from .create_library_response_content import CreateLibraryResponseContent -from .create_message_request_content import CreateMessageRequestContent -from .create_message_response_content import CreateMessageResponseContent -from .create_nodes_usage_request_content import CreateNodesUsageRequestContent -from .create_organization_api_key_request_content import CreateOrganizationApiKeyRequestContent -from .create_organization_api_key_response_content import CreateOrganizationApiKeyResponseContent -from .create_organization_request_content import CreateOrganizationRequestContent -from .create_retriever_component_request_content import CreateRetrieverComponentRequestContent -from .create_retriever_component_response_content import CreateRetrieverComponentResponseContent -from .create_retriever_request_content import CreateRetrieverRequestContent -from .create_retriever_response_content import CreateRetrieverResponseContent -from .create_rule_request_content import CreateRuleRequestContent -from .create_rule_response_content import CreateRuleResponseContent -from .create_ruleset_request_content import CreateRulesetRequestContent -from .create_ruleset_response_content import CreateRulesetResponseContent -from .create_secret_request_content import CreateSecretRequestContent -from .create_secret_response_content import CreateSecretResponseContent -from .create_structure_deployment_request_content import CreateStructureDeploymentRequestContent -from .create_structure_deployment_response_content import CreateStructureDeploymentResponseContent -from .create_structure_request_content import CreateStructureRequestContent -from .create_structure_response_content import CreateStructureResponseContent -from .create_structure_run_request_content import CreateStructureRunRequestContent -from .create_structure_run_response_content import CreateStructureRunResponseContent -from .create_thread_request_content import CreateThreadRequestContent -from .create_thread_response_content import CreateThreadResponseContent -from .create_tool_deployment_request_content import CreateToolDeploymentRequestContent -from .create_tool_deployment_response_content import CreateToolDeploymentResponseContent -from .create_tool_request_content import CreateToolRequestContent -from .create_tool_response_content import CreateToolResponseContent -from .credit_transaction_type import CreditTransactionType -from .data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 -from .data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 -from .data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 -from .data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 -from .data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 -from .data_connector_config_input_union_type_5 import DataConnectorConfigInputUnionType5 -from .data_connector_config_union_type_0 import DataConnectorConfigUnionType0 -from .data_connector_config_union_type_1 import DataConnectorConfigUnionType1 -from .data_connector_config_union_type_2 import DataConnectorConfigUnionType2 -from .data_connector_config_union_type_3 import DataConnectorConfigUnionType3 -from .data_connector_config_union_type_4 import DataConnectorConfigUnionType4 -from .data_connector_config_union_type_5 import DataConnectorConfigUnionType5 -from .data_connector_detail import DataConnectorDetail -from .data_job_detail import DataJobDetail -from .data_job_status import DataJobStatus -from .data_lake_code_source import DataLakeCodeSource -from .data_lake_connector_detail import DataLakeConnectorDetail -from .data_lake_connector_input import DataLakeConnectorInput -from .data_lake_function_code import DataLakeFunctionCode -from .data_lake_structure_code import DataLakeStructureCode -from .data_lake_tool_code import DataLakeToolCode -from .default_function_code import DefaultFunctionCode -from .default_structure_code import DefaultStructureCode -from .default_tool_code import DefaultToolCode -from .deployment_count_gauge import DeploymentCountGauge -from .deployment_duration_gauge import DeploymentDurationGauge -from .deployment_error_rate_gauge import DeploymentErrorRateGauge -from .deployment_status import DeploymentStatus -from .duration_plot import DurationPlot -from .duration_timeseries_element import DurationTimeseriesElement -from .embedding_model import EmbeddingModel -from .entitlement import Entitlement -from .entry import Entry -from .env_var import EnvVar -from .env_var_source import EnvVarSource -from .error import Error -from .error_rate_gauge import ErrorRateGauge -from .error_type_count import ErrorTypeCount -from .event_detail import EventDetail -from .event_input import EventInput -from .function_code_type_0 import FunctionCodeType0 -from .function_code_type_1 import FunctionCodeType1 -from .function_code_type_2 import FunctionCodeType2 -from .function_deployment_detail import FunctionDeploymentDetail -from .function_detail import FunctionDetail -from .function_run_detail import FunctionRunDetail -from .function_run_status import FunctionRunStatus -from .get_api_key_response_content import GetApiKeyResponseContent -from .get_asset_response_content import GetAssetResponseContent -from .get_assistant_response_content import GetAssistantResponseContent -from .get_assistant_run_response_content import GetAssistantRunResponseContent -from .get_bucket_response_content import GetBucketResponseContent -from .get_config_response_content import GetConfigResponseContent -from .get_credit_balance_response_content import GetCreditBalanceResponseContent -from .get_data_connector_response_content import GetDataConnectorResponseContent -from .get_data_job_response_content import GetDataJobResponseContent -from .get_deployment_response_content import GetDeploymentResponseContent -from .get_event_response_content import GetEventResponseContent -from .get_function_response_content import GetFunctionResponseContent -from .get_function_run_response_content import GetFunctionRunResponseContent -from .get_integration_response_content import GetIntegrationResponseContent -from .get_invite_response_content import GetInviteResponseContent -from .get_knowledge_base_job_response_content import GetKnowledgeBaseJobResponseContent -from .get_knowledge_base_query_response_content import GetKnowledgeBaseQueryResponseContent -from .get_knowledge_base_response_content import GetKnowledgeBaseResponseContent -from .get_knowledge_base_search_response_content import GetKnowledgeBaseSearchResponseContent -from .get_library_response_content import GetLibraryResponseContent -from .get_message_response_content import GetMessageResponseContent -from .get_retriever_component_response_content import GetRetrieverComponentResponseContent -from .get_retriever_response_content import GetRetrieverResponseContent -from .get_rule_response_content import GetRuleResponseContent -from .get_ruleset_response_content import GetRulesetResponseContent -from .get_secret_response_content import GetSecretResponseContent -from .get_structure_response_content import GetStructureResponseContent -from .get_structure_run_response_content import GetStructureRunResponseContent -from .get_structures_dashboard_response_content import GetStructuresDashboardResponseContent -from .get_thread_response_content import GetThreadResponseContent -from .get_token_response_content import GetTokenResponseContent -from .get_tool_response_content import GetToolResponseContent -from .get_tool_run_response_content import GetToolRunResponseContent -from .get_usage_response_content import GetUsageResponseContent -from .get_user_response_content import GetUserResponseContent -from .git_hub_app_detail import GitHubAppDetail -from .git_hub_app_input import GitHubAppInput -from .git_hub_credentials_input import GitHubCredentialsInput -from .github_code_source import GithubCodeSource -from .github_code_source_input import GithubCodeSourceInput -from .github_function_code import GithubFunctionCode -from .github_function_code_push_config import GithubFunctionCodePushConfig -from .github_structure_code import GithubStructureCode -from .github_structure_code_push_config import GithubStructureCodePushConfig -from .github_tool_code import GithubToolCode -from .github_tool_code_push_config import GithubToolCodePushConfig -from .google_drive_detail import GoogleDriveDetail -from .google_drive_input import GoogleDriveInput -from .gtc_hybid_sqlpg_vector_knowledge_base_detail import GTCHybidSQLPGVectorKnowledgeBaseDetail -from .gtc_hybid_sqlpg_vector_knowledge_base_input import GTCHybidSQLPGVectorKnowledgeBaseInput -from .gtcpg_vector_knowledge_base_detail import GTCPGVectorKnowledgeBaseDetail -from .gtcpg_vector_knowledge_base_input import GTCPGVectorKnowledgeBaseInput -from .integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 -from .integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 -from .integration_config_input_union_type_2 import IntegrationConfigInputUnionType2 -from .integration_config_union_type_0 import IntegrationConfigUnionType0 -from .integration_config_union_type_1 import IntegrationConfigUnionType1 -from .integration_config_union_type_2 import IntegrationConfigUnionType2 -from .integration_detail import IntegrationDetail -from .integration_type import IntegrationType -from .invite_detail import InviteDetail -from .invite_response_status import InviteResponseStatus -from .invite_status import InviteStatus -from .invoke_structure_webhook_get_response_content import InvokeStructureWebhookGetResponseContent -from .invoke_structure_webhook_post_response_content import InvokeStructureWebhookPostResponseContent -from .json_schema import JsonSchema -from .json_schema_properties import JsonSchemaProperties -from .json_schema_property import JsonSchemaProperty -from .knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 -from .knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 -from .knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 -from .knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 -from .knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 -from .knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 -from .knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 -from .knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 -from .knowledge_base_detail import KnowledgeBaseDetail -from .knowledge_base_job_detail import KnowledgeBaseJobDetail -from .knowledge_base_job_status import KnowledgeBaseJobStatus -from .knowledge_base_query_detail import KnowledgeBaseQueryDetail -from .knowledge_base_search_detail import KnowledgeBaseSearchDetail -from .library_detail import LibraryDetail -from .list_api_keys_response_content import ListApiKeysResponseContent -from .list_assets_response_content import ListAssetsResponseContent -from .list_assistant_events_response_content import ListAssistantEventsResponseContent -from .list_assistant_runs_response_content import ListAssistantRunsResponseContent -from .list_assistants_response_content import ListAssistantsResponseContent -from .list_buckets_response_content import ListBucketsResponseContent -from .list_connections_response_content import ListConnectionsResponseContent -from .list_data_connectors_response_content import ListDataConnectorsResponseContent -from .list_data_jobs_response_content import ListDataJobsResponseContent -from .list_events_response_content import ListEventsResponseContent -from .list_function_deployments_response_content import ListFunctionDeploymentsResponseContent -from .list_function_run_logs_response_content import ListFunctionRunLogsResponseContent -from .list_function_runs_response_content import ListFunctionRunsResponseContent -from .list_functions_response_content import ListFunctionsResponseContent -from .list_integrations_response_content import ListIntegrationsResponseContent -from .list_invites_response_content import ListInvitesResponseContent -from .list_knowledge_base_jobs_response_content import ListKnowledgeBaseJobsResponseContent -from .list_knowledge_base_queries_response_content import ListKnowledgeBaseQueriesResponseContent -from .list_knowledge_base_searches_response_content import ListKnowledgeBaseSearchesResponseContent -from .list_knowledge_bases_response_content import ListKnowledgeBasesResponseContent -from .list_libraries_response_content import ListLibrariesResponseContent -from .list_messages_response_content import ListMessagesResponseContent -from .list_models_response_content import ListModelsResponseContent -from .list_organization_api_keys_response_content import ListOrganizationApiKeysResponseContent -from .list_organization_users_response_content import ListOrganizationUsersResponseContent -from .list_retriever_components_response_content import ListRetrieverComponentsResponseContent -from .list_retrievers_response_content import ListRetrieversResponseContent -from .list_rules_response_content import ListRulesResponseContent -from .list_rulesets_response_content import ListRulesetsResponseContent -from .list_secrets_response_content import ListSecretsResponseContent -from .list_spans_response_content import ListSpansResponseContent -from .list_structure_deployments_response_content import ListStructureDeploymentsResponseContent -from .list_structure_run_logs_response_content import ListStructureRunLogsResponseContent -from .list_structure_runs_response_content import ListStructureRunsResponseContent -from .list_structures_response_content import ListStructuresResponseContent -from .list_threads_response_content import ListThreadsResponseContent -from .list_tool_deployments_response_content import ListToolDeploymentsResponseContent -from .list_tool_run_logs_response_content import ListToolRunLogsResponseContent -from .list_tool_runs_response_content import ListToolRunsResponseContent -from .list_tools_response_content import ListToolsResponseContent -from .list_user_invites_response_content import ListUserInvitesResponseContent -from .list_users_response_content import ListUsersResponseContent -from .message_content import MessageContent -from .message_detail import MessageDetail -from .message_input import MessageInput -from .meta import Meta -from .metadata import Metadata -from .model_detail import ModelDetail -from .model_token_counts import ModelTokenCounts -from .model_token_counts_map import ModelTokenCountsMap -from .model_type import ModelType -from .observability_event import ObservabilityEvent -from .organization_model_config import OrganizationModelConfig -from .organization_user_detail import OrganizationUserDetail -from .pagination import Pagination -from .period import Period -from .pg_vector_knowledge_base_detail import PGVectorKnowledgeBaseDetail -from .pg_vector_knowledge_base_input import PGVectorKnowledgeBaseInput -from .pgai_knowledge_base_knowledge_base_detail import PGAIKnowledgeBaseKnowledgeBaseDetail -from .pgai_knowledge_base_knowledge_base_input import PGAIKnowledgeBaseKnowledgeBaseInput -from .query_knowledge_base_request_content import QueryKnowledgeBaseRequestContent -from .query_knowledge_base_response_content import QueryKnowledgeBaseResponseContent -from .query_retriever_request_content import QueryRetrieverRequestContent -from .query_retriever_response_content import QueryRetrieverResponseContent -from .respond_to_invite_request_content import RespondToInviteRequestContent -from .retriever_component_detail import RetrieverComponentDetail -from .retriever_component_input import RetrieverComponentInput -from .retriever_detail import RetrieverDetail -from .rule_detail import RuleDetail -from .ruleset_detail import RulesetDetail -from .run_count_gauge import RunCountGauge -from .run_duration_gauge import RunDurationGauge -from .s3_connector_detail import S3ConnectorDetail -from .s3_connector_input import S3ConnectorInput -from .search_knowledge_base_request_content import SearchKnowledgeBaseRequestContent -from .search_knowledge_base_response_content import SearchKnowledgeBaseResponseContent -from .secret_detail import SecretDetail -from .service_error_response_content import ServiceErrorResponseContent -from .slack_detail import SlackDetail -from .slack_input import SlackInput -from .span_detail import SpanDetail -from .span_status import SpanStatus -from .stream_message_content import StreamMessageContent -from .structure_code_type_0 import StructureCodeType0 -from .structure_code_type_1 import StructureCodeType1 -from .structure_code_type_2 import StructureCodeType2 -from .structure_connector_detail import StructureConnectorDetail -from .structure_connector_input import StructureConnectorInput -from .structure_deployment_detail import StructureDeploymentDetail -from .structure_detail import StructureDetail -from .structure_run_detail import StructureRunDetail -from .structure_run_status import StructureRunStatus -from .structured_column_detail import StructuredColumnDetail -from .structured_column_input import StructuredColumnInput -from .thread_detail import ThreadDetail -from .token_count_gauge import TokenCountGauge -from .tool_code_type_0 import ToolCodeType0 -from .tool_code_type_1 import ToolCodeType1 -from .tool_code_type_2 import ToolCodeType2 -from .tool_deployment_detail import ToolDeploymentDetail -from .tool_detail import ToolDetail -from .tool_run_detail import ToolRunDetail -from .tool_run_status import ToolRunStatus -from .transform_detail import TransformDetail -from .transform_input import TransformInput -from .unstructured_column_detail import UnstructuredColumnDetail -from .unstructured_column_input import UnstructuredColumnInput -from .update_api_key_request_content import UpdateApiKeyRequestContent -from .update_api_key_response_content import UpdateApiKeyResponseContent -from .update_assistant_request_content import UpdateAssistantRequestContent -from .update_assistant_response_content import UpdateAssistantResponseContent -from .update_bucket_request_content import UpdateBucketRequestContent -from .update_bucket_response_content import UpdateBucketResponseContent -from .update_data_connector_request_content import UpdateDataConnectorRequestContent -from .update_data_connector_response_content import UpdateDataConnectorResponseContent -from .update_function_request_content import UpdateFunctionRequestContent -from .update_function_response_content import UpdateFunctionResponseContent -from .update_integration_request_content import UpdateIntegrationRequestContent -from .update_integration_response_content import UpdateIntegrationResponseContent -from .update_knowledge_base_request_content import UpdateKnowledgeBaseRequestContent -from .update_knowledge_base_response_content import UpdateKnowledgeBaseResponseContent -from .update_library_request_content import UpdateLibraryRequestContent -from .update_library_response_content import UpdateLibraryResponseContent -from .update_message_request_content import UpdateMessageRequestContent -from .update_message_response_content import UpdateMessageResponseContent -from .update_organization_request_content import UpdateOrganizationRequestContent -from .update_retriever_component_request_content import UpdateRetrieverComponentRequestContent -from .update_retriever_component_response_content import UpdateRetrieverComponentResponseContent -from .update_retriever_request_content import UpdateRetrieverRequestContent -from .update_retriever_response_content import UpdateRetrieverResponseContent -from .update_rule_request_content import UpdateRuleRequestContent -from .update_rule_response_content import UpdateRuleResponseContent -from .update_ruleset_request_content import UpdateRulesetRequestContent -from .update_ruleset_response_content import UpdateRulesetResponseContent -from .update_secret_request_content import UpdateSecretRequestContent -from .update_secret_response_content import UpdateSecretResponseContent -from .update_structure_request_content import UpdateStructureRequestContent -from .update_structure_response_content import UpdateStructureResponseContent -from .update_thread_request_content import UpdateThreadRequestContent -from .update_thread_response_content import UpdateThreadResponseContent -from .update_tool_request_content import UpdateToolRequestContent -from .update_tool_response_content import UpdateToolResponseContent -from .user_detail import UserDetail -from .webhook_detail import WebhookDetail -from .webhook_input import WebhookInput -from .webscraper_detail import WebscraperDetail -from .webscraper_input import WebscraperInput - -__all__ = ( - "ActivityDuration", - "ApiKeyDetail", - "Artifact", - "AssertUrlOperation", - "AssetDetail", - "AssistantDetail", - "AssistantEventDetail", - "AssistantRunDetail", - "AssistantRunStatus", - "BucketDetail", - "CancelAssistantRunResponseContent", - "CancelDataJobResponseContent", - "CancelKnowledgeBaseJobResponseContent", - "CancelStructureRunResponseContent", - "ChatMessageDriverConfiguration", - "ChatMessageMessage", - "ChatMessageTool", - "ChatMessageToolActivity", - "ChatMessageUsage", - "ClientErrorResponseContent", - "CodeSourceInputType0", - "CodeSourceType0", - "CodeSourceType1", - "ConfluenceDetail", - "ConfluenceInput", - "ConnectionCredentialsInputType0", - "ConnectionDetail", - "CreateApiKeyRequestContent", - "CreateApiKeyResponseContent", - "CreateAssetRequestContent", - "CreateAssetResponseContent", - "CreateAssetUrlRequestContent", - "CreateAssetUrlResponseContent", - "CreateAssistantRequestContent", - "CreateAssistantResponseContent", - "CreateAssistantRunRequestContent", - "CreateAssistantRunResponseContent", - "CreateBillingManagementUrlResponseContent", - "CreateBucketRequestContent", - "CreateBucketResponseContent", - "CreateChatMessageRequestContent", - "CreateChatMessageResponseContent", - "CreateChatMessageStreamRequestContent", - "CreateChatMessageStreamResponseContent", - "CreateCheckoutSessionRequestContent", - "CreateCheckoutSessionResponseContent", - "CreateConnectionRequestContent", - "CreateConnectionResponseContent", - "CreateDataConnectorRequestContent", - "CreateDataConnectorResponseContent", - "CreateDataJobResponseContent", - "CreateEventsRequestContent", - "CreateFunctionDeploymentRequestContent", - "CreateFunctionDeploymentResponseContent", - "CreateFunctionRequestContent", - "CreateFunctionResponseContent", - "CreateIntegrationRequestContent", - "CreateIntegrationResponseContent", - "CreateInviteRequestContent", - "CreateInviteResponseContent", - "CreateKnowledgeBaseJobResponseContent", - "CreateKnowledgeBaseRequestContent", - "CreateKnowledgeBaseResponseContent", - "CreateLibraryRequestContent", - "CreateLibraryResponseContent", - "CreateMessageRequestContent", - "CreateMessageResponseContent", - "CreateNodesUsageRequestContent", - "CreateOrganizationApiKeyRequestContent", - "CreateOrganizationApiKeyResponseContent", - "CreateOrganizationRequestContent", - "CreateRetrieverComponentRequestContent", - "CreateRetrieverComponentResponseContent", - "CreateRetrieverRequestContent", - "CreateRetrieverResponseContent", - "CreateRuleRequestContent", - "CreateRuleResponseContent", - "CreateRulesetRequestContent", - "CreateRulesetResponseContent", - "CreateSecretRequestContent", - "CreateSecretResponseContent", - "CreateStructureDeploymentRequestContent", - "CreateStructureDeploymentResponseContent", - "CreateStructureRequestContent", - "CreateStructureResponseContent", - "CreateStructureRunRequestContent", - "CreateStructureRunResponseContent", - "CreateThreadRequestContent", - "CreateThreadResponseContent", - "CreateToolDeploymentRequestContent", - "CreateToolDeploymentResponseContent", - "CreateToolRequestContent", - "CreateToolResponseContent", - "CreditTransactionType", - "DataConnectorConfigInputUnionType0", - "DataConnectorConfigInputUnionType1", - "DataConnectorConfigInputUnionType2", - "DataConnectorConfigInputUnionType3", - "DataConnectorConfigInputUnionType4", - "DataConnectorConfigInputUnionType5", - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - "DataConnectorDetail", - "DataJobDetail", - "DataJobStatus", - "DataLakeCodeSource", - "DataLakeConnectorDetail", - "DataLakeConnectorInput", - "DataLakeFunctionCode", - "DataLakeStructureCode", - "DataLakeToolCode", - "DefaultFunctionCode", - "DefaultStructureCode", - "DefaultToolCode", - "DeploymentCountGauge", - "DeploymentDurationGauge", - "DeploymentErrorRateGauge", - "DeploymentStatus", - "DurationPlot", - "DurationTimeseriesElement", - "EmbeddingModel", - "Entitlement", - "Entry", - "EnvVar", - "EnvVarSource", - "Error", - "ErrorRateGauge", - "ErrorTypeCount", - "EventDetail", - "EventInput", - "FunctionCodeType0", - "FunctionCodeType1", - "FunctionCodeType2", - "FunctionDeploymentDetail", - "FunctionDetail", - "FunctionRunDetail", - "FunctionRunStatus", - "GetApiKeyResponseContent", - "GetAssetResponseContent", - "GetAssistantResponseContent", - "GetAssistantRunResponseContent", - "GetBucketResponseContent", - "GetConfigResponseContent", - "GetCreditBalanceResponseContent", - "GetDataConnectorResponseContent", - "GetDataJobResponseContent", - "GetDeploymentResponseContent", - "GetEventResponseContent", - "GetFunctionResponseContent", - "GetFunctionRunResponseContent", - "GetIntegrationResponseContent", - "GetInviteResponseContent", - "GetKnowledgeBaseJobResponseContent", - "GetKnowledgeBaseQueryResponseContent", - "GetKnowledgeBaseResponseContent", - "GetKnowledgeBaseSearchResponseContent", - "GetLibraryResponseContent", - "GetMessageResponseContent", - "GetRetrieverComponentResponseContent", - "GetRetrieverResponseContent", - "GetRuleResponseContent", - "GetRulesetResponseContent", - "GetSecretResponseContent", - "GetStructureResponseContent", - "GetStructureRunResponseContent", - "GetStructuresDashboardResponseContent", - "GetThreadResponseContent", - "GetTokenResponseContent", - "GetToolResponseContent", - "GetToolRunResponseContent", - "GetUsageResponseContent", - "GetUserResponseContent", - "GitHubAppDetail", - "GitHubAppInput", - "GithubCodeSource", - "GithubCodeSourceInput", - "GitHubCredentialsInput", - "GithubFunctionCode", - "GithubFunctionCodePushConfig", - "GithubStructureCode", - "GithubStructureCodePushConfig", - "GithubToolCode", - "GithubToolCodePushConfig", - "GoogleDriveDetail", - "GoogleDriveInput", - "GTCHybidSQLPGVectorKnowledgeBaseDetail", - "GTCHybidSQLPGVectorKnowledgeBaseInput", - "GTCPGVectorKnowledgeBaseDetail", - "GTCPGVectorKnowledgeBaseInput", - "IntegrationConfigInputUnionType0", - "IntegrationConfigInputUnionType1", - "IntegrationConfigInputUnionType2", - "IntegrationConfigUnionType0", - "IntegrationConfigUnionType1", - "IntegrationConfigUnionType2", - "IntegrationDetail", - "IntegrationType", - "InviteDetail", - "InviteResponseStatus", - "InviteStatus", - "InvokeStructureWebhookGetResponseContent", - "InvokeStructureWebhookPostResponseContent", - "JsonSchema", - "JsonSchemaProperties", - "JsonSchemaProperty", - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - "KnowledgeBaseDetail", - "KnowledgeBaseJobDetail", - "KnowledgeBaseJobStatus", - "KnowledgeBaseQueryDetail", - "KnowledgeBaseSearchDetail", - "LibraryDetail", - "ListApiKeysResponseContent", - "ListAssetsResponseContent", - "ListAssistantEventsResponseContent", - "ListAssistantRunsResponseContent", - "ListAssistantsResponseContent", - "ListBucketsResponseContent", - "ListConnectionsResponseContent", - "ListDataConnectorsResponseContent", - "ListDataJobsResponseContent", - "ListEventsResponseContent", - "ListFunctionDeploymentsResponseContent", - "ListFunctionRunLogsResponseContent", - "ListFunctionRunsResponseContent", - "ListFunctionsResponseContent", - "ListIntegrationsResponseContent", - "ListInvitesResponseContent", - "ListKnowledgeBaseJobsResponseContent", - "ListKnowledgeBaseQueriesResponseContent", - "ListKnowledgeBaseSearchesResponseContent", - "ListKnowledgeBasesResponseContent", - "ListLibrariesResponseContent", - "ListMessagesResponseContent", - "ListModelsResponseContent", - "ListOrganizationApiKeysResponseContent", - "ListOrganizationUsersResponseContent", - "ListRetrieverComponentsResponseContent", - "ListRetrieversResponseContent", - "ListRulesetsResponseContent", - "ListRulesResponseContent", - "ListSecretsResponseContent", - "ListSpansResponseContent", - "ListStructureDeploymentsResponseContent", - "ListStructureRunLogsResponseContent", - "ListStructureRunsResponseContent", - "ListStructuresResponseContent", - "ListThreadsResponseContent", - "ListToolDeploymentsResponseContent", - "ListToolRunLogsResponseContent", - "ListToolRunsResponseContent", - "ListToolsResponseContent", - "ListUserInvitesResponseContent", - "ListUsersResponseContent", - "MessageContent", - "MessageDetail", - "MessageInput", - "Meta", - "Metadata", - "ModelDetail", - "ModelTokenCounts", - "ModelTokenCountsMap", - "ModelType", - "ObservabilityEvent", - "OrganizationModelConfig", - "OrganizationUserDetail", - "Pagination", - "Period", - "PGAIKnowledgeBaseKnowledgeBaseDetail", - "PGAIKnowledgeBaseKnowledgeBaseInput", - "PGVectorKnowledgeBaseDetail", - "PGVectorKnowledgeBaseInput", - "QueryKnowledgeBaseRequestContent", - "QueryKnowledgeBaseResponseContent", - "QueryRetrieverRequestContent", - "QueryRetrieverResponseContent", - "RespondToInviteRequestContent", - "RetrieverComponentDetail", - "RetrieverComponentInput", - "RetrieverDetail", - "RuleDetail", - "RulesetDetail", - "RunCountGauge", - "RunDurationGauge", - "S3ConnectorDetail", - "S3ConnectorInput", - "SearchKnowledgeBaseRequestContent", - "SearchKnowledgeBaseResponseContent", - "SecretDetail", - "ServiceErrorResponseContent", - "SlackDetail", - "SlackInput", - "SpanDetail", - "SpanStatus", - "StreamMessageContent", - "StructureCodeType0", - "StructureCodeType1", - "StructureCodeType2", - "StructureConnectorDetail", - "StructureConnectorInput", - "StructuredColumnDetail", - "StructuredColumnInput", - "StructureDeploymentDetail", - "StructureDetail", - "StructureRunDetail", - "StructureRunStatus", - "ThreadDetail", - "TokenCountGauge", - "ToolCodeType0", - "ToolCodeType1", - "ToolCodeType2", - "ToolDeploymentDetail", - "ToolDetail", - "ToolRunDetail", - "ToolRunStatus", - "TransformDetail", - "TransformInput", - "UnstructuredColumnDetail", - "UnstructuredColumnInput", - "UpdateApiKeyRequestContent", - "UpdateApiKeyResponseContent", - "UpdateAssistantRequestContent", - "UpdateAssistantResponseContent", - "UpdateBucketRequestContent", - "UpdateBucketResponseContent", - "UpdateDataConnectorRequestContent", - "UpdateDataConnectorResponseContent", - "UpdateFunctionRequestContent", - "UpdateFunctionResponseContent", - "UpdateIntegrationRequestContent", - "UpdateIntegrationResponseContent", - "UpdateKnowledgeBaseRequestContent", - "UpdateKnowledgeBaseResponseContent", - "UpdateLibraryRequestContent", - "UpdateLibraryResponseContent", - "UpdateMessageRequestContent", - "UpdateMessageResponseContent", - "UpdateOrganizationRequestContent", - "UpdateRetrieverComponentRequestContent", - "UpdateRetrieverComponentResponseContent", - "UpdateRetrieverRequestContent", - "UpdateRetrieverResponseContent", - "UpdateRuleRequestContent", - "UpdateRuleResponseContent", - "UpdateRulesetRequestContent", - "UpdateRulesetResponseContent", - "UpdateSecretRequestContent", - "UpdateSecretResponseContent", - "UpdateStructureRequestContent", - "UpdateStructureResponseContent", - "UpdateThreadRequestContent", - "UpdateThreadResponseContent", - "UpdateToolRequestContent", - "UpdateToolResponseContent", - "UserDetail", - "WebhookDetail", - "WebhookInput", - "WebscraperDetail", - "WebscraperInput", -) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/activity_duration.py b/griptape_cloud_client/generated/griptape_cloud_client/models/activity_duration.py deleted file mode 100644 index 4d829ca..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/activity_duration.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ActivityDuration") - - -@_attrs_define -class ActivityDuration: - """ - Attributes: - activity_type (Union[Unset, str]): - seconds (Union[Unset, float]): - """ - - activity_type: Union[Unset, str] = UNSET - seconds: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - activity_type = self.activity_type - - seconds = self.seconds - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if activity_type is not UNSET: - field_dict["activity_type"] = activity_type - if seconds is not UNSET: - field_dict["seconds"] = seconds - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - activity_type = d.pop("activity_type", UNSET) - - seconds = d.pop("seconds", UNSET) - - activity_duration = cls( - activity_type=activity_type, - seconds=seconds, - ) - - activity_duration.additional_properties = d - return activity_duration - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/api_key_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/api_key_detail.py deleted file mode 100644 index dc263ad..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/api_key_detail.py +++ /dev/null @@ -1,117 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="ApiKeyDetail") - - -@_attrs_define -class ApiKeyDetail: - """ - Attributes: - active (bool): - api_key_id (str): - created_at (datetime.datetime): - created_by (str): - last_used (datetime.datetime): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - active: bool - api_key_id: str - created_at: datetime.datetime - created_by: str - last_used: datetime.datetime - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active = self.active - - api_key_id = self.api_key_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "active": active, - "api_key_id": api_key_id, - "created_at": created_at, - "created_by": created_by, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active = d.pop("active") - - api_key_id = d.pop("api_key_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - api_key_detail = cls( - active=active, - api_key_id=api_key_id, - created_at=created_at, - created_by=created_by, - last_used=last_used, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - api_key_detail.additional_properties = d - return api_key_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/artifact.py b/griptape_cloud_client/generated/griptape_cloud_client/models/artifact.py deleted file mode 100644 index c8406b1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/artifact.py +++ /dev/null @@ -1,103 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="Artifact") - - -@_attrs_define -class Artifact: - """ - Attributes: - id (str): - name (str): - type_ (str): - value (str): - meta (Union[Unset, Any]): - reference (Union[Unset, str]): - """ - - id: str - name: str - type_: str - value: str - meta: Union[Unset, Any] = UNSET - reference: 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 - - type_ = self.type_ - - value = self.value - - meta = self.meta - - reference = self.reference - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "name": name, - "type": type_, - "value": value, - } - ) - if meta is not UNSET: - field_dict["meta"] = meta - if reference is not UNSET: - field_dict["reference"] = reference - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - id = d.pop("id") - - name = d.pop("name") - - type_ = d.pop("type") - - value = d.pop("value") - - meta = d.pop("meta", UNSET) - - reference = d.pop("reference", UNSET) - - artifact = cls( - id=id, - name=name, - type_=type_, - value=value, - meta=meta, - reference=reference, - ) - - artifact.additional_properties = d - return artifact - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/assert_url_operation.py b/griptape_cloud_client/generated/griptape_cloud_client/models/assert_url_operation.py deleted file mode 100644 index 7baae67..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/assert_url_operation.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class AssertUrlOperation(str, Enum): - GET = "GET" - PUT = "PUT" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/asset_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/asset_detail.py deleted file mode 100644 index 30fdc59..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/asset_detail.py +++ /dev/null @@ -1,122 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="AssetDetail") - - -@_attrs_define -class AssetDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - bucket_id (Union[Unset, str]): - contents (Union[Unset, Any]): - size (Union[Unset, float]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - bucket_id: Union[Unset, str] = UNSET - contents: Union[Unset, Any] = UNSET - size: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - bucket_id = self.bucket_id - - contents = self.contents - - size = self.size - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if bucket_id is not UNSET: - field_dict["bucket_id"] = bucket_id - if contents is not UNSET: - field_dict["contents"] = contents - if size is not UNSET: - field_dict["size"] = size - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_id = d.pop("bucket_id", UNSET) - - contents = d.pop("contents", UNSET) - - size = d.pop("size", UNSET) - - asset_detail = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - bucket_id=bucket_id, - contents=contents, - size=size, - ) - - asset_detail.additional_properties = d - return asset_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_detail.py deleted file mode 100644 index 83661c2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_detail.py +++ /dev/null @@ -1,160 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="AssistantDetail") - - -@_attrs_define -class AssistantDetail: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - description (str): - knowledge_base_ids (list[str]): - name (str): - organization_id (str): - retriever_ids (list[str]): - ruleset_ids (list[str]): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - description: str - knowledge_base_ids: list[str] - name: str - organization_id: str - retriever_ids: list[str] - ruleset_ids: list[str] - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - knowledge_base_ids = self.knowledge_base_ids - - name = self.name - - organization_id = self.organization_id - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "description": description, - "knowledge_base_ids": knowledge_base_ids, - "name": name, - "organization_id": organization_id, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - assistant_detail = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - description=description, - knowledge_base_ids=knowledge_base_ids, - name=name, - organization_id=organization_id, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - ) - - assistant_detail.additional_properties = d - return assistant_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_event_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_event_detail.py deleted file mode 100644 index 9c64a2d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_event_detail.py +++ /dev/null @@ -1,109 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="AssistantEventDetail") - - -@_attrs_define -class AssistantEventDetail: - """ - Attributes: - assistant_run_id (str): - created_at (datetime.datetime): - event_id (str): - origin (str): - payload (Any): - timestamp (float): - type_ (str): - """ - - assistant_run_id: str - created_at: datetime.datetime - event_id: str - origin: str - payload: Any - timestamp: float - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_run_id = self.assistant_run_id - - created_at = self.created_at.isoformat() - - event_id = self.event_id - - origin = self.origin - - payload = self.payload - - timestamp = self.timestamp - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_run_id": assistant_run_id, - "created_at": created_at, - "event_id": event_id, - "origin": origin, - "payload": payload, - "timestamp": timestamp, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_run_id = d.pop("assistant_run_id") - - created_at = isoparse(d.pop("created_at")) - - event_id = d.pop("event_id") - - origin = d.pop("origin") - - payload = d.pop("payload") - - timestamp = d.pop("timestamp") - - type_ = d.pop("type") - - assistant_event_detail = cls( - assistant_run_id=assistant_run_id, - created_at=created_at, - event_id=event_id, - origin=origin, - payload=payload, - timestamp=timestamp, - type_=type_, - ) - - assistant_event_detail.additional_properties = d - return assistant_event_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_detail.py deleted file mode 100644 index c9df3f2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_detail.py +++ /dev/null @@ -1,221 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.assistant_run_status import AssistantRunStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="AssistantRunDetail") - - -@_attrs_define -class AssistantRunDetail: - """ - Attributes: - args (list[str]): - assistant_id (str): - assistant_run_id (str): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - knowledge_base_ids (list[str]): - retriever_ids (list[str]): - ruleset_ids (list[str]): - status (AssistantRunStatus): - stream (bool): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - output (Union[Unset, Any]): - status_detail (Union[Unset, Any]): - thread_id (Union[Unset, str]): - """ - - args: list[str] - assistant_id: str - assistant_run_id: str - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - knowledge_base_ids: list[str] - retriever_ids: list[str] - ruleset_ids: list[str] - status: AssistantRunStatus - stream: bool - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - output: Union[Unset, Any] = UNSET - status_detail: Union[Unset, Any] = UNSET - thread_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - assistant_id = self.assistant_id - - assistant_run_id = self.assistant_run_id - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_ids = self.knowledge_base_ids - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - status = self.status.value - - stream = self.stream - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - output = self.output - - status_detail = self.status_detail - - thread_id = self.thread_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "assistant_id": assistant_id, - "assistant_run_id": assistant_run_id, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_ids": knowledge_base_ids, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "status": status, - "stream": stream, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - if thread_id is not UNSET: - field_dict["thread_id"] = thread_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - assistant_id = d.pop("assistant_id") - - assistant_run_id = d.pop("assistant_run_id") - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - status = AssistantRunStatus(d.pop("status")) - - stream = d.pop("stream") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - thread_id = d.pop("thread_id", UNSET) - - assistant_run_detail = cls( - args=args, - assistant_id=assistant_id, - assistant_run_id=assistant_run_id, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - knowledge_base_ids=knowledge_base_ids, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - status=status, - stream=stream, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - output=output, - status_detail=status_detail, - thread_id=thread_id, - ) - - assistant_run_detail.additional_properties = d - return assistant_run_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_status.py deleted file mode 100644 index 6cfe993..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/assistant_run_status.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class AssistantRunStatus(str, Enum): - CANCELLED = "CANCELLED" - ERROR = "ERROR" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - STARTING = "STARTING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/bucket_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/bucket_detail.py deleted file mode 100644 index 1092d17..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/bucket_detail.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="BucketDetail") - - -@_attrs_define -class BucketDetail: - """ - Attributes: - bucket_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - bucket_id: str - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bucket_id = self.bucket_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bucket_id": bucket_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bucket_id = d.pop("bucket_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_detail = cls( - bucket_id=bucket_id, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - bucket_detail.additional_properties = d - return bucket_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_assistant_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_assistant_run_response_content.py deleted file mode 100644 index a2eaa80..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_assistant_run_response_content.py +++ /dev/null @@ -1,221 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.assistant_run_status import AssistantRunStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CancelAssistantRunResponseContent") - - -@_attrs_define -class CancelAssistantRunResponseContent: - """ - Attributes: - args (list[str]): - assistant_id (str): - assistant_run_id (str): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - knowledge_base_ids (list[str]): - retriever_ids (list[str]): - ruleset_ids (list[str]): - status (AssistantRunStatus): - stream (bool): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - output (Union[Unset, Any]): - status_detail (Union[Unset, Any]): - thread_id (Union[Unset, str]): - """ - - args: list[str] - assistant_id: str - assistant_run_id: str - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - knowledge_base_ids: list[str] - retriever_ids: list[str] - ruleset_ids: list[str] - status: AssistantRunStatus - stream: bool - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - output: Union[Unset, Any] = UNSET - status_detail: Union[Unset, Any] = UNSET - thread_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - assistant_id = self.assistant_id - - assistant_run_id = self.assistant_run_id - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_ids = self.knowledge_base_ids - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - status = self.status.value - - stream = self.stream - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - output = self.output - - status_detail = self.status_detail - - thread_id = self.thread_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "assistant_id": assistant_id, - "assistant_run_id": assistant_run_id, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_ids": knowledge_base_ids, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "status": status, - "stream": stream, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - if thread_id is not UNSET: - field_dict["thread_id"] = thread_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - assistant_id = d.pop("assistant_id") - - assistant_run_id = d.pop("assistant_run_id") - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - status = AssistantRunStatus(d.pop("status")) - - stream = d.pop("stream") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - thread_id = d.pop("thread_id", UNSET) - - cancel_assistant_run_response_content = cls( - args=args, - assistant_id=assistant_id, - assistant_run_id=assistant_run_id, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - knowledge_base_ids=knowledge_base_ids, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - status=status, - stream=stream, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - output=output, - status_detail=status_detail, - thread_id=thread_id, - ) - - cancel_assistant_run_response_content.additional_properties = d - return cancel_assistant_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_data_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_data_job_response_content.py deleted file mode 100644 index 6abaed1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_data_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.data_job_status import DataJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="CancelDataJobResponseContent") - - -@_attrs_define -class CancelDataJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - data_job_id (str): - status (DataJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - data_connector_id: str - data_job_id: str - status: DataJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - data_job_id = self.data_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "data_job_id": data_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - data_job_id = d.pop("data_job_id") - - status = DataJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - cancel_data_job_response_content = cls( - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - data_job_id=data_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - cancel_data_job_response_content.additional_properties = d - return cancel_data_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_knowledge_base_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_knowledge_base_job_response_content.py deleted file mode 100644 index a89b25a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_knowledge_base_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.knowledge_base_job_status import KnowledgeBaseJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="CancelKnowledgeBaseJobResponseContent") - - -@_attrs_define -class CancelKnowledgeBaseJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_job_id (str): - status (KnowledgeBaseJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_job_id: str - status: KnowledgeBaseJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_job_id = self.knowledge_base_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_job_id": knowledge_base_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_job_id = d.pop("knowledge_base_job_id") - - status = KnowledgeBaseJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - cancel_knowledge_base_job_response_content = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_job_id=knowledge_base_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - cancel_knowledge_base_job_response_content.additional_properties = d - return cancel_knowledge_base_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_structure_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_structure_run_response_content.py deleted file mode 100644 index 269e4b7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/cancel_structure_run_response_content.py +++ /dev/null @@ -1,223 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.structure_run_status import StructureRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="CancelStructureRunResponseContent") - - -@_attrs_define -class CancelStructureRunResponseContent: - """ - Attributes: - args (list[str]): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - started_at (Union[None, datetime.datetime]): - status (StructureRunStatus): - structure_id (str): - structure_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - args: list[str] - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - started_at: Union[None, datetime.datetime] - status: StructureRunStatus - structure_id: str - structure_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - structure_id = self.structure_id - - structure_run_id = self.structure_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "started_at": started_at, - "status": status, - "structure_id": structure_id, - "structure_run_id": structure_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = StructureRunStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - structure_run_id = d.pop("structure_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - cancel_structure_run_response_content = cls( - args=args, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - started_at=started_at, - status=status, - structure_id=structure_id, - structure_run_id=structure_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - cancel_structure_run_response_content.additional_properties = d - return cancel_structure_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_driver_configuration.py b/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_driver_configuration.py deleted file mode 100644 index d54309b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_driver_configuration.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ChatMessageDriverConfiguration") - - -@_attrs_define -class ChatMessageDriverConfiguration: - """ - Attributes: - extra_params (Union[Unset, Any]): - max_tokens (Union[Unset, float]): - model (Union[Unset, str]): - structured_output_strategy (Union[Unset, str]): - temperature (Union[Unset, float]): - use_native_tools (Union[Unset, bool]): - """ - - extra_params: Union[Unset, Any] = UNSET - max_tokens: Union[Unset, float] = UNSET - model: Union[Unset, str] = UNSET - structured_output_strategy: Union[Unset, str] = UNSET - temperature: Union[Unset, float] = UNSET - use_native_tools: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - extra_params = self.extra_params - - max_tokens = self.max_tokens - - model = self.model - - structured_output_strategy = self.structured_output_strategy - - temperature = self.temperature - - use_native_tools = self.use_native_tools - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if extra_params is not UNSET: - field_dict["extra_params"] = extra_params - if max_tokens is not UNSET: - field_dict["max_tokens"] = max_tokens - if model is not UNSET: - field_dict["model"] = model - if structured_output_strategy is not UNSET: - field_dict["structured_output_strategy"] = structured_output_strategy - if temperature is not UNSET: - field_dict["temperature"] = temperature - if use_native_tools is not UNSET: - field_dict["use_native_tools"] = use_native_tools - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - extra_params = d.pop("extra_params", UNSET) - - max_tokens = d.pop("max_tokens", UNSET) - - model = d.pop("model", UNSET) - - structured_output_strategy = d.pop("structured_output_strategy", UNSET) - - temperature = d.pop("temperature", UNSET) - - use_native_tools = d.pop("use_native_tools", UNSET) - - chat_message_driver_configuration = cls( - extra_params=extra_params, - max_tokens=max_tokens, - model=model, - structured_output_strategy=structured_output_strategy, - temperature=temperature, - use_native_tools=use_native_tools, - ) - - chat_message_driver_configuration.additional_properties = d - return chat_message_driver_configuration - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_message.py b/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_message.py deleted file mode 100644 index 7c850bc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_message.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.chat_message_usage import ChatMessageUsage - from ..models.message_content import MessageContent - - -T = TypeVar("T", bound="ChatMessageMessage") - - -@_attrs_define -class ChatMessageMessage: - """ - Attributes: - content (list['MessageContent']): - role (str): - usage (ChatMessageUsage): - """ - - content: list["MessageContent"] - role: str - usage: "ChatMessageUsage" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - content = [] - for content_item_data in self.content: - content_item = content_item_data.to_dict() - content.append(content_item) - - role = self.role - - usage = self.usage.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "content": content, - "role": role, - "usage": usage, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_usage import ChatMessageUsage - from ..models.message_content import MessageContent - - d = dict(src_dict) - content = [] - _content = d.pop("content") - for content_item_data in _content: - content_item = MessageContent.from_dict(content_item_data) - - content.append(content_item) - - role = d.pop("role") - - usage = ChatMessageUsage.from_dict(d.pop("usage")) - - chat_message_message = cls( - content=content, - role=role, - usage=usage, - ) - - chat_message_message.additional_properties = d - return chat_message_message - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool.py b/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool.py deleted file mode 100644 index 4e6bd5e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.chat_message_tool_activity import ChatMessageToolActivity - - -T = TypeVar("T", bound="ChatMessageTool") - - -@_attrs_define -class ChatMessageTool: - """ - Attributes: - activities (list['ChatMessageToolActivity']): - name (str): - """ - - activities: list["ChatMessageToolActivity"] - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - activities = [] - for activities_item_data in self.activities: - activities_item = activities_item_data.to_dict() - activities.append(activities_item) - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "activities": activities, - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_tool_activity import ChatMessageToolActivity - - d = dict(src_dict) - activities = [] - _activities = d.pop("activities") - for activities_item_data in _activities: - activities_item = ChatMessageToolActivity.from_dict(activities_item_data) - - activities.append(activities_item) - - name = d.pop("name") - - chat_message_tool = cls( - activities=activities, - name=name, - ) - - chat_message_tool.additional_properties = d - return chat_message_tool - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool_activity.py b/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool_activity.py deleted file mode 100644 index 5648adb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_tool_activity.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.json_schema import JsonSchema - - -T = TypeVar("T", bound="ChatMessageToolActivity") - - -@_attrs_define -class ChatMessageToolActivity: - """ - Attributes: - description (str): - json_schema (JsonSchema): - name (str): - """ - - description: str - json_schema: "JsonSchema" - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - json_schema = self.json_schema.to_dict() - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "description": description, - "json_schema": json_schema, - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.json_schema import JsonSchema - - d = dict(src_dict) - description = d.pop("description") - - json_schema = JsonSchema.from_dict(d.pop("json_schema")) - - name = d.pop("name") - - chat_message_tool_activity = cls( - description=description, - json_schema=json_schema, - name=name, - ) - - chat_message_tool_activity.additional_properties = d - return chat_message_tool_activity - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_usage.py b/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_usage.py deleted file mode 100644 index 61bc19c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/chat_message_usage.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ChatMessageUsage") - - -@_attrs_define -class ChatMessageUsage: - """ - Attributes: - input_tokens (float): - output_tokens (float): - type_ (str): - """ - - input_tokens: float - output_tokens: float - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_tokens = self.input_tokens - - output_tokens = self.output_tokens - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "input_tokens": input_tokens, - "output_tokens": output_tokens, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - input_tokens = d.pop("input_tokens") - - output_tokens = d.pop("output_tokens") - - type_ = d.pop("type") - - chat_message_usage = cls( - input_tokens=input_tokens, - output_tokens=output_tokens, - type_=type_, - ) - - chat_message_usage.additional_properties = d - return chat_message_usage - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/client_error_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/client_error_response_content.py deleted file mode 100644 index 1bad818..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/client_error_response_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ClientErrorResponseContent") - - -@_attrs_define -class ClientErrorResponseContent: - """ - Attributes: - errors (Union[Unset, list[Any]]): - type_ (Union[Unset, str]): - """ - - errors: Union[Unset, list[Any]] = UNSET - type_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - errors: Union[Unset, list[Any]] = UNSET - if not isinstance(self.errors, Unset): - errors = self.errors - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict["errors"] = errors - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - errors = cast(list[Any], d.pop("errors", UNSET)) - - type_ = d.pop("type", UNSET) - - client_error_response_content = cls( - errors=errors, - type_=type_, - ) - - client_error_response_content.additional_properties = d - return client_error_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_input_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_input_type_0.py deleted file mode 100644 index 08fbc8b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_input_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_code_source_input import GithubCodeSourceInput - - -T = TypeVar("T", bound="CodeSourceInputType0") - - -@_attrs_define -class CodeSourceInputType0: - """ - Attributes: - github (GithubCodeSourceInput): - """ - - github: "GithubCodeSourceInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_code_source_input import GithubCodeSourceInput - - d = dict(src_dict) - github = GithubCodeSourceInput.from_dict(d.pop("github")) - - code_source_input_type_0 = cls( - github=github, - ) - - code_source_input_type_0.additional_properties = d - return code_source_input_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/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_0.py deleted file mode 100644 index 1cc7660..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_code_source import GithubCodeSource - - -T = TypeVar("T", bound="CodeSourceType0") - - -@_attrs_define -class CodeSourceType0: - """ - Attributes: - github (GithubCodeSource): - """ - - github: "GithubCodeSource" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_code_source import GithubCodeSource - - d = dict(src_dict) - github = GithubCodeSource.from_dict(d.pop("github")) - - code_source_type_0 = cls( - github=github, - ) - - code_source_type_0.additional_properties = d - return code_source_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/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_1.py deleted file mode 100644 index e08b909..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/code_source_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_code_source import DataLakeCodeSource - - -T = TypeVar("T", bound="CodeSourceType1") - - -@_attrs_define -class CodeSourceType1: - """ - Attributes: - data_lake (DataLakeCodeSource): - """ - - data_lake: "DataLakeCodeSource" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_code_source import DataLakeCodeSource - - d = dict(src_dict) - data_lake = DataLakeCodeSource.from_dict(d.pop("data_lake")) - - code_source_type_1 = cls( - data_lake=data_lake, - ) - - code_source_type_1.additional_properties = d - return code_source_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_detail.py deleted file mode 100644 index b176fd6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_detail.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ConfluenceDetail") - - -@_attrs_define -class ConfluenceDetail: - """ - Attributes: - atlassian_email (str): - domain (str): - encoding (Union[Unset, str]): - """ - - atlassian_email: str - domain: str - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - atlassian_email = self.atlassian_email - - domain = self.domain - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "atlassian_email": atlassian_email, - "domain": domain, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - atlassian_email = d.pop("atlassian_email") - - domain = d.pop("domain") - - encoding = d.pop("encoding", UNSET) - - confluence_detail = cls( - atlassian_email=atlassian_email, - domain=domain, - encoding=encoding, - ) - - confluence_detail.additional_properties = d - return confluence_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_input.py deleted file mode 100644 index 76ac465..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/confluence_input.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ConfluenceInput") - - -@_attrs_define -class ConfluenceInput: - """ - Attributes: - atlassian_api_token (str): - atlassian_email (str): - domain (str): - encoding (Union[Unset, str]): - """ - - atlassian_api_token: str - atlassian_email: str - domain: str - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - atlassian_api_token = self.atlassian_api_token - - atlassian_email = self.atlassian_email - - domain = self.domain - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "atlassian_api_token": atlassian_api_token, - "atlassian_email": atlassian_email, - "domain": domain, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - atlassian_api_token = d.pop("atlassian_api_token") - - atlassian_email = d.pop("atlassian_email") - - domain = d.pop("domain") - - encoding = d.pop("encoding", UNSET) - - confluence_input = cls( - atlassian_api_token=atlassian_api_token, - atlassian_email=atlassian_email, - domain=domain, - encoding=encoding, - ) - - confluence_input.additional_properties = d - return confluence_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/connection_credentials_input_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/connection_credentials_input_type_0.py deleted file mode 100644 index cb8cdaf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/connection_credentials_input_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.git_hub_credentials_input import GitHubCredentialsInput - - -T = TypeVar("T", bound="ConnectionCredentialsInputType0") - - -@_attrs_define -class ConnectionCredentialsInputType0: - """ - Attributes: - github (GitHubCredentialsInput): - """ - - github: "GitHubCredentialsInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.git_hub_credentials_input import GitHubCredentialsInput - - d = dict(src_dict) - github = GitHubCredentialsInput.from_dict(d.pop("github")) - - connection_credentials_input_type_0 = cls( - github=github, - ) - - connection_credentials_input_type_0.additional_properties = d - return connection_credentials_input_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/griptape_cloud_client/generated/griptape_cloud_client/models/connection_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/connection_detail.py deleted file mode 100644 index e67fe3e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/connection_detail.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="ConnectionDetail") - - -@_attrs_define -class ConnectionDetail: - """ - Attributes: - connection_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - type_ (str): - updated_at (datetime.datetime): - """ - - connection_id: str - created_at: datetime.datetime - created_by: str - name: str - type_: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connection_id = self.connection_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_id": connection_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "type": type_, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connection_id = d.pop("connection_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - connection_detail = cls( - connection_id=connection_id, - created_at=created_at, - created_by=created_by, - name=name, - type_=type_, - updated_at=updated_at, - ) - - connection_detail.additional_properties = d - return connection_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_request_content.py deleted file mode 100644 index eeae38d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateApiKeyRequestContent") - - -@_attrs_define -class CreateApiKeyRequestContent: - """ - Attributes: - name (str): - """ - - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - create_api_key_request_content = cls( - name=name, - ) - - create_api_key_request_content.additional_properties = d - return create_api_key_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_response_content.py deleted file mode 100644 index a3142ee..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_api_key_response_content.py +++ /dev/null @@ -1,125 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="CreateApiKeyResponseContent") - - -@_attrs_define -class CreateApiKeyResponseContent: - """ - Attributes: - active (bool): - api_key_id (str): - created_at (datetime.datetime): - created_by (str): - last_used (datetime.datetime): - name (str): - organization_id (str): - updated_at (datetime.datetime): - value (str): - """ - - active: bool - api_key_id: str - created_at: datetime.datetime - created_by: str - last_used: datetime.datetime - name: str - organization_id: str - updated_at: datetime.datetime - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active = self.active - - api_key_id = self.api_key_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "active": active, - "api_key_id": api_key_id, - "created_at": created_at, - "created_by": created_by, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active = d.pop("active") - - api_key_id = d.pop("api_key_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - value = d.pop("value") - - create_api_key_response_content = cls( - active=active, - api_key_id=api_key_id, - created_at=created_at, - created_by=created_by, - last_used=last_used, - name=name, - organization_id=organization_id, - updated_at=updated_at, - value=value, - ) - - create_api_key_response_content.additional_properties = d - return create_api_key_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_request_content.py deleted file mode 100644 index b1c05c0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateAssetRequestContent") - - -@_attrs_define -class CreateAssetRequestContent: - """ - Attributes: - name (str): - """ - - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - create_asset_request_content = cls( - name=name, - ) - - create_asset_request_content.additional_properties = d - return create_asset_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_response_content.py deleted file mode 100644 index 6a9f8af..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_response_content.py +++ /dev/null @@ -1,122 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="CreateAssetResponseContent") - - -@_attrs_define -class CreateAssetResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - bucket_id (Union[Unset, str]): - contents (Union[Unset, Any]): - size (Union[Unset, float]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - bucket_id: Union[Unset, str] = UNSET - contents: Union[Unset, Any] = UNSET - size: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - bucket_id = self.bucket_id - - contents = self.contents - - size = self.size - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if bucket_id is not UNSET: - field_dict["bucket_id"] = bucket_id - if contents is not UNSET: - field_dict["contents"] = contents - if size is not UNSET: - field_dict["size"] = size - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_id = d.pop("bucket_id", UNSET) - - contents = d.pop("contents", UNSET) - - size = d.pop("size", UNSET) - - create_asset_response_content = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - bucket_id=bucket_id, - contents=contents, - size=size, - ) - - create_asset_response_content.additional_properties = d - return create_asset_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_request_content.py deleted file mode 100644 index eb18bd4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_request_content.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.assert_url_operation import AssertUrlOperation -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreateAssetUrlRequestContent") - - -@_attrs_define -class CreateAssetUrlRequestContent: - """ - Attributes: - operation (Union[Unset, AssertUrlOperation]): - """ - - operation: Union[Unset, AssertUrlOperation] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - operation: Union[Unset, str] = UNSET - if not isinstance(self.operation, Unset): - operation = self.operation.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if operation is not UNSET: - field_dict["operation"] = operation - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - _operation = d.pop("operation", UNSET) - operation: Union[Unset, AssertUrlOperation] - if isinstance(_operation, Unset): - operation = UNSET - else: - operation = AssertUrlOperation(_operation) - - create_asset_url_request_content = cls( - operation=operation, - ) - - create_asset_url_request_content.additional_properties = d - return create_asset_url_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_response_content.py deleted file mode 100644 index 36d3420..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_asset_url_response_content.py +++ /dev/null @@ -1,73 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateAssetUrlResponseContent") - - -@_attrs_define -class CreateAssetUrlResponseContent: - """ - Attributes: - headers (Metadata): - url (str): - """ - - headers: "Metadata" - url: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - headers = self.headers.to_dict() - - url = self.url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "headers": headers, - "url": url, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - headers = Metadata.from_dict(d.pop("headers")) - - url = d.pop("url") - - create_asset_url_response_content = cls( - headers=headers, - url=url, - ) - - create_asset_url_response_content.additional_properties = d - return create_asset_url_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_request_content.py deleted file mode 100644 index 4328216..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_request_content.py +++ /dev/null @@ -1,134 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="CreateAssistantRequestContent") - - -@_attrs_define -class CreateAssistantRequestContent: - """ - Attributes: - name (str): - description (Union[Unset, str]): - input_ (Union[Unset, str]): - knowledge_base_ids (Union[Unset, list[str]]): - retriever_ids (Union[Unset, list[str]]): - ruleset_ids (Union[Unset, list[str]]): - structure_ids (Union[Unset, list[str]]): - tool_ids (Union[Unset, list[str]]): - """ - - name: str - description: Union[Unset, str] = UNSET - input_: Union[Unset, str] = UNSET - knowledge_base_ids: Union[Unset, list[str]] = UNSET - retriever_ids: Union[Unset, list[str]] = UNSET - ruleset_ids: Union[Unset, list[str]] = UNSET - structure_ids: Union[Unset, list[str]] = UNSET - tool_ids: Union[Unset, list[str]] = 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 - - input_ = self.input_ - - knowledge_base_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.knowledge_base_ids, Unset): - knowledge_base_ids = self.knowledge_base_ids - - retriever_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.retriever_ids, Unset): - retriever_ids = self.retriever_ids - - ruleset_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.ruleset_ids, Unset): - ruleset_ids = self.ruleset_ids - - structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.structure_ids, Unset): - structure_ids = self.structure_ids - - tool_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.tool_ids, Unset): - tool_ids = self.tool_ids - - 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 input_ is not UNSET: - field_dict["input"] = input_ - if knowledge_base_ids is not UNSET: - field_dict["knowledge_base_ids"] = knowledge_base_ids - if retriever_ids is not UNSET: - field_dict["retriever_ids"] = retriever_ids - if ruleset_ids is not UNSET: - field_dict["ruleset_ids"] = ruleset_ids - if structure_ids is not UNSET: - field_dict["structure_ids"] = structure_ids - if tool_ids is not UNSET: - field_dict["tool_ids"] = tool_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - description = d.pop("description", UNSET) - - input_ = d.pop("input", UNSET) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids", UNSET)) - - retriever_ids = cast(list[str], d.pop("retriever_ids", UNSET)) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids", UNSET)) - - structure_ids = cast(list[str], d.pop("structure_ids", UNSET)) - - tool_ids = cast(list[str], d.pop("tool_ids", UNSET)) - - create_assistant_request_content = cls( - name=name, - description=description, - input_=input_, - knowledge_base_ids=knowledge_base_ids, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - ) - - create_assistant_request_content.additional_properties = d - return create_assistant_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_response_content.py deleted file mode 100644 index 83401b4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_response_content.py +++ /dev/null @@ -1,160 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="CreateAssistantResponseContent") - - -@_attrs_define -class CreateAssistantResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - description (str): - knowledge_base_ids (list[str]): - name (str): - organization_id (str): - retriever_ids (list[str]): - ruleset_ids (list[str]): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - description: str - knowledge_base_ids: list[str] - name: str - organization_id: str - retriever_ids: list[str] - ruleset_ids: list[str] - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - knowledge_base_ids = self.knowledge_base_ids - - name = self.name - - organization_id = self.organization_id - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "description": description, - "knowledge_base_ids": knowledge_base_ids, - "name": name, - "organization_id": organization_id, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - create_assistant_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - description=description, - knowledge_base_ids=knowledge_base_ids, - name=name, - organization_id=organization_id, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - ) - - create_assistant_response_content.additional_properties = d - return create_assistant_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_request_content.py deleted file mode 100644 index 19cb47a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_request_content.py +++ /dev/null @@ -1,209 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="CreateAssistantRunRequestContent") - - -@_attrs_define -class CreateAssistantRunRequestContent: - """ - Attributes: - additional_knowledge_base_ids (Union[Unset, list[str]]): - additional_retriever_ids (Union[Unset, list[str]]): - additional_ruleset_ids (Union[Unset, list[str]]): - additional_structure_ids (Union[Unset, list[str]]): - additional_tool_ids (Union[Unset, list[str]]): - args (Union[Unset, list[str]]): - input_ (Union[Unset, str]): - knowledge_base_ids (Union[Unset, list[str]]): - new_thread (Union[Unset, bool]): If true, create a new thread for this run to be returned in the response - thread_id. - retriever_ids (Union[Unset, list[str]]): - ruleset_ids (Union[Unset, list[str]]): - stream (Union[Unset, bool]): - structure_ids (Union[Unset, list[str]]): - thread_id (Union[Unset, str]): If provided, the run will be associated with the given thread. This takes - precedence over new_thread. - tool_ids (Union[Unset, list[str]]): - """ - - additional_knowledge_base_ids: Union[Unset, list[str]] = UNSET - additional_retriever_ids: Union[Unset, list[str]] = UNSET - additional_ruleset_ids: Union[Unset, list[str]] = UNSET - additional_structure_ids: Union[Unset, list[str]] = UNSET - additional_tool_ids: Union[Unset, list[str]] = UNSET - args: Union[Unset, list[str]] = UNSET - input_: Union[Unset, str] = UNSET - knowledge_base_ids: Union[Unset, list[str]] = UNSET - new_thread: Union[Unset, bool] = UNSET - retriever_ids: Union[Unset, list[str]] = UNSET - ruleset_ids: Union[Unset, list[str]] = UNSET - stream: Union[Unset, bool] = UNSET - structure_ids: Union[Unset, list[str]] = UNSET - thread_id: Union[Unset, str] = UNSET - tool_ids: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - additional_knowledge_base_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.additional_knowledge_base_ids, Unset): - additional_knowledge_base_ids = self.additional_knowledge_base_ids - - additional_retriever_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.additional_retriever_ids, Unset): - additional_retriever_ids = self.additional_retriever_ids - - additional_ruleset_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.additional_ruleset_ids, Unset): - additional_ruleset_ids = self.additional_ruleset_ids - - additional_structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.additional_structure_ids, Unset): - additional_structure_ids = self.additional_structure_ids - - additional_tool_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.additional_tool_ids, Unset): - additional_tool_ids = self.additional_tool_ids - - args: Union[Unset, list[str]] = UNSET - if not isinstance(self.args, Unset): - args = self.args - - input_ = self.input_ - - knowledge_base_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.knowledge_base_ids, Unset): - knowledge_base_ids = self.knowledge_base_ids - - new_thread = self.new_thread - - retriever_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.retriever_ids, Unset): - retriever_ids = self.retriever_ids - - ruleset_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.ruleset_ids, Unset): - ruleset_ids = self.ruleset_ids - - stream = self.stream - - structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.structure_ids, Unset): - structure_ids = self.structure_ids - - thread_id = self.thread_id - - tool_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.tool_ids, Unset): - tool_ids = self.tool_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if additional_knowledge_base_ids is not UNSET: - field_dict["additional_knowledge_base_ids"] = additional_knowledge_base_ids - if additional_retriever_ids is not UNSET: - field_dict["additional_retriever_ids"] = additional_retriever_ids - if additional_ruleset_ids is not UNSET: - field_dict["additional_ruleset_ids"] = additional_ruleset_ids - if additional_structure_ids is not UNSET: - field_dict["additional_structure_ids"] = additional_structure_ids - if additional_tool_ids is not UNSET: - field_dict["additional_tool_ids"] = additional_tool_ids - if args is not UNSET: - field_dict["args"] = args - if input_ is not UNSET: - field_dict["input"] = input_ - if knowledge_base_ids is not UNSET: - field_dict["knowledge_base_ids"] = knowledge_base_ids - if new_thread is not UNSET: - field_dict["new_thread"] = new_thread - if retriever_ids is not UNSET: - field_dict["retriever_ids"] = retriever_ids - if ruleset_ids is not UNSET: - field_dict["ruleset_ids"] = ruleset_ids - if stream is not UNSET: - field_dict["stream"] = stream - if structure_ids is not UNSET: - field_dict["structure_ids"] = structure_ids - if thread_id is not UNSET: - field_dict["thread_id"] = thread_id - if tool_ids is not UNSET: - field_dict["tool_ids"] = tool_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - additional_knowledge_base_ids = cast(list[str], d.pop("additional_knowledge_base_ids", UNSET)) - - additional_retriever_ids = cast(list[str], d.pop("additional_retriever_ids", UNSET)) - - additional_ruleset_ids = cast(list[str], d.pop("additional_ruleset_ids", UNSET)) - - additional_structure_ids = cast(list[str], d.pop("additional_structure_ids", UNSET)) - - additional_tool_ids = cast(list[str], d.pop("additional_tool_ids", UNSET)) - - args = cast(list[str], d.pop("args", UNSET)) - - input_ = d.pop("input", UNSET) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids", UNSET)) - - new_thread = d.pop("new_thread", UNSET) - - retriever_ids = cast(list[str], d.pop("retriever_ids", UNSET)) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids", UNSET)) - - stream = d.pop("stream", UNSET) - - structure_ids = cast(list[str], d.pop("structure_ids", UNSET)) - - thread_id = d.pop("thread_id", UNSET) - - tool_ids = cast(list[str], d.pop("tool_ids", UNSET)) - - create_assistant_run_request_content = cls( - additional_knowledge_base_ids=additional_knowledge_base_ids, - additional_retriever_ids=additional_retriever_ids, - additional_ruleset_ids=additional_ruleset_ids, - additional_structure_ids=additional_structure_ids, - additional_tool_ids=additional_tool_ids, - args=args, - input_=input_, - knowledge_base_ids=knowledge_base_ids, - new_thread=new_thread, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - stream=stream, - structure_ids=structure_ids, - thread_id=thread_id, - tool_ids=tool_ids, - ) - - create_assistant_run_request_content.additional_properties = d - return create_assistant_run_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_response_content.py deleted file mode 100644 index 64c1818..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_assistant_run_response_content.py +++ /dev/null @@ -1,221 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.assistant_run_status import AssistantRunStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreateAssistantRunResponseContent") - - -@_attrs_define -class CreateAssistantRunResponseContent: - """ - Attributes: - args (list[str]): - assistant_id (str): - assistant_run_id (str): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - knowledge_base_ids (list[str]): - retriever_ids (list[str]): - ruleset_ids (list[str]): - status (AssistantRunStatus): - stream (bool): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - output (Union[Unset, Any]): - status_detail (Union[Unset, Any]): - thread_id (Union[Unset, str]): - """ - - args: list[str] - assistant_id: str - assistant_run_id: str - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - knowledge_base_ids: list[str] - retriever_ids: list[str] - ruleset_ids: list[str] - status: AssistantRunStatus - stream: bool - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - output: Union[Unset, Any] = UNSET - status_detail: Union[Unset, Any] = UNSET - thread_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - assistant_id = self.assistant_id - - assistant_run_id = self.assistant_run_id - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_ids = self.knowledge_base_ids - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - status = self.status.value - - stream = self.stream - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - output = self.output - - status_detail = self.status_detail - - thread_id = self.thread_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "assistant_id": assistant_id, - "assistant_run_id": assistant_run_id, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_ids": knowledge_base_ids, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "status": status, - "stream": stream, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - if thread_id is not UNSET: - field_dict["thread_id"] = thread_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - assistant_id = d.pop("assistant_id") - - assistant_run_id = d.pop("assistant_run_id") - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - status = AssistantRunStatus(d.pop("status")) - - stream = d.pop("stream") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - thread_id = d.pop("thread_id", UNSET) - - create_assistant_run_response_content = cls( - args=args, - assistant_id=assistant_id, - assistant_run_id=assistant_run_id, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - knowledge_base_ids=knowledge_base_ids, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - status=status, - stream=stream, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - output=output, - status_detail=status_detail, - thread_id=thread_id, - ) - - create_assistant_run_response_content.additional_properties = d - return create_assistant_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_billing_management_url_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_billing_management_url_response_content.py deleted file mode 100644 index 646591f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_billing_management_url_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateBillingManagementUrlResponseContent") - - -@_attrs_define -class CreateBillingManagementUrlResponseContent: - """ - Attributes: - billing_management_url (str): - """ - - billing_management_url: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - billing_management_url = self.billing_management_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "billing_management_url": billing_management_url, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - billing_management_url = d.pop("billing_management_url") - - create_billing_management_url_response_content = cls( - billing_management_url=billing_management_url, - ) - - create_billing_management_url_response_content.additional_properties = d - return create_billing_management_url_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_request_content.py deleted file mode 100644 index 50e25c6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateBucketRequestContent") - - -@_attrs_define -class CreateBucketRequestContent: - """ - Attributes: - name (str): - """ - - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - create_bucket_request_content = cls( - name=name, - ) - - create_bucket_request_content.additional_properties = d - return create_bucket_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_response_content.py deleted file mode 100644 index cc01a6c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_bucket_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="CreateBucketResponseContent") - - -@_attrs_define -class CreateBucketResponseContent: - """ - Attributes: - bucket_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - bucket_id: str - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bucket_id = self.bucket_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bucket_id": bucket_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bucket_id = d.pop("bucket_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_bucket_response_content = cls( - bucket_id=bucket_id, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - create_bucket_response_content.additional_properties = d - return create_bucket_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_request_content.py deleted file mode 100644 index 0488179..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_request_content.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.chat_message_driver_configuration import ChatMessageDriverConfiguration - from ..models.chat_message_message import ChatMessageMessage - from ..models.chat_message_tool import ChatMessageTool - from ..models.json_schema import JsonSchema - - -T = TypeVar("T", bound="CreateChatMessageRequestContent") - - -@_attrs_define -class CreateChatMessageRequestContent: - """ - Attributes: - driver_configuration (ChatMessageDriverConfiguration): - messages (list['ChatMessageMessage']): - output_schema (JsonSchema): - tools (list['ChatMessageTool']): - """ - - driver_configuration: "ChatMessageDriverConfiguration" - messages: list["ChatMessageMessage"] - output_schema: "JsonSchema" - tools: list["ChatMessageTool"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - driver_configuration = self.driver_configuration.to_dict() - - messages = [] - for messages_item_data in self.messages: - messages_item = messages_item_data.to_dict() - messages.append(messages_item) - - output_schema = self.output_schema.to_dict() - - tools = [] - for tools_item_data in self.tools: - tools_item = tools_item_data.to_dict() - tools.append(tools_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "driver_configuration": driver_configuration, - "messages": messages, - "output_schema": output_schema, - "tools": tools, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_driver_configuration import ChatMessageDriverConfiguration - from ..models.chat_message_message import ChatMessageMessage - from ..models.chat_message_tool import ChatMessageTool - from ..models.json_schema import JsonSchema - - d = dict(src_dict) - driver_configuration = ChatMessageDriverConfiguration.from_dict(d.pop("driver_configuration")) - - messages = [] - _messages = d.pop("messages") - for messages_item_data in _messages: - messages_item = ChatMessageMessage.from_dict(messages_item_data) - - messages.append(messages_item) - - output_schema = JsonSchema.from_dict(d.pop("output_schema")) - - tools = [] - _tools = d.pop("tools") - for tools_item_data in _tools: - tools_item = ChatMessageTool.from_dict(tools_item_data) - - tools.append(tools_item) - - create_chat_message_request_content = cls( - driver_configuration=driver_configuration, - messages=messages, - output_schema=output_schema, - tools=tools, - ) - - create_chat_message_request_content.additional_properties = d - return create_chat_message_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_response_content.py deleted file mode 100644 index 4d569f9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_response_content.py +++ /dev/null @@ -1,99 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.chat_message_usage import ChatMessageUsage - from ..models.message_content import MessageContent - - -T = TypeVar("T", bound="CreateChatMessageResponseContent") - - -@_attrs_define -class CreateChatMessageResponseContent: - """ - Attributes: - content (list['MessageContent']): - role (str): - type_ (str): - usage (ChatMessageUsage): - """ - - content: list["MessageContent"] - role: str - type_: str - usage: "ChatMessageUsage" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - content = [] - for content_item_data in self.content: - content_item = content_item_data.to_dict() - content.append(content_item) - - role = self.role - - type_ = self.type_ - - usage = self.usage.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "content": content, - "role": role, - "type": type_, - "usage": usage, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_usage import ChatMessageUsage - from ..models.message_content import MessageContent - - d = dict(src_dict) - content = [] - _content = d.pop("content") - for content_item_data in _content: - content_item = MessageContent.from_dict(content_item_data) - - content.append(content_item) - - role = d.pop("role") - - type_ = d.pop("type") - - usage = ChatMessageUsage.from_dict(d.pop("usage")) - - create_chat_message_response_content = cls( - content=content, - role=role, - type_=type_, - usage=usage, - ) - - create_chat_message_response_content.additional_properties = d - return create_chat_message_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_request_content.py deleted file mode 100644 index fe76fb8..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_request_content.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.chat_message_driver_configuration import ChatMessageDriverConfiguration - from ..models.chat_message_message import ChatMessageMessage - from ..models.chat_message_tool import ChatMessageTool - from ..models.json_schema import JsonSchema - - -T = TypeVar("T", bound="CreateChatMessageStreamRequestContent") - - -@_attrs_define -class CreateChatMessageStreamRequestContent: - """ - Attributes: - driver_configuration (ChatMessageDriverConfiguration): - messages (list['ChatMessageMessage']): - output_schema (JsonSchema): - tools (list['ChatMessageTool']): - """ - - driver_configuration: "ChatMessageDriverConfiguration" - messages: list["ChatMessageMessage"] - output_schema: "JsonSchema" - tools: list["ChatMessageTool"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - driver_configuration = self.driver_configuration.to_dict() - - messages = [] - for messages_item_data in self.messages: - messages_item = messages_item_data.to_dict() - messages.append(messages_item) - - output_schema = self.output_schema.to_dict() - - tools = [] - for tools_item_data in self.tools: - tools_item = tools_item_data.to_dict() - tools.append(tools_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "driver_configuration": driver_configuration, - "messages": messages, - "output_schema": output_schema, - "tools": tools, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_driver_configuration import ChatMessageDriverConfiguration - from ..models.chat_message_message import ChatMessageMessage - from ..models.chat_message_tool import ChatMessageTool - from ..models.json_schema import JsonSchema - - d = dict(src_dict) - driver_configuration = ChatMessageDriverConfiguration.from_dict(d.pop("driver_configuration")) - - messages = [] - _messages = d.pop("messages") - for messages_item_data in _messages: - messages_item = ChatMessageMessage.from_dict(messages_item_data) - - messages.append(messages_item) - - output_schema = JsonSchema.from_dict(d.pop("output_schema")) - - tools = [] - _tools = d.pop("tools") - for tools_item_data in _tools: - tools_item = ChatMessageTool.from_dict(tools_item_data) - - tools.append(tools_item) - - create_chat_message_stream_request_content = cls( - driver_configuration=driver_configuration, - messages=messages, - output_schema=output_schema, - tools=tools, - ) - - create_chat_message_stream_request_content.additional_properties = d - return create_chat_message_stream_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_response_content.py deleted file mode 100644 index 596e235..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_chat_message_stream_response_content.py +++ /dev/null @@ -1,109 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.chat_message_usage import ChatMessageUsage - from ..models.stream_message_content import StreamMessageContent - - -T = TypeVar("T", bound="CreateChatMessageStreamResponseContent") - - -@_attrs_define -class CreateChatMessageStreamResponseContent: - """ - Attributes: - content (list['StreamMessageContent']): - role (str): - type_ (str): - usage (Union[Unset, ChatMessageUsage]): - """ - - content: list["StreamMessageContent"] - role: str - type_: str - usage: Union[Unset, "ChatMessageUsage"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - content = [] - for content_item_data in self.content: - content_item = content_item_data.to_dict() - content.append(content_item) - - role = self.role - - type_ = self.type_ - - usage: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.usage, Unset): - usage = self.usage.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "content": content, - "role": role, - "type": type_, - } - ) - if usage is not UNSET: - field_dict["usage"] = usage - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.chat_message_usage import ChatMessageUsage - from ..models.stream_message_content import StreamMessageContent - - d = dict(src_dict) - content = [] - _content = d.pop("content") - for content_item_data in _content: - content_item = StreamMessageContent.from_dict(content_item_data) - - content.append(content_item) - - role = d.pop("role") - - type_ = d.pop("type") - - _usage = d.pop("usage", UNSET) - usage: Union[Unset, ChatMessageUsage] - if isinstance(_usage, Unset): - usage = UNSET - else: - usage = ChatMessageUsage.from_dict(_usage) - - create_chat_message_stream_response_content = cls( - content=content, - role=role, - type_=type_, - usage=usage, - ) - - create_chat_message_stream_response_content.additional_properties = d - return create_chat_message_stream_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_request_content.py deleted file mode 100644 index a740a33..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateCheckoutSessionRequestContent") - - -@_attrs_define -class CreateCheckoutSessionRequestContent: - """ - Attributes: - price_lookup_key (str): - """ - - price_lookup_key: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - price_lookup_key = self.price_lookup_key - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "price_lookup_key": price_lookup_key, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - price_lookup_key = d.pop("price_lookup_key") - - create_checkout_session_request_content = cls( - price_lookup_key=price_lookup_key, - ) - - create_checkout_session_request_content.additional_properties = d - return create_checkout_session_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_response_content.py deleted file mode 100644 index cf2fd7e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_checkout_session_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateCheckoutSessionResponseContent") - - -@_attrs_define -class CreateCheckoutSessionResponseContent: - """ - Attributes: - redirect_url (str): - """ - - redirect_url: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - redirect_url = self.redirect_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "redirect_url": redirect_url, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - redirect_url = d.pop("redirect_url") - - create_checkout_session_response_content = cls( - redirect_url=redirect_url, - ) - - create_checkout_session_response_content.additional_properties = d - return create_checkout_session_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_request_content.py deleted file mode 100644 index c129cea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_request_content.py +++ /dev/null @@ -1,96 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.connection_credentials_input_type_0 import ConnectionCredentialsInputType0 - - -T = TypeVar("T", bound="CreateConnectionRequestContent") - - -@_attrs_define -class CreateConnectionRequestContent: - """ - Attributes: - credentials ('ConnectionCredentialsInputType0'): - type_ (str): - name (Union[Unset, str]): - """ - - credentials: "ConnectionCredentialsInputType0" - type_: str - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.connection_credentials_input_type_0 import ConnectionCredentialsInputType0 - - credentials: dict[str, Any] - if isinstance(self.credentials, ConnectionCredentialsInputType0): - credentials = self.credentials.to_dict() - - type_ = self.type_ - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "credentials": credentials, - "type": type_, - } - ) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.connection_credentials_input_type_0 import ConnectionCredentialsInputType0 - - d = dict(src_dict) - - def _parse_credentials(data: object) -> "ConnectionCredentialsInputType0": - if not isinstance(data, dict): - raise TypeError() - componentsschemas_connection_credentials_input_type_0 = ConnectionCredentialsInputType0.from_dict(data) - - return componentsschemas_connection_credentials_input_type_0 - - credentials = _parse_credentials(d.pop("credentials")) - - type_ = d.pop("type") - - name = d.pop("name", UNSET) - - create_connection_request_content = cls( - credentials=credentials, - type_=type_, - name=name, - ) - - create_connection_request_content.additional_properties = d - return create_connection_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_response_content.py deleted file mode 100644 index 7753c20..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_connection_response_content.py +++ /dev/null @@ -1,93 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="CreateConnectionResponseContent") - - -@_attrs_define -class CreateConnectionResponseContent: - """ - Attributes: - connection_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - type_ (str): - """ - - connection_id: str - created_at: datetime.datetime - created_by: str - name: str - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connection_id = self.connection_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_id": connection_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connection_id = d.pop("connection_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - type_ = d.pop("type") - - create_connection_response_content = cls( - connection_id=connection_id, - created_at=created_at, - created_by=created_by, - name=name, - type_=type_, - ) - - create_connection_response_content.additional_properties = d - return create_connection_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_request_content.py deleted file mode 100644 index 45570c2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_request_content.py +++ /dev/null @@ -1,228 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - from ..models.data_connector_config_input_union_type_5 import DataConnectorConfigInputUnionType5 - from ..models.transform_input import TransformInput - - -T = TypeVar("T", bound="CreateDataConnectorRequestContent") - - -@_attrs_define -class CreateDataConnectorRequestContent: - """ - Attributes: - config (Union['DataConnectorConfigInputUnionType0', 'DataConnectorConfigInputUnionType1', - 'DataConnectorConfigInputUnionType2', 'DataConnectorConfigInputUnionType3', - 'DataConnectorConfigInputUnionType4', 'DataConnectorConfigInputUnionType5']): - name (str): - type_ (str): - description (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformInput']]): - """ - - config: Union[ - "DataConnectorConfigInputUnionType0", - "DataConnectorConfigInputUnionType1", - "DataConnectorConfigInputUnionType2", - "DataConnectorConfigInputUnionType3", - "DataConnectorConfigInputUnionType4", - "DataConnectorConfigInputUnionType5", - ] - name: str - type_: str - description: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformInput"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - - config: dict[str, Any] - if isinstance(self.config, DataConnectorConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - name = self.name - - type_ = self.type_ - - description = self.description - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "name": name, - "type": type_, - } - ) - if description is not UNSET: - field_dict["description"] = description - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - from ..models.data_connector_config_input_union_type_5 import DataConnectorConfigInputUnionType5 - from ..models.transform_input import TransformInput - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigInputUnionType0", - "DataConnectorConfigInputUnionType1", - "DataConnectorConfigInputUnionType2", - "DataConnectorConfigInputUnionType3", - "DataConnectorConfigInputUnionType4", - "DataConnectorConfigInputUnionType5", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_0 = ( - DataConnectorConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_1 = ( - DataConnectorConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_2 = ( - DataConnectorConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_3 = ( - DataConnectorConfigInputUnionType3.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_4 = ( - DataConnectorConfigInputUnionType4.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_5 = DataConnectorConfigInputUnionType5.from_dict( - data - ) - - return componentsschemas_data_connector_config_input_union_type_5 - - config = _parse_config(d.pop("config")) - - name = d.pop("name") - - type_ = d.pop("type") - - description = d.pop("description", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformInput.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - create_data_connector_request_content = cls( - config=config, - name=name, - type_=type_, - description=description, - schedule_expression=schedule_expression, - transforms=transforms, - ) - - create_data_connector_request_content.additional_properties = d - return create_data_connector_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_response_content.py deleted file mode 100644 index 016d266..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_connector_response_content.py +++ /dev/null @@ -1,237 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - - -T = TypeVar("T", bound="CreateDataConnectorResponseContent") - - -@_attrs_define -class CreateDataConnectorResponseContent: - """ - Attributes: - config (Union['DataConnectorConfigUnionType0', 'DataConnectorConfigUnionType1', 'DataConnectorConfigUnionType2', - 'DataConnectorConfigUnionType3', 'DataConnectorConfigUnionType4', 'DataConnectorConfigUnionType5']): - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - name (str): - type_ (str): - updated_at (datetime.datetime): - data_job_id (Union[Unset, str]): - description (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - """ - - config: Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ] - created_at: datetime.datetime - created_by: str - data_connector_id: str - name: str - type_: str - updated_at: datetime.datetime - data_job_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - - config: dict[str, Any] - if isinstance(self.config, DataConnectorConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - name = self.name - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - data_job_id = self.data_job_id - - description = self.description - - schedule_expression = self.schedule_expression - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "name": name, - "type": type_, - "updated_at": updated_at, - } - ) - if data_job_id is not UNSET: - field_dict["data_job_id"] = data_job_id - if description is not UNSET: - field_dict["description"] = description - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_0 = DataConnectorConfigUnionType0.from_dict(data) - - return componentsschemas_data_connector_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_1 = DataConnectorConfigUnionType1.from_dict(data) - - return componentsschemas_data_connector_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_2 = DataConnectorConfigUnionType2.from_dict(data) - - return componentsschemas_data_connector_config_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_3 = DataConnectorConfigUnionType3.from_dict(data) - - return componentsschemas_data_connector_config_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_4 = DataConnectorConfigUnionType4.from_dict(data) - - return componentsschemas_data_connector_config_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_5 = DataConnectorConfigUnionType5.from_dict(data) - - return componentsschemas_data_connector_config_union_type_5 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - name = d.pop("name") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - data_job_id = d.pop("data_job_id", UNSET) - - description = d.pop("description", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - create_data_connector_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - name=name, - type_=type_, - updated_at=updated_at, - data_job_id=data_job_id, - description=description, - schedule_expression=schedule_expression, - ) - - create_data_connector_response_content.additional_properties = d - return create_data_connector_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_job_response_content.py deleted file mode 100644 index ce48136..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_data_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.data_job_status import DataJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="CreateDataJobResponseContent") - - -@_attrs_define -class CreateDataJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - data_job_id (str): - status (DataJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - data_connector_id: str - data_job_id: str - status: DataJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - data_job_id = self.data_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "data_job_id": data_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - data_job_id = d.pop("data_job_id") - - status = DataJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - create_data_job_response_content = cls( - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - data_job_id=data_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - create_data_job_response_content.additional_properties = d - return create_data_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_events_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_events_request_content.py deleted file mode 100644 index 0f3a7dd..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_events_request_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.event_input import EventInput - - -T = TypeVar("T", bound="CreateEventsRequestContent") - - -@_attrs_define -class CreateEventsRequestContent: - """ - Attributes: - events (Union[Unset, list['EventInput']]): - """ - - events: Union[Unset, list["EventInput"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - events: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.events, Unset): - events = [] - for events_item_data in self.events: - events_item = events_item_data.to_dict() - events.append(events_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if events is not UNSET: - field_dict["events"] = events - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.event_input import EventInput - - d = dict(src_dict) - events = [] - _events = d.pop("events", UNSET) - for events_item_data in _events or []: - events_item = EventInput.from_dict(events_item_data) - - events.append(events_item) - - create_events_request_content = cls( - events=events, - ) - - create_events_request_content.additional_properties = d - return create_events_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_request_content.py deleted file mode 100644 index e7de6ad..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_request_content.py +++ /dev/null @@ -1,88 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.code_source_input_type_0 import CodeSourceInputType0 - - -T = TypeVar("T", bound="CreateFunctionDeploymentRequestContent") - - -@_attrs_define -class CreateFunctionDeploymentRequestContent: - """ - Attributes: - code_source (Union['CodeSourceInputType0', Unset]): - force (Union[Unset, bool]): - """ - - code_source: Union["CodeSourceInputType0", Unset] = UNSET - force: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - code_source: Union[Unset, dict[str, Any]] - if isinstance(self.code_source, Unset): - code_source = UNSET - else: - code_source = self.code_source.to_dict() - - force = self.force - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code_source is not UNSET: - field_dict["code_source"] = code_source - if force is not UNSET: - field_dict["force"] = force - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_input_type_0 import CodeSourceInputType0 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceInputType0", Unset]: - if isinstance(data, Unset): - return data - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_input_type_0 = CodeSourceInputType0.from_dict(data) - - return componentsschemas_code_source_input_type_0 - - code_source = _parse_code_source(d.pop("code_source", UNSET)) - - force = d.pop("force", UNSET) - - create_function_deployment_request_content = cls( - code_source=code_source, - force=force, - ) - - create_function_deployment_request_content.additional_properties = d - return create_function_deployment_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_response_content.py deleted file mode 100644 index 8c4e8e2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_deployment_response_content.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="CreateFunctionDeploymentResponseContent") - - -@_attrs_define -class CreateFunctionDeploymentResponseContent: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - function_id (str): - status (DeploymentStatus): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - function_id: str - status: DeploymentStatus - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - function_id = self.function_id - - status = self.status.value - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "function_id": function_id, - "status": status, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - function_id = d.pop("function_id") - - status = DeploymentStatus(d.pop("status")) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - create_function_deployment_response_content = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - function_id=function_id, - status=status, - completed_at=completed_at, - status_detail=status_detail, - ) - - create_function_deployment_response_content.additional_properties = d - return create_function_deployment_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_request_content.py deleted file mode 100644 index b067d77..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_request_content.py +++ /dev/null @@ -1,155 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="CreateFunctionRequestContent") - - -@_attrs_define -class CreateFunctionRequestContent: - """ - Attributes: - name (str): - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - function_config_file (Union[Unset, str]): - """ - - name: str - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - function_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - name = self.name - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_config_file = self.function_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - name = d.pop("name") - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_config_file = d.pop("function_config_file", UNSET) - - create_function_request_content = cls( - name=name, - code=code, - description=description, - env_vars=env_vars, - function_config_file=function_config_file, - ) - - create_function_request_content.additional_properties = d - return create_function_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_response_content.py deleted file mode 100644 index 6c671c4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_function_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="CreateFunctionResponseContent") - - -@_attrs_define -class CreateFunctionResponseContent: - """ - Attributes: - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - function_id (str): - latest_deployment_id (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - function_config_file (Union[Unset, str]): - """ - - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - function_id: str - latest_deployment_id: str - name: str - organization_id: str - updated_at: datetime.datetime - function_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - code: dict[str, Any] - if isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_id = self.function_id - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - function_config_file = self.function_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "function_id": function_id, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_id = d.pop("function_id") - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - function_config_file = d.pop("function_config_file", UNSET) - - create_function_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - function_id=function_id, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - updated_at=updated_at, - function_config_file=function_config_file, - ) - - create_function_response_content.additional_properties = d - return create_function_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_request_content.py deleted file mode 100644 index c42aba0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_request_content.py +++ /dev/null @@ -1,163 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.integration_type import IntegrationType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - from ..models.integration_config_input_union_type_2 import IntegrationConfigInputUnionType2 - - -T = TypeVar("T", bound="CreateIntegrationRequestContent") - - -@_attrs_define -class CreateIntegrationRequestContent: - """ - Attributes: - config (Union['IntegrationConfigInputUnionType0', 'IntegrationConfigInputUnionType1', - 'IntegrationConfigInputUnionType2']): - name (str): - type_ (IntegrationType): - assistant_ids (Union[Unset, list[str]]): - description (Union[Unset, str]): - structure_ids (Union[Unset, list[str]]): - """ - - config: Union[ - "IntegrationConfigInputUnionType0", "IntegrationConfigInputUnionType1", "IntegrationConfigInputUnionType2" - ] - name: str - type_: IntegrationType - assistant_ids: Union[Unset, list[str]] = UNSET - description: Union[Unset, str] = UNSET - structure_ids: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - - config: dict[str, Any] - if isinstance(self.config, IntegrationConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigInputUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - name = self.name - - type_ = self.type_.value - - assistant_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.assistant_ids, Unset): - assistant_ids = self.assistant_ids - - description = self.description - - structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.structure_ids, Unset): - structure_ids = self.structure_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "name": name, - "type": type_, - } - ) - if assistant_ids is not UNSET: - field_dict["assistant_ids"] = assistant_ids - if description is not UNSET: - field_dict["description"] = description - if structure_ids is not UNSET: - field_dict["structure_ids"] = structure_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - from ..models.integration_config_input_union_type_2 import IntegrationConfigInputUnionType2 - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "IntegrationConfigInputUnionType0", "IntegrationConfigInputUnionType1", "IntegrationConfigInputUnionType2" - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_0 = IntegrationConfigInputUnionType0.from_dict( - data - ) - - return componentsschemas_integration_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_1 = IntegrationConfigInputUnionType1.from_dict( - data - ) - - return componentsschemas_integration_config_input_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_2 = IntegrationConfigInputUnionType2.from_dict(data) - - return componentsschemas_integration_config_input_union_type_2 - - config = _parse_config(d.pop("config")) - - name = d.pop("name") - - type_ = IntegrationType(d.pop("type")) - - assistant_ids = cast(list[str], d.pop("assistant_ids", UNSET)) - - description = d.pop("description", UNSET) - - structure_ids = cast(list[str], d.pop("structure_ids", UNSET)) - - create_integration_request_content = cls( - config=config, - name=name, - type_=type_, - assistant_ids=assistant_ids, - description=description, - structure_ids=structure_ids, - ) - - create_integration_request_content.additional_properties = d - return create_integration_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_response_content.py deleted file mode 100644 index d258f57..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_integration_response_content.py +++ /dev/null @@ -1,187 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.integration_type import IntegrationType - -if TYPE_CHECKING: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - -T = TypeVar("T", bound="CreateIntegrationResponseContent") - - -@_attrs_define -class CreateIntegrationResponseContent: - """ - Attributes: - assistant_ids (list[str]): - config (Union['IntegrationConfigUnionType0', 'IntegrationConfigUnionType1', 'IntegrationConfigUnionType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - integration_id (str): - name (str): - organization_id (str): - structure_ids (list[str]): - type_ (IntegrationType): - updated_at (datetime.datetime): - """ - - assistant_ids: list[str] - config: Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"] - created_at: datetime.datetime - created_by: str - description: str - integration_id: str - name: str - organization_id: str - structure_ids: list[str] - type_: IntegrationType - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - - assistant_ids = self.assistant_ids - - config: dict[str, Any] - if isinstance(self.config, IntegrationConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - integration_id = self.integration_id - - name = self.name - - organization_id = self.organization_id - - structure_ids = self.structure_ids - - type_ = self.type_.value - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_ids": assistant_ids, - "config": config, - "created_at": created_at, - "created_by": created_by, - "description": description, - "integration_id": integration_id, - "name": name, - "organization_id": organization_id, - "structure_ids": structure_ids, - "type": type_, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - d = dict(src_dict) - assistant_ids = cast(list[str], d.pop("assistant_ids")) - - def _parse_config( - data: object, - ) -> Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_0 = IntegrationConfigUnionType0.from_dict(data) - - return componentsschemas_integration_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_1 = IntegrationConfigUnionType1.from_dict(data) - - return componentsschemas_integration_config_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_2 = IntegrationConfigUnionType2.from_dict(data) - - return componentsschemas_integration_config_union_type_2 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - integration_id = d.pop("integration_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - type_ = IntegrationType(d.pop("type")) - - updated_at = isoparse(d.pop("updated_at")) - - create_integration_response_content = cls( - assistant_ids=assistant_ids, - config=config, - created_at=created_at, - created_by=created_by, - description=description, - integration_id=integration_id, - name=name, - organization_id=organization_id, - structure_ids=structure_ids, - type_=type_, - updated_at=updated_at, - ) - - create_integration_response_content.additional_properties = d - return create_integration_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_request_content.py deleted file mode 100644 index 0c12c32..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateInviteRequestContent") - - -@_attrs_define -class CreateInviteRequestContent: - """ - Attributes: - email (str): - """ - - email: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - email = self.email - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "email": email, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - email = d.pop("email") - - create_invite_request_content = cls( - email=email, - ) - - create_invite_request_content.additional_properties = d - return create_invite_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_response_content.py deleted file mode 100644 index 593d62c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_invite_response_content.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.invite_status import InviteStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreateInviteResponseContent") - - -@_attrs_define -class CreateInviteResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - email (str): - expires_at (datetime.datetime): - invite_id (str): - organization_id (str): - status (InviteStatus): - responded_at (Union[Unset, datetime.datetime]): - """ - - created_at: datetime.datetime - created_by: str - email: str - expires_at: datetime.datetime - invite_id: str - organization_id: str - status: InviteStatus - responded_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - email = self.email - - expires_at = self.expires_at.isoformat() - - invite_id = self.invite_id - - organization_id = self.organization_id - - status = self.status.value - - responded_at: Union[Unset, str] = UNSET - if not isinstance(self.responded_at, Unset): - responded_at = self.responded_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "email": email, - "expires_at": expires_at, - "invite_id": invite_id, - "organization_id": organization_id, - "status": status, - } - ) - if responded_at is not UNSET: - field_dict["responded_at"] = responded_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - email = d.pop("email") - - expires_at = isoparse(d.pop("expires_at")) - - invite_id = d.pop("invite_id") - - organization_id = d.pop("organization_id") - - status = InviteStatus(d.pop("status")) - - _responded_at = d.pop("responded_at", UNSET) - responded_at: Union[Unset, datetime.datetime] - if isinstance(_responded_at, Unset): - responded_at = UNSET - else: - responded_at = isoparse(_responded_at) - - create_invite_response_content = cls( - created_at=created_at, - created_by=created_by, - email=email, - expires_at=expires_at, - invite_id=invite_id, - organization_id=organization_id, - status=status, - responded_at=responded_at, - ) - - create_invite_response_content.additional_properties = d - return create_invite_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_job_response_content.py deleted file mode 100644 index 8eecc45..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.knowledge_base_job_status import KnowledgeBaseJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="CreateKnowledgeBaseJobResponseContent") - - -@_attrs_define -class CreateKnowledgeBaseJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_job_id (str): - status (KnowledgeBaseJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_job_id: str - status: KnowledgeBaseJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_job_id = self.knowledge_base_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_job_id": knowledge_base_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_job_id = d.pop("knowledge_base_job_id") - - status = KnowledgeBaseJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - create_knowledge_base_job_response_content = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_job_id=knowledge_base_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - create_knowledge_base_job_response_content.additional_properties = d - return create_knowledge_base_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_request_content.py deleted file mode 100644 index db45199..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_request_content.py +++ /dev/null @@ -1,221 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="CreateKnowledgeBaseRequestContent") - - -@_attrs_define -class CreateKnowledgeBaseRequestContent: - """ - Attributes: - config (Union['KnowledgeBaseConfigInputUnionType0', 'KnowledgeBaseConfigInputUnionType1', - 'KnowledgeBaseConfigInputUnionType2', 'KnowledgeBaseConfigInputUnionType3']): - name (str): - type_ (str): - asset_paths (Union[Unset, list[str]]): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - config: Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ] - name: str - type_: str - asset_paths: Union[Unset, list[str]] = UNSET - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigInputUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigInputUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - name = self.name - - type_ = self.type_ - - asset_paths: Union[Unset, list[str]] = UNSET - if not isinstance(self.asset_paths, Unset): - asset_paths = self.asset_paths - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "name": name, - "type": type_, - } - ) - if asset_paths is not UNSET: - field_dict["asset_paths"] = asset_paths - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_0 = ( - KnowledgeBaseConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_1 = ( - KnowledgeBaseConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_2 = ( - KnowledgeBaseConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_3 = KnowledgeBaseConfigInputUnionType3.from_dict( - data - ) - - return componentsschemas_knowledge_base_config_input_union_type_3 - - config = _parse_config(d.pop("config")) - - name = d.pop("name") - - type_ = d.pop("type") - - asset_paths = cast(list[str], d.pop("asset_paths", UNSET)) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - create_knowledge_base_request_content = cls( - config=config, - name=name, - type_=type_, - asset_paths=asset_paths, - description=description, - embedding_model=embedding_model, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - create_knowledge_base_request_content.additional_properties = d - return create_knowledge_base_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_response_content.py deleted file mode 100644 index 8a72428..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_knowledge_base_response_content.py +++ /dev/null @@ -1,260 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="CreateKnowledgeBaseResponseContent") - - -@_attrs_define -class CreateKnowledgeBaseResponseContent: - """ - Attributes: - asset_paths (list[str]): - config (Union['KnowledgeBaseConfigUnionType0', 'KnowledgeBaseConfigUnionType1', 'KnowledgeBaseConfigUnionType2', - 'KnowledgeBaseConfigUnionType3']): - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - asset_paths: list[str] - config: Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ] - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - - asset_paths = self.asset_paths - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_paths": asset_paths, - "config": config, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - asset_paths = cast(list[str], d.pop("asset_paths")) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_0 = KnowledgeBaseConfigUnionType0.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_1 = KnowledgeBaseConfigUnionType1.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_2 = KnowledgeBaseConfigUnionType2.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_3 = KnowledgeBaseConfigUnionType3.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_3 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - create_knowledge_base_response_content = cls( - asset_paths=asset_paths, - config=config, - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - description=description, - embedding_model=embedding_model, - schedule_expression=schedule_expression, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - create_knowledge_base_response_content.additional_properties = d - return create_knowledge_base_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_request_content.py deleted file mode 100644 index 8738d3c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_request_content.py +++ /dev/null @@ -1,174 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - - -T = TypeVar("T", bound="CreateLibraryRequestContent") - - -@_attrs_define -class CreateLibraryRequestContent: - """ - Attributes: - data_connector_ids (list[str]): - knowledge_base_configs (list[Union['KnowledgeBaseConfigInputUnionType0', 'KnowledgeBaseConfigInputUnionType1', - 'KnowledgeBaseConfigInputUnionType2', 'KnowledgeBaseConfigInputUnionType3']]): - name (str): - description (Union[Unset, str]): - """ - - data_connector_ids: list[str] - knowledge_base_configs: list[ - Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ] - ] - name: str - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - - data_connector_ids = self.data_connector_ids - - knowledge_base_configs = [] - for knowledge_base_configs_item_data in self.knowledge_base_configs: - knowledge_base_configs_item: dict[str, Any] - if isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType0): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - elif isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType1): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - elif isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType2): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - else: - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - - knowledge_base_configs.append(knowledge_base_configs_item) - - name = self.name - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_connector_ids": data_connector_ids, - "knowledge_base_configs": knowledge_base_configs, - "name": name, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - - d = dict(src_dict) - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_configs = [] - _knowledge_base_configs = d.pop("knowledge_base_configs") - for knowledge_base_configs_item_data in _knowledge_base_configs: - - def _parse_knowledge_base_configs_item( - data: object, - ) -> Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_0 = ( - KnowledgeBaseConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_1 = ( - KnowledgeBaseConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_2 = ( - KnowledgeBaseConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_3 = ( - KnowledgeBaseConfigInputUnionType3.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_3 - - knowledge_base_configs_item = _parse_knowledge_base_configs_item(knowledge_base_configs_item_data) - - knowledge_base_configs.append(knowledge_base_configs_item) - - name = d.pop("name") - - description = d.pop("description", UNSET) - - create_library_request_content = cls( - data_connector_ids=data_connector_ids, - knowledge_base_configs=knowledge_base_configs, - name=name, - description=description, - ) - - create_library_request_content.additional_properties = d - return create_library_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_response_content.py deleted file mode 100644 index 2778931..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_library_response_content.py +++ /dev/null @@ -1,144 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="CreateLibraryResponseContent") - - -@_attrs_define -class CreateLibraryResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - data_connector_ids (list[str]): - knowledge_base_ids (list[str]): - library_id (str): - name (str): - organization_id (str): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - data_connector_ids: list[str] - knowledge_base_ids: list[str] - library_id: str - name: str - organization_id: str - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_ids = self.data_connector_ids - - knowledge_base_ids = self.knowledge_base_ids - - library_id = self.library_id - - name = self.name - - organization_id = self.organization_id - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "data_connector_ids": data_connector_ids, - "knowledge_base_ids": knowledge_base_ids, - "library_id": library_id, - "name": name, - "organization_id": organization_id, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - library_id = d.pop("library_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - create_library_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - data_connector_ids=data_connector_ids, - knowledge_base_ids=knowledge_base_ids, - library_id=library_id, - name=name, - organization_id=organization_id, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - create_library_response_content.additional_properties = d - return create_library_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_request_content.py deleted file mode 100644 index 5fcc122..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_request_content.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="CreateMessageRequestContent") - - -@_attrs_define -class CreateMessageRequestContent: - """ - Attributes: - input_ (str): - output (str): - metadata (Union[Unset, Metadata]): - """ - - input_: str - output: str - metadata: Union[Unset, "Metadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_ = self.input_ - - output = self.output - - 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( - { - "input": input_, - "output": output, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - input_ = d.pop("input") - - output = d.pop("output") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - create_message_request_content = cls( - input_=input_, - output=output, - metadata=metadata, - ) - - create_message_request_content.additional_properties = d - return create_message_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_response_content.py deleted file mode 100644 index 1de4f56..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_message_response_content.py +++ /dev/null @@ -1,131 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateMessageResponseContent") - - -@_attrs_define -class CreateMessageResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - index (float): - input_ (str): - message_id (str): - metadata (Metadata): - output (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - index: float - input_: str - message_id: str - metadata: "Metadata" - output: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - index = self.index - - input_ = self.input_ - - message_id = self.message_id - - metadata = self.metadata.to_dict() - - output = self.output - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "index": index, - "input": input_, - "message_id": message_id, - "metadata": metadata, - "output": output, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - index = d.pop("index") - - input_ = d.pop("input") - - message_id = d.pop("message_id") - - metadata = Metadata.from_dict(d.pop("metadata")) - - output = d.pop("output") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_message_response_content = cls( - created_at=created_at, - created_by=created_by, - index=index, - input_=input_, - message_id=message_id, - metadata=metadata, - output=output, - thread_id=thread_id, - updated_at=updated_at, - ) - - create_message_response_content.additional_properties = d - return create_message_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_nodes_usage_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_nodes_usage_request_content.py deleted file mode 100644 index 9611b80..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_nodes_usage_request_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="CreateNodesUsageRequestContent") - - -@_attrs_define -class CreateNodesUsageRequestContent: - """ - Attributes: - type_ (str): - volume (Union[Unset, float]): - """ - - type_: str - volume: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - type_ = self.type_ - - volume = self.volume - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type_, - } - ) - if volume is not UNSET: - field_dict["volume"] = volume - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - type_ = d.pop("type") - - volume = d.pop("volume", UNSET) - - create_nodes_usage_request_content = cls( - type_=type_, - volume=volume, - ) - - create_nodes_usage_request_content.additional_properties = d - return create_nodes_usage_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_request_content.py deleted file mode 100644 index 92ee993..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateOrganizationApiKeyRequestContent") - - -@_attrs_define -class CreateOrganizationApiKeyRequestContent: - """ - Attributes: - name (str): - """ - - name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - create_organization_api_key_request_content = cls( - name=name, - ) - - create_organization_api_key_request_content.additional_properties = d - return create_organization_api_key_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_response_content.py deleted file mode 100644 index 523f8ef..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_api_key_response_content.py +++ /dev/null @@ -1,125 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="CreateOrganizationApiKeyResponseContent") - - -@_attrs_define -class CreateOrganizationApiKeyResponseContent: - """ - Attributes: - active (bool): - api_key_id (str): - created_at (datetime.datetime): - created_by (str): - last_used (datetime.datetime): - name (str): - organization_id (str): - updated_at (datetime.datetime): - value (str): - """ - - active: bool - api_key_id: str - created_at: datetime.datetime - created_by: str - last_used: datetime.datetime - name: str - organization_id: str - updated_at: datetime.datetime - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active = self.active - - api_key_id = self.api_key_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "active": active, - "api_key_id": api_key_id, - "created_at": created_at, - "created_by": created_by, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active = d.pop("active") - - api_key_id = d.pop("api_key_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - value = d.pop("value") - - create_organization_api_key_response_content = cls( - active=active, - api_key_id=api_key_id, - created_at=created_at, - created_by=created_by, - last_used=last_used, - name=name, - organization_id=organization_id, - updated_at=updated_at, - value=value, - ) - - create_organization_api_key_response_content.additional_properties = d - return create_organization_api_key_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_request_content.py deleted file mode 100644 index 05061af..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_organization_request_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="CreateOrganizationRequestContent") - - -@_attrs_define -class CreateOrganizationRequestContent: - """ - Attributes: - name (str): - description (Union[Unset, str]): - """ - - name: str - description: Union[Unset, str] = 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 - - 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 - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - description = d.pop("description", UNSET) - - create_organization_request_content = cls( - name=name, - description=description, - ) - - create_organization_request_content.additional_properties = d - return create_organization_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_request_content.py deleted file mode 100644 index 560803d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_request_content.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="CreateRetrieverComponentRequestContent") - - -@_attrs_define -class CreateRetrieverComponentRequestContent: - """ - Attributes: - config (Any): - name (str): - type_ (str): - description (Union[Unset, str]): - """ - - config: Any - name: str - type_: str - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config = self.config - - name = self.name - - type_ = self.type_ - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "name": name, - "type": type_, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - name = d.pop("name") - - type_ = d.pop("type") - - description = d.pop("description", UNSET) - - create_retriever_component_request_content = cls( - config=config, - name=name, - type_=type_, - description=description, - ) - - create_retriever_component_request_content.additional_properties = d - return create_retriever_component_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_response_content.py deleted file mode 100644 index 0549b05..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_component_response_content.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="CreateRetrieverComponentResponseContent") - - -@_attrs_define -class CreateRetrieverComponentResponseContent: - """ - Attributes: - config (Any): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_component_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - config: Any - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_component_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config = self.config - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_component_id = self.retriever_component_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_component_id": retriever_component_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_component_id = d.pop("retriever_component_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - create_retriever_component_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_component_id=retriever_component_id, - type_=type_, - updated_at=updated_at, - description=description, - ) - - create_retriever_component_response_content.additional_properties = d - return create_retriever_component_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_request_content.py deleted file mode 100644 index dbb0f9f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_request_content.py +++ /dev/null @@ -1,106 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.retriever_component_input import RetrieverComponentInput - - -T = TypeVar("T", bound="CreateRetrieverRequestContent") - - -@_attrs_define -class CreateRetrieverRequestContent: - """ - Attributes: - name (str): - description (Union[Unset, str]): - retriever_component_ids (Union[Unset, list[str]]): - retriever_components (Union[Unset, list['RetrieverComponentInput']]): - """ - - name: str - description: Union[Unset, str] = UNSET - retriever_component_ids: Union[Unset, list[str]] = UNSET - retriever_components: Union[Unset, list["RetrieverComponentInput"]] = 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 - - retriever_component_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.retriever_component_ids, Unset): - retriever_component_ids = self.retriever_component_ids - - retriever_components: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.retriever_components, Unset): - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - 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 retriever_component_ids is not UNSET: - field_dict["retriever_component_ids"] = retriever_component_ids - if retriever_components is not UNSET: - field_dict["retriever_components"] = retriever_components - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_input import RetrieverComponentInput - - d = dict(src_dict) - name = d.pop("name") - - description = d.pop("description", UNSET) - - retriever_component_ids = cast(list[str], d.pop("retriever_component_ids", UNSET)) - - retriever_components = [] - _retriever_components = d.pop("retriever_components", UNSET) - for retriever_components_item_data in _retriever_components or []: - retriever_components_item = RetrieverComponentInput.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - create_retriever_request_content = cls( - name=name, - description=description, - retriever_component_ids=retriever_component_ids, - retriever_components=retriever_components, - ) - - create_retriever_request_content.additional_properties = d - return create_retriever_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_response_content.py deleted file mode 100644 index daad1c1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_retriever_response_content.py +++ /dev/null @@ -1,142 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.retriever_component_detail import RetrieverComponentDetail - - -T = TypeVar("T", bound="CreateRetrieverResponseContent") - - -@_attrs_define -class CreateRetrieverResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_components (list['RetrieverComponentDetail']): - retriever_components_schema (Any): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_components: list["RetrieverComponentDetail"] - retriever_components_schema: Any - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - retriever_components_schema = self.retriever_components_schema - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_components": retriever_components, - "retriever_components_schema": retriever_components_schema, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_detail import RetrieverComponentDetail - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_components = [] - _retriever_components = d.pop("retriever_components") - for retriever_components_item_data in _retriever_components: - retriever_components_item = RetrieverComponentDetail.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - retriever_components_schema = d.pop("retriever_components_schema") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - create_retriever_response_content = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_components=retriever_components, - retriever_components_schema=retriever_components_schema, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - create_retriever_response_content.additional_properties = d - return create_retriever_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_request_content.py deleted file mode 100644 index 3dfc143..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_request_content.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="CreateRuleRequestContent") - - -@_attrs_define -class CreateRuleRequestContent: - """ - Attributes: - name (str): - rule (str): - metadata (Union[Unset, Metadata]): - """ - - name: str - rule: str - metadata: Union[Unset, "Metadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - rule = self.rule - - 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( - { - "name": name, - "rule": rule, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - name = d.pop("name") - - rule = d.pop("rule") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - create_rule_request_content = cls( - name=name, - rule=rule, - metadata=metadata, - ) - - create_rule_request_content.additional_properties = d - return create_rule_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_response_content.py deleted file mode 100644 index 0364804..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_rule_response_content.py +++ /dev/null @@ -1,123 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateRuleResponseContent") - - -@_attrs_define -class CreateRuleResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - metadata (Metadata): - name (str): - organization_id (str): - rule (str): - rule_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - metadata: "Metadata" - name: str - organization_id: str - rule: str - rule_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule = self.rule - - rule_id = self.rule_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule": rule, - "rule_id": rule_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule = d.pop("rule") - - rule_id = d.pop("rule_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_rule_response_content = cls( - created_at=created_at, - created_by=created_by, - metadata=metadata, - name=name, - organization_id=organization_id, - rule=rule, - rule_id=rule_id, - updated_at=updated_at, - ) - - create_rule_response_content.additional_properties = d - return create_rule_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_request_content.py deleted file mode 100644 index f8394a0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_request_content.py +++ /dev/null @@ -1,112 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="CreateRulesetRequestContent") - - -@_attrs_define -class CreateRulesetRequestContent: - """ - Attributes: - name (str): - alias (Union[Unset, str]): - description (Union[Unset, str]): - metadata (Union[Unset, Metadata]): - rule_ids (Union[Unset, list[str]]): - """ - - name: str - alias: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - metadata: Union[Unset, "Metadata"] = UNSET - rule_ids: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - alias = self.alias - - description = self.description - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - rule_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.rule_ids, Unset): - rule_ids = self.rule_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if alias is not UNSET: - field_dict["alias"] = alias - if description is not UNSET: - field_dict["description"] = description - if metadata is not UNSET: - field_dict["metadata"] = metadata - if rule_ids is not UNSET: - field_dict["rule_ids"] = rule_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - name = d.pop("name") - - alias = d.pop("alias", UNSET) - - description = d.pop("description", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - rule_ids = cast(list[str], d.pop("rule_ids", UNSET)) - - create_ruleset_request_content = cls( - name=name, - alias=alias, - description=description, - metadata=metadata, - rule_ids=rule_ids, - ) - - create_ruleset_request_content.additional_properties = d - return create_ruleset_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_response_content.py deleted file mode 100644 index a9ddf7f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_ruleset_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateRulesetResponseContent") - - -@_attrs_define -class CreateRulesetResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - description (str): - metadata (Metadata): - name (str): - organization_id (str): - rule_ids (list[str]): - ruleset_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - description: str - metadata: "Metadata" - name: str - organization_id: str - rule_ids: list[str] - ruleset_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule_ids = self.rule_ids - - ruleset_id = self.ruleset_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "description": description, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule_ids": rule_ids, - "ruleset_id": ruleset_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule_ids = cast(list[str], d.pop("rule_ids")) - - ruleset_id = d.pop("ruleset_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_ruleset_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - description=description, - metadata=metadata, - name=name, - organization_id=organization_id, - rule_ids=rule_ids, - ruleset_id=ruleset_id, - updated_at=updated_at, - ) - - create_ruleset_response_content.additional_properties = d - return create_ruleset_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_request_content.py deleted file mode 100644 index d2ca533..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_request_content.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CreateSecretRequestContent") - - -@_attrs_define -class CreateSecretRequestContent: - """ - Attributes: - name (str): - value (str): - """ - - name: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - value = d.pop("value") - - create_secret_request_content = cls( - name=name, - value=value, - ) - - create_secret_request_content.additional_properties = d - return create_secret_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_response_content.py deleted file mode 100644 index 96c98cb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_secret_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="CreateSecretResponseContent") - - -@_attrs_define -class CreateSecretResponseContent: - """ - Attributes: - created_at (datetime.datetime): - last_used (datetime.datetime): - name (str): - organization_id (str): - secret_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - last_used: datetime.datetime - name: str - organization_id: str - secret_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - secret_id = self.secret_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "secret_id": secret_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - secret_id = d.pop("secret_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_secret_response_content = cls( - created_at=created_at, - last_used=last_used, - name=name, - organization_id=organization_id, - secret_id=secret_id, - updated_at=updated_at, - ) - - create_secret_response_content.additional_properties = d - return create_secret_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_request_content.py deleted file mode 100644 index 501d1d6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_request_content.py +++ /dev/null @@ -1,88 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.code_source_input_type_0 import CodeSourceInputType0 - - -T = TypeVar("T", bound="CreateStructureDeploymentRequestContent") - - -@_attrs_define -class CreateStructureDeploymentRequestContent: - """ - Attributes: - code_source (Union['CodeSourceInputType0', Unset]): - force (Union[Unset, bool]): - """ - - code_source: Union["CodeSourceInputType0", Unset] = UNSET - force: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - code_source: Union[Unset, dict[str, Any]] - if isinstance(self.code_source, Unset): - code_source = UNSET - else: - code_source = self.code_source.to_dict() - - force = self.force - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code_source is not UNSET: - field_dict["code_source"] = code_source - if force is not UNSET: - field_dict["force"] = force - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_input_type_0 import CodeSourceInputType0 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceInputType0", Unset]: - if isinstance(data, Unset): - return data - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_input_type_0 = CodeSourceInputType0.from_dict(data) - - return componentsschemas_code_source_input_type_0 - - code_source = _parse_code_source(d.pop("code_source", UNSET)) - - force = d.pop("force", UNSET) - - create_structure_deployment_request_content = cls( - code_source=code_source, - force=force, - ) - - create_structure_deployment_request_content.additional_properties = d - return create_structure_deployment_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_response_content.py deleted file mode 100644 index 9019f74..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_deployment_response_content.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="CreateStructureDeploymentResponseContent") - - -@_attrs_define -class CreateStructureDeploymentResponseContent: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - status (DeploymentStatus): - structure_id (str): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - status: DeploymentStatus - structure_id: str - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - status = self.status.value - - structure_id = self.structure_id - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "status": status, - "structure_id": structure_id, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - status = DeploymentStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - create_structure_deployment_response_content = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - status=status, - structure_id=structure_id, - completed_at=completed_at, - status_detail=status_detail, - ) - - create_structure_deployment_response_content.additional_properties = d - return create_structure_deployment_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_request_content.py deleted file mode 100644 index 8fa907f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_request_content.py +++ /dev/null @@ -1,164 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="CreateStructureRequestContent") - - -@_attrs_define -class CreateStructureRequestContent: - """ - Attributes: - name (str): - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - structure_config_file (Union[Unset, str]): - webhook_enabled (Union[Unset, bool]): - """ - - name: str - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - structure_config_file: Union[Unset, str] = UNSET - webhook_enabled: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - name = self.name - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - structure_config_file = self.structure_config_file - - webhook_enabled = self.webhook_enabled - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - if webhook_enabled is not UNSET: - field_dict["webhook_enabled"] = webhook_enabled - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - name = d.pop("name") - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - structure_config_file = d.pop("structure_config_file", UNSET) - - webhook_enabled = d.pop("webhook_enabled", UNSET) - - create_structure_request_content = cls( - name=name, - code=code, - description=description, - env_vars=env_vars, - structure_config_file=structure_config_file, - webhook_enabled=webhook_enabled, - ) - - create_structure_request_content.additional_properties = d - return create_structure_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_response_content.py deleted file mode 100644 index 9f172f5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_response_content.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="CreateStructureResponseContent") - - -@_attrs_define -class CreateStructureResponseContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - create_structure_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - create_structure_response_content.additional_properties = d - return create_structure_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_request_content.py deleted file mode 100644 index 729e3c7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_request_content.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - - -T = TypeVar("T", bound="CreateStructureRunRequestContent") - - -@_attrs_define -class CreateStructureRunRequestContent: - """ - Attributes: - args (list[str]): - env_vars (Union[Unset, list['EnvVar']]): - """ - - args: list[str] - env_vars: Union[Unset, list["EnvVar"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - } - ) - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - create_structure_run_request_content = cls( - args=args, - env_vars=env_vars, - ) - - create_structure_run_request_content.additional_properties = d - return create_structure_run_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_response_content.py deleted file mode 100644 index 89f41a8..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_structure_run_response_content.py +++ /dev/null @@ -1,223 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.structure_run_status import StructureRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="CreateStructureRunResponseContent") - - -@_attrs_define -class CreateStructureRunResponseContent: - """ - Attributes: - args (list[str]): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - started_at (Union[None, datetime.datetime]): - status (StructureRunStatus): - structure_id (str): - structure_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - args: list[str] - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - started_at: Union[None, datetime.datetime] - status: StructureRunStatus - structure_id: str - structure_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - structure_id = self.structure_id - - structure_run_id = self.structure_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "started_at": started_at, - "status": status, - "structure_id": structure_id, - "structure_run_id": structure_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = StructureRunStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - structure_run_id = d.pop("structure_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - create_structure_run_response_content = cls( - args=args, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - started_at=started_at, - status=status, - structure_id=structure_id, - structure_run_id=structure_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - create_structure_run_response_content.additional_properties = d - return create_structure_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_request_content.py deleted file mode 100644 index d17d9f3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_request_content.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.message_input import MessageInput - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateThreadRequestContent") - - -@_attrs_define -class CreateThreadRequestContent: - """ - Attributes: - name (str): - alias (Union[Unset, str]): - messages (Union[Unset, list['MessageInput']]): - metadata (Union[Unset, Metadata]): - """ - - name: str - alias: Union[Unset, str] = UNSET - messages: Union[Unset, list["MessageInput"]] = UNSET - metadata: Union[Unset, "Metadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - alias = self.alias - - messages: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.messages, Unset): - messages = [] - for messages_item_data in self.messages: - messages_item = messages_item_data.to_dict() - messages.append(messages_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( - { - "name": name, - } - ) - if alias is not UNSET: - field_dict["alias"] = alias - if messages is not UNSET: - field_dict["messages"] = messages - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.message_input import MessageInput - from ..models.metadata import Metadata - - d = dict(src_dict) - name = d.pop("name") - - alias = d.pop("alias", UNSET) - - messages = [] - _messages = d.pop("messages", UNSET) - for messages_item_data in _messages or []: - messages_item = MessageInput.from_dict(messages_item_data) - - messages.append(messages_item) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - create_thread_request_content = cls( - name=name, - alias=alias, - messages=messages, - metadata=metadata, - ) - - create_thread_request_content.additional_properties = d - return create_thread_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_response_content.py deleted file mode 100644 index 445f2da..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_thread_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="CreateThreadResponseContent") - - -@_attrs_define -class CreateThreadResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - message_count (float): - messages_length (float): - metadata (Metadata): - name (str): - organization_id (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - message_count: float - messages_length: float - metadata: "Metadata" - name: str - organization_id: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - message_count = self.message_count - - messages_length = self.messages_length - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "message_count": message_count, - "messages_length": messages_length, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - message_count = d.pop("message_count") - - messages_length = d.pop("messages_length") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - create_thread_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - message_count=message_count, - messages_length=messages_length, - metadata=metadata, - name=name, - organization_id=organization_id, - thread_id=thread_id, - updated_at=updated_at, - ) - - create_thread_response_content.additional_properties = d - return create_thread_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_request_content.py deleted file mode 100644 index 42a309c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_request_content.py +++ /dev/null @@ -1,88 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.code_source_input_type_0 import CodeSourceInputType0 - - -T = TypeVar("T", bound="CreateToolDeploymentRequestContent") - - -@_attrs_define -class CreateToolDeploymentRequestContent: - """ - Attributes: - code_source (Union['CodeSourceInputType0', Unset]): - force (Union[Unset, bool]): - """ - - code_source: Union["CodeSourceInputType0", Unset] = UNSET - force: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - code_source: Union[Unset, dict[str, Any]] - if isinstance(self.code_source, Unset): - code_source = UNSET - else: - code_source = self.code_source.to_dict() - - force = self.force - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code_source is not UNSET: - field_dict["code_source"] = code_source - if force is not UNSET: - field_dict["force"] = force - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_input_type_0 import CodeSourceInputType0 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceInputType0", Unset]: - if isinstance(data, Unset): - return data - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_input_type_0 = CodeSourceInputType0.from_dict(data) - - return componentsschemas_code_source_input_type_0 - - code_source = _parse_code_source(d.pop("code_source", UNSET)) - - force = d.pop("force", UNSET) - - create_tool_deployment_request_content = cls( - code_source=code_source, - force=force, - ) - - create_tool_deployment_request_content.additional_properties = d - return create_tool_deployment_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_response_content.py deleted file mode 100644 index 2bf8d1c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_deployment_response_content.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="CreateToolDeploymentResponseContent") - - -@_attrs_define -class CreateToolDeploymentResponseContent: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - status (DeploymentStatus): - tool_id (str): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - status: DeploymentStatus - tool_id: str - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - status = self.status.value - - tool_id = self.tool_id - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "status": status, - "tool_id": tool_id, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - status = DeploymentStatus(d.pop("status")) - - tool_id = d.pop("tool_id") - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - create_tool_deployment_response_content = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - status=status, - tool_id=tool_id, - completed_at=completed_at, - status_detail=status_detail, - ) - - create_tool_deployment_response_content.additional_properties = d - return create_tool_deployment_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_request_content.py deleted file mode 100644 index 1ac507a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_request_content.py +++ /dev/null @@ -1,155 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="CreateToolRequestContent") - - -@_attrs_define -class CreateToolRequestContent: - """ - Attributes: - name (str): - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - tool_config_file (Union[Unset, str]): - """ - - name: str - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - name = self.name - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - } - ) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - name = d.pop("name") - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - tool_config_file = d.pop("tool_config_file", UNSET) - - create_tool_request_content = cls( - name=name, - code=code, - description=description, - env_vars=env_vars, - tool_config_file=tool_config_file, - ) - - create_tool_request_content.additional_properties = d - return create_tool_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_response_content.py deleted file mode 100644 index b73ed6c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/create_tool_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="CreateToolResponseContent") - - -@_attrs_define -class CreateToolResponseContent: - """ - Attributes: - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - tool_id (str): - updated_at (datetime.datetime): - tool_config_file (Union[Unset, str]): - """ - - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - tool_id: str - updated_at: datetime.datetime - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - code: dict[str, Any] - if isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - tool_id = self.tool_id - - updated_at = self.updated_at.isoformat() - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "tool_id": tool_id, - "updated_at": updated_at, - } - ) - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - tool_id = d.pop("tool_id") - - updated_at = isoparse(d.pop("updated_at")) - - tool_config_file = d.pop("tool_config_file", UNSET) - - create_tool_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - tool_id=tool_id, - updated_at=updated_at, - tool_config_file=tool_config_file, - ) - - create_tool_response_content.additional_properties = d - return create_tool_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/credit_transaction_type.py b/griptape_cloud_client/generated/griptape_cloud_client/models/credit_transaction_type.py deleted file mode 100644 index 19a17b6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/credit_transaction_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class CreditTransactionType(str, Enum): - DEBIT = "DEBIT" - GRANT = "GRANT" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_0.py deleted file mode 100644 index 032fd54..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.confluence_input import ConfluenceInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType0") - - -@_attrs_define -class DataConnectorConfigInputUnionType0: - """ - Attributes: - confluence (ConfluenceInput): - """ - - confluence: "ConfluenceInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - confluence = self.confluence.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "confluence": confluence, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.confluence_input import ConfluenceInput - - d = dict(src_dict) - confluence = ConfluenceInput.from_dict(d.pop("confluence")) - - data_connector_config_input_union_type_0 = cls( - confluence=confluence, - ) - - data_connector_config_input_union_type_0.additional_properties = d - return data_connector_config_input_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_1.py deleted file mode 100644 index c37f665..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.google_drive_input import GoogleDriveInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType1") - - -@_attrs_define -class DataConnectorConfigInputUnionType1: - """ - Attributes: - google_drive (GoogleDriveInput): - """ - - google_drive: "GoogleDriveInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - google_drive = self.google_drive.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "google_drive": google_drive, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.google_drive_input import GoogleDriveInput - - d = dict(src_dict) - google_drive = GoogleDriveInput.from_dict(d.pop("google_drive")) - - data_connector_config_input_union_type_1 = cls( - google_drive=google_drive, - ) - - data_connector_config_input_union_type_1.additional_properties = d - return data_connector_config_input_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_2.py deleted file mode 100644 index cff26be..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.webscraper_input import WebscraperInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType2") - - -@_attrs_define -class DataConnectorConfigInputUnionType2: - """ - Attributes: - webscraper (WebscraperInput): - """ - - webscraper: "WebscraperInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - webscraper = self.webscraper.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "webscraper": webscraper, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.webscraper_input import WebscraperInput - - d = dict(src_dict) - webscraper = WebscraperInput.from_dict(d.pop("webscraper")) - - data_connector_config_input_union_type_2 = cls( - webscraper=webscraper, - ) - - data_connector_config_input_union_type_2.additional_properties = d - return data_connector_config_input_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_3.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_3.py deleted file mode 100644 index 8d132c9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_3.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.structure_connector_input import StructureConnectorInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType3") - - -@_attrs_define -class DataConnectorConfigInputUnionType3: - """ - Attributes: - structure (StructureConnectorInput): - """ - - structure: "StructureConnectorInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure = self.structure.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure": structure, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structure_connector_input import StructureConnectorInput - - d = dict(src_dict) - structure = StructureConnectorInput.from_dict(d.pop("structure")) - - data_connector_config_input_union_type_3 = cls( - structure=structure, - ) - - data_connector_config_input_union_type_3.additional_properties = d - return data_connector_config_input_union_type_3 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_4.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_4.py deleted file mode 100644 index c500e51..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_4.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.s3_connector_input import S3ConnectorInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType4") - - -@_attrs_define -class DataConnectorConfigInputUnionType4: - """ - Attributes: - s3 (S3ConnectorInput): - """ - - s3: "S3ConnectorInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - s3 = self.s3.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "s3": s3, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.s3_connector_input import S3ConnectorInput - - d = dict(src_dict) - s3 = S3ConnectorInput.from_dict(d.pop("s3")) - - data_connector_config_input_union_type_4 = cls( - s3=s3, - ) - - data_connector_config_input_union_type_4.additional_properties = d - return data_connector_config_input_union_type_4 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_5.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_5.py deleted file mode 100644 index b604f7b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_input_union_type_5.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_connector_input import DataLakeConnectorInput - - -T = TypeVar("T", bound="DataConnectorConfigInputUnionType5") - - -@_attrs_define -class DataConnectorConfigInputUnionType5: - """ - Attributes: - data_lake (DataLakeConnectorInput): - """ - - data_lake: "DataLakeConnectorInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_connector_input import DataLakeConnectorInput - - d = dict(src_dict) - data_lake = DataLakeConnectorInput.from_dict(d.pop("data_lake")) - - data_connector_config_input_union_type_5 = cls( - data_lake=data_lake, - ) - - data_connector_config_input_union_type_5.additional_properties = d - return data_connector_config_input_union_type_5 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_0.py deleted file mode 100644 index 7e26abc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.confluence_detail import ConfluenceDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType0") - - -@_attrs_define -class DataConnectorConfigUnionType0: - """ - Attributes: - confluence (ConfluenceDetail): - """ - - confluence: "ConfluenceDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - confluence = self.confluence.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "confluence": confluence, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.confluence_detail import ConfluenceDetail - - d = dict(src_dict) - confluence = ConfluenceDetail.from_dict(d.pop("confluence")) - - data_connector_config_union_type_0 = cls( - confluence=confluence, - ) - - data_connector_config_union_type_0.additional_properties = d - return data_connector_config_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_1.py deleted file mode 100644 index 39b9dff..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.google_drive_detail import GoogleDriveDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType1") - - -@_attrs_define -class DataConnectorConfigUnionType1: - """ - Attributes: - google_drive (GoogleDriveDetail): - """ - - google_drive: "GoogleDriveDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - google_drive = self.google_drive.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "google_drive": google_drive, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.google_drive_detail import GoogleDriveDetail - - d = dict(src_dict) - google_drive = GoogleDriveDetail.from_dict(d.pop("google_drive")) - - data_connector_config_union_type_1 = cls( - google_drive=google_drive, - ) - - data_connector_config_union_type_1.additional_properties = d - return data_connector_config_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_2.py deleted file mode 100644 index 5f1b2df..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.webscraper_detail import WebscraperDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType2") - - -@_attrs_define -class DataConnectorConfigUnionType2: - """ - Attributes: - webscraper (WebscraperDetail): - """ - - webscraper: "WebscraperDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - webscraper = self.webscraper.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "webscraper": webscraper, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.webscraper_detail import WebscraperDetail - - d = dict(src_dict) - webscraper = WebscraperDetail.from_dict(d.pop("webscraper")) - - data_connector_config_union_type_2 = cls( - webscraper=webscraper, - ) - - data_connector_config_union_type_2.additional_properties = d - return data_connector_config_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_3.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_3.py deleted file mode 100644 index 3350d37..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_3.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.structure_connector_detail import StructureConnectorDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType3") - - -@_attrs_define -class DataConnectorConfigUnionType3: - """ - Attributes: - structure (StructureConnectorDetail): - """ - - structure: "StructureConnectorDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure = self.structure.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure": structure, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structure_connector_detail import StructureConnectorDetail - - d = dict(src_dict) - structure = StructureConnectorDetail.from_dict(d.pop("structure")) - - data_connector_config_union_type_3 = cls( - structure=structure, - ) - - data_connector_config_union_type_3.additional_properties = d - return data_connector_config_union_type_3 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_4.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_4.py deleted file mode 100644 index aa066ed..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_4.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.s3_connector_detail import S3ConnectorDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType4") - - -@_attrs_define -class DataConnectorConfigUnionType4: - """ - Attributes: - s3 (S3ConnectorDetail): - """ - - s3: "S3ConnectorDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - s3 = self.s3.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "s3": s3, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.s3_connector_detail import S3ConnectorDetail - - d = dict(src_dict) - s3 = S3ConnectorDetail.from_dict(d.pop("s3")) - - data_connector_config_union_type_4 = cls( - s3=s3, - ) - - data_connector_config_union_type_4.additional_properties = d - return data_connector_config_union_type_4 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_5.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_5.py deleted file mode 100644 index 4681943..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_config_union_type_5.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_connector_detail import DataLakeConnectorDetail - - -T = TypeVar("T", bound="DataConnectorConfigUnionType5") - - -@_attrs_define -class DataConnectorConfigUnionType5: - """ - Attributes: - data_lake (DataLakeConnectorDetail): - """ - - data_lake: "DataLakeConnectorDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_connector_detail import DataLakeConnectorDetail - - d = dict(src_dict) - data_lake = DataLakeConnectorDetail.from_dict(d.pop("data_lake")) - - data_connector_config_union_type_5 = cls( - data_lake=data_lake, - ) - - data_connector_config_union_type_5.additional_properties = d - return data_connector_config_union_type_5 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_detail.py deleted file mode 100644 index a7f0a10..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_connector_detail.py +++ /dev/null @@ -1,266 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="DataConnectorDetail") - - -@_attrs_define -class DataConnectorDetail: - """ - Attributes: - config (Union['DataConnectorConfigUnionType0', 'DataConnectorConfigUnionType1', 'DataConnectorConfigUnionType2', - 'DataConnectorConfigUnionType3', 'DataConnectorConfigUnionType4', 'DataConnectorConfigUnionType5']): - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - bucket_id (Union[Unset, str]): - description (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - """ - - config: Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ] - created_at: datetime.datetime - created_by: str - data_connector_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - bucket_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - - config: dict[str, Any] - if isinstance(self.config, DataConnectorConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - bucket_id = self.bucket_id - - description = self.description - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if bucket_id is not UNSET: - field_dict["bucket_id"] = bucket_id - if description is not UNSET: - field_dict["description"] = description - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_0 = DataConnectorConfigUnionType0.from_dict(data) - - return componentsschemas_data_connector_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_1 = DataConnectorConfigUnionType1.from_dict(data) - - return componentsschemas_data_connector_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_2 = DataConnectorConfigUnionType2.from_dict(data) - - return componentsschemas_data_connector_config_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_3 = DataConnectorConfigUnionType3.from_dict(data) - - return componentsschemas_data_connector_config_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_4 = DataConnectorConfigUnionType4.from_dict(data) - - return componentsschemas_data_connector_config_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_5 = DataConnectorConfigUnionType5.from_dict(data) - - return componentsschemas_data_connector_config_union_type_5 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_id = d.pop("bucket_id", UNSET) - - description = d.pop("description", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - data_connector_detail = cls( - config=config, - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - bucket_id=bucket_id, - description=description, - schedule_expression=schedule_expression, - transforms=transforms, - ) - - data_connector_detail.additional_properties = d - return data_connector_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_detail.py deleted file mode 100644 index be1917e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_detail.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.data_job_status import DataJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="DataJobDetail") - - -@_attrs_define -class DataJobDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - data_job_id (str): - status (DataJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - data_connector_id: str - data_job_id: str - status: DataJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - data_job_id = self.data_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "data_job_id": data_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - data_job_id = d.pop("data_job_id") - - status = DataJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - data_job_detail = cls( - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - data_job_id=data_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - data_job_detail.additional_properties = d - return data_job_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_status.py deleted file mode 100644 index 4b1b3fb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_job_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class DataJobStatus(str, Enum): - CANCELLED = "CANCELLED" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_code_source.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_code_source.py deleted file mode 100644 index 6e1d997..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_code_source.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DataLakeCodeSource") - - -@_attrs_define -class DataLakeCodeSource: - """ - Attributes: - asset_path (str): - bucket_id (str): - """ - - asset_path: str - bucket_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - asset_path = self.asset_path - - bucket_id = self.bucket_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_path": asset_path, - "bucket_id": bucket_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - asset_path = d.pop("asset_path") - - bucket_id = d.pop("bucket_id") - - data_lake_code_source = cls( - asset_path=asset_path, - bucket_id=bucket_id, - ) - - data_lake_code_source.additional_properties = d - return data_lake_code_source - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_detail.py deleted file mode 100644 index ab85596..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_detail.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="DataLakeConnectorDetail") - - -@_attrs_define -class DataLakeConnectorDetail: - """ - Attributes: - asset_paths (list[str]): - bucket_id (str): - encoding (Union[Unset, str]): - """ - - asset_paths: list[str] - bucket_id: str - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - asset_paths = self.asset_paths - - bucket_id = self.bucket_id - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_paths": asset_paths, - "bucket_id": bucket_id, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - asset_paths = cast(list[str], d.pop("asset_paths")) - - bucket_id = d.pop("bucket_id") - - encoding = d.pop("encoding", UNSET) - - data_lake_connector_detail = cls( - asset_paths=asset_paths, - bucket_id=bucket_id, - encoding=encoding, - ) - - data_lake_connector_detail.additional_properties = d - return data_lake_connector_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_input.py deleted file mode 100644 index 03da0c9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_connector_input.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="DataLakeConnectorInput") - - -@_attrs_define -class DataLakeConnectorInput: - """ - Attributes: - bucket_id (str): - asset_paths (Union[Unset, list[str]]): - encoding (Union[Unset, str]): - """ - - bucket_id: str - asset_paths: Union[Unset, list[str]] = UNSET - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bucket_id = self.bucket_id - - asset_paths: Union[Unset, list[str]] = UNSET - if not isinstance(self.asset_paths, Unset): - asset_paths = self.asset_paths - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bucket_id": bucket_id, - } - ) - if asset_paths is not UNSET: - field_dict["asset_paths"] = asset_paths - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bucket_id = d.pop("bucket_id") - - asset_paths = cast(list[str], d.pop("asset_paths", UNSET)) - - encoding = d.pop("encoding", UNSET) - - data_lake_connector_input = cls( - bucket_id=bucket_id, - asset_paths=asset_paths, - encoding=encoding, - ) - - data_lake_connector_input.additional_properties = d - return data_lake_connector_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_function_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_function_code.py deleted file mode 100644 index cf0466d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_function_code.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DataLakeFunctionCode") - - -@_attrs_define -class DataLakeFunctionCode: - """ - Attributes: - asset_path (str): - bucket_id (str): - """ - - asset_path: str - bucket_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - asset_path = self.asset_path - - bucket_id = self.bucket_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_path": asset_path, - "bucket_id": bucket_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - asset_path = d.pop("asset_path") - - bucket_id = d.pop("bucket_id") - - data_lake_function_code = cls( - asset_path=asset_path, - bucket_id=bucket_id, - ) - - data_lake_function_code.additional_properties = d - return data_lake_function_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_structure_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_structure_code.py deleted file mode 100644 index add575f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_structure_code.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DataLakeStructureCode") - - -@_attrs_define -class DataLakeStructureCode: - """ - Attributes: - asset_path (str): - bucket_id (str): - """ - - asset_path: str - bucket_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - asset_path = self.asset_path - - bucket_id = self.bucket_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_path": asset_path, - "bucket_id": bucket_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - asset_path = d.pop("asset_path") - - bucket_id = d.pop("bucket_id") - - data_lake_structure_code = cls( - asset_path=asset_path, - bucket_id=bucket_id, - ) - - data_lake_structure_code.additional_properties = d - return data_lake_structure_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_tool_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_tool_code.py deleted file mode 100644 index 90b93f6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/data_lake_tool_code.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DataLakeToolCode") - - -@_attrs_define -class DataLakeToolCode: - """ - Attributes: - asset_path (str): - bucket_id (str): - """ - - asset_path: str - bucket_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - asset_path = self.asset_path - - bucket_id = self.bucket_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_path": asset_path, - "bucket_id": bucket_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - asset_path = d.pop("asset_path") - - bucket_id = d.pop("bucket_id") - - data_lake_tool_code = cls( - asset_path=asset_path, - bucket_id=bucket_id, - ) - - data_lake_tool_code.additional_properties = d - return data_lake_tool_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/default_function_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/default_function_code.py deleted file mode 100644 index 46c3a89..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/default_function_code.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DefaultFunctionCode") - - -@_attrs_define -class DefaultFunctionCode: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - default_function_code = cls() - - default_function_code.additional_properties = d - return default_function_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/default_structure_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/default_structure_code.py deleted file mode 100644 index 8292c94..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/default_structure_code.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DefaultStructureCode") - - -@_attrs_define -class DefaultStructureCode: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - default_structure_code = cls() - - default_structure_code.additional_properties = d - return default_structure_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/default_tool_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/default_tool_code.py deleted file mode 100644 index 84b69de..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/default_tool_code.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="DefaultToolCode") - - -@_attrs_define -class DefaultToolCode: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - default_tool_code = cls() - - default_tool_code.additional_properties = d - return default_tool_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_count_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_count_gauge.py deleted file mode 100644 index 6d85071..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_count_gauge.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="DeploymentCountGauge") - - -@_attrs_define -class DeploymentCountGauge: - """ - Attributes: - active_count (Union[Unset, float]): - total_count (Union[Unset, float]): - """ - - active_count: Union[Unset, float] = UNSET - total_count: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active_count = self.active_count - - total_count = self.total_count - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if active_count is not UNSET: - field_dict["active_count"] = active_count - if total_count is not UNSET: - field_dict["total_count"] = total_count - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active_count = d.pop("active_count", UNSET) - - total_count = d.pop("total_count", UNSET) - - deployment_count_gauge = cls( - active_count=active_count, - total_count=total_count, - ) - - deployment_count_gauge.additional_properties = d - return deployment_count_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_duration_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_duration_gauge.py deleted file mode 100644 index b48f0b2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_duration_gauge.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="DeploymentDurationGauge") - - -@_attrs_define -class DeploymentDurationGauge: - """ - Attributes: - total_seconds (Union[Unset, float]): - """ - - total_seconds: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - total_seconds = self.total_seconds - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if total_seconds is not UNSET: - field_dict["total_seconds"] = total_seconds - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - total_seconds = d.pop("total_seconds", UNSET) - - deployment_duration_gauge = cls( - total_seconds=total_seconds, - ) - - deployment_duration_gauge.additional_properties = d - return deployment_duration_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_error_rate_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_error_rate_gauge.py deleted file mode 100644 index 7550c1b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_error_rate_gauge.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="DeploymentErrorRateGauge") - - -@_attrs_define -class DeploymentErrorRateGauge: - """ - Attributes: - rate (Union[Unset, float]): - """ - - rate: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rate = self.rate - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if rate is not UNSET: - field_dict["rate"] = rate - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rate = d.pop("rate", UNSET) - - deployment_error_rate_gauge = cls( - rate=rate, - ) - - deployment_error_rate_gauge.additional_properties = d - return deployment_error_rate_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_status.py deleted file mode 100644 index a126efc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/deployment_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class DeploymentStatus(str, Enum): - DEPLOYING = "DEPLOYING" - ERROR = "ERROR" - FAILED = "FAILED" - QUEUED = "QUEUED" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/duration_plot.py b/griptape_cloud_client/generated/griptape_cloud_client/models/duration_plot.py deleted file mode 100644 index 7905a14..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/duration_plot.py +++ /dev/null @@ -1,102 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.duration_timeseries_element import DurationTimeseriesElement - - -T = TypeVar("T", bound="DurationPlot") - - -@_attrs_define -class DurationPlot: - """ - Attributes: - seconds_avg (Union[Unset, float]): - seconds_p100 (Union[Unset, float]): - seconds_p50 (Union[Unset, float]): - timeseries (Union[Unset, list['DurationTimeseriesElement']]): - """ - - seconds_avg: Union[Unset, float] = UNSET - seconds_p100: Union[Unset, float] = UNSET - seconds_p50: Union[Unset, float] = UNSET - timeseries: Union[Unset, list["DurationTimeseriesElement"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - seconds_avg = self.seconds_avg - - seconds_p100 = self.seconds_p100 - - seconds_p50 = self.seconds_p50 - - timeseries: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.timeseries, Unset): - timeseries = [] - for timeseries_item_data in self.timeseries: - timeseries_item = timeseries_item_data.to_dict() - timeseries.append(timeseries_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if seconds_avg is not UNSET: - field_dict["seconds_avg"] = seconds_avg - if seconds_p100 is not UNSET: - field_dict["seconds_p100"] = seconds_p100 - if seconds_p50 is not UNSET: - field_dict["seconds_p50"] = seconds_p50 - if timeseries is not UNSET: - field_dict["timeseries"] = timeseries - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.duration_timeseries_element import DurationTimeseriesElement - - d = dict(src_dict) - seconds_avg = d.pop("seconds_avg", UNSET) - - seconds_p100 = d.pop("seconds_p100", UNSET) - - seconds_p50 = d.pop("seconds_p50", UNSET) - - timeseries = [] - _timeseries = d.pop("timeseries", UNSET) - for timeseries_item_data in _timeseries or []: - timeseries_item = DurationTimeseriesElement.from_dict(timeseries_item_data) - - timeseries.append(timeseries_item) - - duration_plot = cls( - seconds_avg=seconds_avg, - seconds_p100=seconds_p100, - seconds_p50=seconds_p50, - timeseries=timeseries, - ) - - duration_plot.additional_properties = d - return duration_plot - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/duration_timeseries_element.py b/griptape_cloud_client/generated/griptape_cloud_client/models/duration_timeseries_element.py deleted file mode 100644 index 9eefd60..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/duration_timeseries_element.py +++ /dev/null @@ -1,95 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="DurationTimeseriesElement") - - -@_attrs_define -class DurationTimeseriesElement: - """ - Attributes: - seconds_p0 (Union[Unset, float]): - seconds_p100 (Union[Unset, float]): - seconds_p50 (Union[Unset, float]): - time (Union[Unset, datetime.datetime]): - """ - - seconds_p0: Union[Unset, float] = UNSET - seconds_p100: Union[Unset, float] = UNSET - seconds_p50: Union[Unset, float] = UNSET - time: Union[Unset, datetime.datetime] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - seconds_p0 = self.seconds_p0 - - seconds_p100 = self.seconds_p100 - - seconds_p50 = self.seconds_p50 - - time: Union[Unset, str] = UNSET - if not isinstance(self.time, Unset): - time = self.time.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if seconds_p0 is not UNSET: - field_dict["seconds_p0"] = seconds_p0 - if seconds_p100 is not UNSET: - field_dict["seconds_p100"] = seconds_p100 - if seconds_p50 is not UNSET: - field_dict["seconds_p50"] = seconds_p50 - if time is not UNSET: - field_dict["time"] = time - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - seconds_p0 = d.pop("seconds_p0", UNSET) - - seconds_p100 = d.pop("seconds_p100", UNSET) - - seconds_p50 = d.pop("seconds_p50", UNSET) - - _time = d.pop("time", UNSET) - time: Union[Unset, datetime.datetime] - if isinstance(_time, Unset): - time = UNSET - else: - time = isoparse(_time) - - duration_timeseries_element = cls( - seconds_p0=seconds_p0, - seconds_p100=seconds_p100, - seconds_p50=seconds_p50, - time=time, - ) - - duration_timeseries_element.additional_properties = d - return duration_timeseries_element - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/embedding_model.py b/griptape_cloud_client/generated/griptape_cloud_client/models/embedding_model.py deleted file mode 100644 index e277f36..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/embedding_model.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class EmbeddingModel(str, Enum): - TEXT_EMBEDDING_3_SMALL = "text-embedding-3-small" - TEXT_EMBEDDING_ADA_002 = "text-embedding-ada-002" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/entitlement.py b/griptape_cloud_client/generated/griptape_cloud_client/models/entitlement.py deleted file mode 100644 index 85af18a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/entitlement.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class Entitlement(str, Enum): - EXPIRED = "EXPIRED" - FREE = "FREE" - PAID = "PAID" - PARTNER = "PARTNER" - PROFESSIONAL = "PROFESSIONAL" - STUDIO = "STUDIO" - UNPAID = "UNPAID" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/entry.py b/griptape_cloud_client/generated/griptape_cloud_client/models/entry.py deleted file mode 100644 index 855b62d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/entry.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.meta import Meta - - -T = TypeVar("T", bound="Entry") - - -@_attrs_define -class Entry: - """ - Attributes: - id (str): - score (float): - meta (Union[Unset, Meta]): - namespace (Union[Unset, str]): - vector (Union[Unset, list[float]]): - """ - - id: str - score: float - meta: Union[Unset, "Meta"] = UNSET - namespace: Union[Unset, str] = UNSET - vector: Union[Unset, list[float]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - id = self.id - - score = self.score - - meta: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.meta, Unset): - meta = self.meta.to_dict() - - namespace = self.namespace - - vector: Union[Unset, list[float]] = UNSET - if not isinstance(self.vector, Unset): - vector = self.vector - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "score": score, - } - ) - if meta is not UNSET: - field_dict["meta"] = meta - if namespace is not UNSET: - field_dict["namespace"] = namespace - if vector is not UNSET: - field_dict["vector"] = vector - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.meta import Meta - - d = dict(src_dict) - id = d.pop("id") - - score = d.pop("score") - - _meta = d.pop("meta", UNSET) - meta: Union[Unset, Meta] - if isinstance(_meta, Unset): - meta = UNSET - else: - meta = Meta.from_dict(_meta) - - namespace = d.pop("namespace", UNSET) - - vector = cast(list[float], d.pop("vector", UNSET)) - - entry = cls( - id=id, - score=score, - meta=meta, - namespace=namespace, - vector=vector, - ) - - entry.additional_properties = d - return entry - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/env_var.py b/griptape_cloud_client/generated/griptape_cloud_client/models/env_var.py deleted file mode 100644 index b5ec04c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/env_var.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.env_var_source import EnvVarSource -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EnvVar") - - -@_attrs_define -class EnvVar: - """ - Attributes: - name (str): - value (str): - source (Union[Unset, EnvVarSource]): - """ - - name: str - value: str - source: Union[Unset, EnvVarSource] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - value = self.value - - source: Union[Unset, str] = UNSET - if not isinstance(self.source, Unset): - source = self.source.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "value": value, - } - ) - if source is not UNSET: - field_dict["source"] = source - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - value = d.pop("value") - - _source = d.pop("source", UNSET) - source: Union[Unset, EnvVarSource] - if isinstance(_source, Unset): - source = UNSET - else: - source = EnvVarSource(_source) - - env_var = cls( - name=name, - value=value, - source=source, - ) - - env_var.additional_properties = d - return env_var - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/env_var_source.py b/griptape_cloud_client/generated/griptape_cloud_client/models/env_var_source.py deleted file mode 100644 index b3ffe69..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/env_var_source.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class EnvVarSource(str, Enum): - MANUAL = "manual" - SECRET_REF = "secret_ref" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/error.py b/griptape_cloud_client/generated/griptape_cloud_client/models/error.py deleted file mode 100644 index 51ab84c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/error.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="Error") - - -@_attrs_define -class Error: - """ - Attributes: - message (str): - type_ (str): - path (Union[Unset, str]): - """ - - message: str - type_: str - path: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - message = self.message - - type_ = self.type_ - - path = self.path - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "message": message, - "type": type_, - } - ) - if path is not UNSET: - field_dict["path"] = path - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - message = d.pop("message") - - type_ = d.pop("type") - - path = d.pop("path", UNSET) - - error = cls( - message=message, - type_=type_, - path=path, - ) - - error.additional_properties = d - return error - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/error_rate_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/error_rate_gauge.py deleted file mode 100644 index 472300a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/error_rate_gauge.py +++ /dev/null @@ -1,84 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.error_type_count import ErrorTypeCount - - -T = TypeVar("T", bound="ErrorRateGauge") - - -@_attrs_define -class ErrorRateGauge: - """ - Attributes: - error_type_counts (Union[Unset, list['ErrorTypeCount']]): - rate (Union[Unset, float]): - """ - - error_type_counts: Union[Unset, list["ErrorTypeCount"]] = UNSET - rate: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - error_type_counts: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.error_type_counts, Unset): - error_type_counts = [] - for error_type_counts_item_data in self.error_type_counts: - error_type_counts_item = error_type_counts_item_data.to_dict() - error_type_counts.append(error_type_counts_item) - - rate = self.rate - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_type_counts is not UNSET: - field_dict["error_type_counts"] = error_type_counts - if rate is not UNSET: - field_dict["rate"] = rate - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error_type_count import ErrorTypeCount - - d = dict(src_dict) - error_type_counts = [] - _error_type_counts = d.pop("error_type_counts", UNSET) - for error_type_counts_item_data in _error_type_counts or []: - error_type_counts_item = ErrorTypeCount.from_dict(error_type_counts_item_data) - - error_type_counts.append(error_type_counts_item) - - rate = d.pop("rate", UNSET) - - error_rate_gauge = cls( - error_type_counts=error_type_counts, - rate=rate, - ) - - error_rate_gauge.additional_properties = d - return error_rate_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/error_type_count.py b/griptape_cloud_client/generated/griptape_cloud_client/models/error_type_count.py deleted file mode 100644 index 84b42f0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/error_type_count.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ErrorTypeCount") - - -@_attrs_define -class ErrorTypeCount: - """ - Attributes: - count (Union[Unset, float]): - error_type (Union[Unset, str]): - """ - - count: Union[Unset, float] = UNSET - error_type: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - count = self.count - - error_type = self.error_type - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if count is not UNSET: - field_dict["count"] = count - if error_type is not UNSET: - field_dict["error_type"] = error_type - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - count = d.pop("count", UNSET) - - error_type = d.pop("error_type", UNSET) - - error_type_count = cls( - count=count, - error_type=error_type, - ) - - error_type_count.additional_properties = d - return error_type_count - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/event_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/event_detail.py deleted file mode 100644 index 3483acc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/event_detail.py +++ /dev/null @@ -1,109 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="EventDetail") - - -@_attrs_define -class EventDetail: - """ - Attributes: - created_at (datetime.datetime): - event_id (str): - origin (str): - payload (Any): - structure_run_id (str): - timestamp (float): - type_ (str): - """ - - created_at: datetime.datetime - event_id: str - origin: str - payload: Any - structure_run_id: str - timestamp: float - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - event_id = self.event_id - - origin = self.origin - - payload = self.payload - - structure_run_id = self.structure_run_id - - timestamp = self.timestamp - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "event_id": event_id, - "origin": origin, - "payload": payload, - "structure_run_id": structure_run_id, - "timestamp": timestamp, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - event_id = d.pop("event_id") - - origin = d.pop("origin") - - payload = d.pop("payload") - - structure_run_id = d.pop("structure_run_id") - - timestamp = d.pop("timestamp") - - type_ = d.pop("type") - - event_detail = cls( - created_at=created_at, - event_id=event_id, - origin=origin, - payload=payload, - structure_run_id=structure_run_id, - timestamp=timestamp, - type_=type_, - ) - - event_detail.additional_properties = d - return event_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/event_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/event_input.py deleted file mode 100644 index 322cd2f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/event_input.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="EventInput") - - -@_attrs_define -class EventInput: - """ - Attributes: - timestamp (float): - type_ (str): - payload (Union[Unset, Any]): - """ - - timestamp: float - type_: str - payload: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - timestamp = self.timestamp - - type_ = self.type_ - - payload = self.payload - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "timestamp": timestamp, - "type": type_, - } - ) - if payload is not UNSET: - field_dict["payload"] = payload - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - timestamp = d.pop("timestamp") - - type_ = d.pop("type") - - payload = d.pop("payload", UNSET) - - event_input = cls( - timestamp=timestamp, - type_=type_, - payload=payload, - ) - - event_input.additional_properties = d - return event_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_0.py deleted file mode 100644 index a680753..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_function_code import GithubFunctionCode - - -T = TypeVar("T", bound="FunctionCodeType0") - - -@_attrs_define -class FunctionCodeType0: - """ - Attributes: - github (GithubFunctionCode): - """ - - github: "GithubFunctionCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_function_code import GithubFunctionCode - - d = dict(src_dict) - github = GithubFunctionCode.from_dict(d.pop("github")) - - function_code_type_0 = cls( - github=github, - ) - - function_code_type_0.additional_properties = d - return function_code_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/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_1.py deleted file mode 100644 index ee6150f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_function_code import DataLakeFunctionCode - - -T = TypeVar("T", bound="FunctionCodeType1") - - -@_attrs_define -class FunctionCodeType1: - """ - Attributes: - data_lake (DataLakeFunctionCode): - """ - - data_lake: "DataLakeFunctionCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_function_code import DataLakeFunctionCode - - d = dict(src_dict) - data_lake = DataLakeFunctionCode.from_dict(d.pop("data_lake")) - - function_code_type_1 = cls( - data_lake=data_lake, - ) - - function_code_type_1.additional_properties = d - return function_code_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_2.py deleted file mode 100644 index e0b60e0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_code_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.default_function_code import DefaultFunctionCode - - -T = TypeVar("T", bound="FunctionCodeType2") - - -@_attrs_define -class FunctionCodeType2: - """ - Attributes: - default (DefaultFunctionCode): - """ - - default: "DefaultFunctionCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - default = self.default.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "default": default, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.default_function_code import DefaultFunctionCode - - d = dict(src_dict) - default = DefaultFunctionCode.from_dict(d.pop("default")) - - function_code_type_2 = cls( - default=default, - ) - - function_code_type_2.additional_properties = d - return function_code_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_deployment_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_deployment_detail.py deleted file mode 100644 index 082fde6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_deployment_detail.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="FunctionDeploymentDetail") - - -@_attrs_define -class FunctionDeploymentDetail: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - function_id (str): - status (DeploymentStatus): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - function_id: str - status: DeploymentStatus - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - function_id = self.function_id - - status = self.status.value - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "function_id": function_id, - "status": status, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - function_id = d.pop("function_id") - - status = DeploymentStatus(d.pop("status")) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - function_deployment_detail = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - function_id=function_id, - status=status, - completed_at=completed_at, - status_detail=status_detail, - ) - - function_deployment_detail.additional_properties = d - return function_deployment_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_detail.py deleted file mode 100644 index bf48e0e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_detail.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="FunctionDetail") - - -@_attrs_define -class FunctionDetail: - """ - Attributes: - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - function_id (str): - latest_deployment_id (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - function_config_file (Union[Unset, str]): - """ - - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - function_id: str - latest_deployment_id: str - name: str - organization_id: str - updated_at: datetime.datetime - function_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - code: dict[str, Any] - if isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_id = self.function_id - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - function_config_file = self.function_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "function_id": function_id, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_id = d.pop("function_id") - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - function_config_file = d.pop("function_config_file", UNSET) - - function_detail = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - function_id=function_id, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - updated_at=updated_at, - function_config_file=function_config_file, - ) - - function_detail.additional_properties = d - return function_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_detail.py deleted file mode 100644 index 1b054c4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_detail.py +++ /dev/null @@ -1,232 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.function_run_status import FunctionRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="FunctionRunDetail") - - -@_attrs_define -class FunctionRunDetail: - """ - Attributes: - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - function_id (str): - function_run_id (str): - input_ (Any): - runtime_path (str): - started_at (Union[None, datetime.datetime]): - status (FunctionRunStatus): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - function_id: str - function_run_id: str - input_: Any - runtime_path: str - started_at: Union[None, datetime.datetime] - status: FunctionRunStatus - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - function_id = self.function_id - - function_run_id = self.function_run_id - - input_ = self.input_ - - runtime_path = self.runtime_path - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "function_id": function_id, - "function_run_id": function_run_id, - "input": input_, - "runtime_path": runtime_path, - "started_at": started_at, - "status": status, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - function_id = d.pop("function_id") - - function_run_id = d.pop("function_run_id") - - input_ = d.pop("input") - - runtime_path = d.pop("runtime_path") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = FunctionRunStatus(d.pop("status")) - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - function_run_detail = cls( - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - function_id=function_id, - function_run_id=function_run_id, - input_=input_, - runtime_path=runtime_path, - started_at=started_at, - status=status, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - function_run_detail.additional_properties = d - return function_run_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_status.py deleted file mode 100644 index c721c4d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/function_run_status.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class FunctionRunStatus(str, Enum): - CANCELLED = "CANCELLED" - ERROR = "ERROR" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - STARTING = "STARTING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/get_api_key_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_api_key_response_content.py deleted file mode 100644 index 43e6e9c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_api_key_response_content.py +++ /dev/null @@ -1,117 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetApiKeyResponseContent") - - -@_attrs_define -class GetApiKeyResponseContent: - """ - Attributes: - active (bool): - api_key_id (str): - created_at (datetime.datetime): - created_by (str): - last_used (datetime.datetime): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - active: bool - api_key_id: str - created_at: datetime.datetime - created_by: str - last_used: datetime.datetime - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active = self.active - - api_key_id = self.api_key_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "active": active, - "api_key_id": api_key_id, - "created_at": created_at, - "created_by": created_by, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active = d.pop("active") - - api_key_id = d.pop("api_key_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_api_key_response_content = cls( - active=active, - api_key_id=api_key_id, - created_at=created_at, - created_by=created_by, - last_used=last_used, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - get_api_key_response_content.additional_properties = d - return get_api_key_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_asset_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_asset_response_content.py deleted file mode 100644 index 33eef52..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_asset_response_content.py +++ /dev/null @@ -1,122 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="GetAssetResponseContent") - - -@_attrs_define -class GetAssetResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - bucket_id (Union[Unset, str]): - contents (Union[Unset, Any]): - size (Union[Unset, float]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - bucket_id: Union[Unset, str] = UNSET - contents: Union[Unset, Any] = UNSET - size: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - bucket_id = self.bucket_id - - contents = self.contents - - size = self.size - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if bucket_id is not UNSET: - field_dict["bucket_id"] = bucket_id - if contents is not UNSET: - field_dict["contents"] = contents - if size is not UNSET: - field_dict["size"] = size - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_id = d.pop("bucket_id", UNSET) - - contents = d.pop("contents", UNSET) - - size = d.pop("size", UNSET) - - get_asset_response_content = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - bucket_id=bucket_id, - contents=contents, - size=size, - ) - - get_asset_response_content.additional_properties = d - return get_asset_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_response_content.py deleted file mode 100644 index 7e46ff4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_response_content.py +++ /dev/null @@ -1,160 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="GetAssistantResponseContent") - - -@_attrs_define -class GetAssistantResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - description (str): - knowledge_base_ids (list[str]): - name (str): - organization_id (str): - retriever_ids (list[str]): - ruleset_ids (list[str]): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - description: str - knowledge_base_ids: list[str] - name: str - organization_id: str - retriever_ids: list[str] - ruleset_ids: list[str] - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - knowledge_base_ids = self.knowledge_base_ids - - name = self.name - - organization_id = self.organization_id - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "description": description, - "knowledge_base_ids": knowledge_base_ids, - "name": name, - "organization_id": organization_id, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - get_assistant_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - description=description, - knowledge_base_ids=knowledge_base_ids, - name=name, - organization_id=organization_id, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - ) - - get_assistant_response_content.additional_properties = d - return get_assistant_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_run_response_content.py deleted file mode 100644 index fd857fe..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_assistant_run_response_content.py +++ /dev/null @@ -1,221 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.assistant_run_status import AssistantRunStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetAssistantRunResponseContent") - - -@_attrs_define -class GetAssistantRunResponseContent: - """ - Attributes: - args (list[str]): - assistant_id (str): - assistant_run_id (str): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - knowledge_base_ids (list[str]): - retriever_ids (list[str]): - ruleset_ids (list[str]): - status (AssistantRunStatus): - stream (bool): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - output (Union[Unset, Any]): - status_detail (Union[Unset, Any]): - thread_id (Union[Unset, str]): - """ - - args: list[str] - assistant_id: str - assistant_run_id: str - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - knowledge_base_ids: list[str] - retriever_ids: list[str] - ruleset_ids: list[str] - status: AssistantRunStatus - stream: bool - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - output: Union[Unset, Any] = UNSET - status_detail: Union[Unset, Any] = UNSET - thread_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - assistant_id = self.assistant_id - - assistant_run_id = self.assistant_run_id - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_ids = self.knowledge_base_ids - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - status = self.status.value - - stream = self.stream - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - output = self.output - - status_detail = self.status_detail - - thread_id = self.thread_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "assistant_id": assistant_id, - "assistant_run_id": assistant_run_id, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_ids": knowledge_base_ids, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "status": status, - "stream": stream, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - if thread_id is not UNSET: - field_dict["thread_id"] = thread_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - assistant_id = d.pop("assistant_id") - - assistant_run_id = d.pop("assistant_run_id") - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - status = AssistantRunStatus(d.pop("status")) - - stream = d.pop("stream") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - thread_id = d.pop("thread_id", UNSET) - - get_assistant_run_response_content = cls( - args=args, - assistant_id=assistant_id, - assistant_run_id=assistant_run_id, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - knowledge_base_ids=knowledge_base_ids, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - status=status, - stream=stream, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - output=output, - status_detail=status_detail, - thread_id=thread_id, - ) - - get_assistant_run_response_content.additional_properties = d - return get_assistant_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_bucket_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_bucket_response_content.py deleted file mode 100644 index 11c7c4a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_bucket_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetBucketResponseContent") - - -@_attrs_define -class GetBucketResponseContent: - """ - Attributes: - bucket_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - bucket_id: str - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bucket_id = self.bucket_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bucket_id": bucket_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bucket_id = d.pop("bucket_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_bucket_response_content = cls( - bucket_id=bucket_id, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - get_bucket_response_content.additional_properties = d - return get_bucket_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_config_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_config_response_content.py deleted file mode 100644 index 8562f09..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_config_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetConfigResponseContent") - - -@_attrs_define -class GetConfigResponseContent: - """ - Attributes: - data_lake_s3_bucket (str): - data_lake_s3_region (str): - data_lake_s3_url (str): - google_drive_data_connector_client_id (str): - """ - - data_lake_s3_bucket: str - data_lake_s3_region: str - data_lake_s3_url: str - google_drive_data_connector_client_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake_s3_bucket = self.data_lake_s3_bucket - - data_lake_s3_region = self.data_lake_s3_region - - data_lake_s3_url = self.data_lake_s3_url - - google_drive_data_connector_client_id = self.google_drive_data_connector_client_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake_s3_bucket": data_lake_s3_bucket, - "data_lake_s3_region": data_lake_s3_region, - "data_lake_s3_url": data_lake_s3_url, - "google_drive_data_connector_client_id": google_drive_data_connector_client_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - data_lake_s3_bucket = d.pop("data_lake_s3_bucket") - - data_lake_s3_region = d.pop("data_lake_s3_region") - - data_lake_s3_url = d.pop("data_lake_s3_url") - - google_drive_data_connector_client_id = d.pop("google_drive_data_connector_client_id") - - get_config_response_content = cls( - data_lake_s3_bucket=data_lake_s3_bucket, - data_lake_s3_region=data_lake_s3_region, - data_lake_s3_url=data_lake_s3_url, - google_drive_data_connector_client_id=google_drive_data_connector_client_id, - ) - - get_config_response_content.additional_properties = d - return get_config_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_credit_balance_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_credit_balance_response_content.py deleted file mode 100644 index 5d0ae3d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_credit_balance_response_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetCreditBalanceResponseContent") - - -@_attrs_define -class GetCreditBalanceResponseContent: - """ - Attributes: - balance (float): - notional_value (str): - organization_id (str): - """ - - balance: float - notional_value: str - organization_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - balance = self.balance - - notional_value = self.notional_value - - organization_id = self.organization_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "balance": balance, - "notional_value": notional_value, - "organization_id": organization_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - balance = d.pop("balance") - - notional_value = d.pop("notional_value") - - organization_id = d.pop("organization_id") - - get_credit_balance_response_content = cls( - balance=balance, - notional_value=notional_value, - organization_id=organization_id, - ) - - get_credit_balance_response_content.additional_properties = d - return get_credit_balance_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_connector_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_connector_response_content.py deleted file mode 100644 index 65c1aa2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_connector_response_content.py +++ /dev/null @@ -1,266 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="GetDataConnectorResponseContent") - - -@_attrs_define -class GetDataConnectorResponseContent: - """ - Attributes: - config (Union['DataConnectorConfigUnionType0', 'DataConnectorConfigUnionType1', 'DataConnectorConfigUnionType2', - 'DataConnectorConfigUnionType3', 'DataConnectorConfigUnionType4', 'DataConnectorConfigUnionType5']): - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - bucket_id (Union[Unset, str]): - description (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - """ - - config: Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ] - created_at: datetime.datetime - created_by: str - data_connector_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - bucket_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - - config: dict[str, Any] - if isinstance(self.config, DataConnectorConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - bucket_id = self.bucket_id - - description = self.description - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if bucket_id is not UNSET: - field_dict["bucket_id"] = bucket_id - if description is not UNSET: - field_dict["description"] = description - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_0 = DataConnectorConfigUnionType0.from_dict(data) - - return componentsschemas_data_connector_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_1 = DataConnectorConfigUnionType1.from_dict(data) - - return componentsschemas_data_connector_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_2 = DataConnectorConfigUnionType2.from_dict(data) - - return componentsschemas_data_connector_config_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_3 = DataConnectorConfigUnionType3.from_dict(data) - - return componentsschemas_data_connector_config_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_4 = DataConnectorConfigUnionType4.from_dict(data) - - return componentsschemas_data_connector_config_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_5 = DataConnectorConfigUnionType5.from_dict(data) - - return componentsschemas_data_connector_config_union_type_5 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - bucket_id = d.pop("bucket_id", UNSET) - - description = d.pop("description", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - get_data_connector_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - bucket_id=bucket_id, - description=description, - schedule_expression=schedule_expression, - transforms=transforms, - ) - - get_data_connector_response_content.additional_properties = d - return get_data_connector_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_job_response_content.py deleted file mode 100644 index 1546e98..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_data_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.data_job_status import DataJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="GetDataJobResponseContent") - - -@_attrs_define -class GetDataJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - data_job_id (str): - status (DataJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - data_connector_id: str - data_job_id: str - status: DataJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - data_job_id = self.data_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "data_job_id": data_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - data_job_id = d.pop("data_job_id") - - status = DataJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - get_data_job_response_content = cls( - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - data_job_id=data_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - get_data_job_response_content.additional_properties = d - return get_data_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_deployment_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_deployment_response_content.py deleted file mode 100644 index ceba9ce..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_deployment_response_content.py +++ /dev/null @@ -1,192 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="GetDeploymentResponseContent") - - -@_attrs_define -class GetDeploymentResponseContent: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - status (DeploymentStatus): - completed_at (Union[None, Unset, datetime.datetime]): - function_id (Union[Unset, str]): - status_detail (Union[Unset, Any]): - structure_id (Union[Unset, str]): - tool_id (Union[Unset, str]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - status: DeploymentStatus - completed_at: Union[None, Unset, datetime.datetime] = UNSET - function_id: Union[Unset, str] = UNSET - status_detail: Union[Unset, Any] = UNSET - structure_id: Union[Unset, str] = UNSET - tool_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - status = self.status.value - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - function_id = self.function_id - - status_detail = self.status_detail - - structure_id = self.structure_id - - tool_id = self.tool_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "status": status, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if function_id is not UNSET: - field_dict["function_id"] = function_id - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - if structure_id is not UNSET: - field_dict["structure_id"] = structure_id - if tool_id is not UNSET: - field_dict["tool_id"] = tool_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - status = DeploymentStatus(d.pop("status")) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - function_id = d.pop("function_id", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - structure_id = d.pop("structure_id", UNSET) - - tool_id = d.pop("tool_id", UNSET) - - get_deployment_response_content = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - status=status, - completed_at=completed_at, - function_id=function_id, - status_detail=status_detail, - structure_id=structure_id, - tool_id=tool_id, - ) - - get_deployment_response_content.additional_properties = d - return get_deployment_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_event_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_event_response_content.py deleted file mode 100644 index 482b427..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_event_response_content.py +++ /dev/null @@ -1,109 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetEventResponseContent") - - -@_attrs_define -class GetEventResponseContent: - """ - Attributes: - created_at (datetime.datetime): - event_id (str): - origin (str): - payload (Any): - structure_run_id (str): - timestamp (float): - type_ (str): - """ - - created_at: datetime.datetime - event_id: str - origin: str - payload: Any - structure_run_id: str - timestamp: float - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - event_id = self.event_id - - origin = self.origin - - payload = self.payload - - structure_run_id = self.structure_run_id - - timestamp = self.timestamp - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "event_id": event_id, - "origin": origin, - "payload": payload, - "structure_run_id": structure_run_id, - "timestamp": timestamp, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - event_id = d.pop("event_id") - - origin = d.pop("origin") - - payload = d.pop("payload") - - structure_run_id = d.pop("structure_run_id") - - timestamp = d.pop("timestamp") - - type_ = d.pop("type") - - get_event_response_content = cls( - created_at=created_at, - event_id=event_id, - origin=origin, - payload=payload, - structure_run_id=structure_run_id, - timestamp=timestamp, - type_=type_, - ) - - get_event_response_content.additional_properties = d - return get_event_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_response_content.py deleted file mode 100644 index 7dd04d0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="GetFunctionResponseContent") - - -@_attrs_define -class GetFunctionResponseContent: - """ - Attributes: - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - function_id (str): - latest_deployment_id (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - function_config_file (Union[Unset, str]): - """ - - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - function_id: str - latest_deployment_id: str - name: str - organization_id: str - updated_at: datetime.datetime - function_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - code: dict[str, Any] - if isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_id = self.function_id - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - function_config_file = self.function_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "function_id": function_id, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_id = d.pop("function_id") - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - function_config_file = d.pop("function_config_file", UNSET) - - get_function_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - function_id=function_id, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - updated_at=updated_at, - function_config_file=function_config_file, - ) - - get_function_response_content.additional_properties = d - return get_function_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_run_response_content.py deleted file mode 100644 index 0c2ddcf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_function_run_response_content.py +++ /dev/null @@ -1,232 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.function_run_status import FunctionRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="GetFunctionRunResponseContent") - - -@_attrs_define -class GetFunctionRunResponseContent: - """ - Attributes: - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - function_id (str): - function_run_id (str): - input_ (Any): - runtime_path (str): - started_at (Union[None, datetime.datetime]): - status (FunctionRunStatus): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - function_id: str - function_run_id: str - input_: Any - runtime_path: str - started_at: Union[None, datetime.datetime] - status: FunctionRunStatus - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - function_id = self.function_id - - function_run_id = self.function_run_id - - input_ = self.input_ - - runtime_path = self.runtime_path - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "function_id": function_id, - "function_run_id": function_run_id, - "input": input_, - "runtime_path": runtime_path, - "started_at": started_at, - "status": status, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - function_id = d.pop("function_id") - - function_run_id = d.pop("function_run_id") - - input_ = d.pop("input") - - runtime_path = d.pop("runtime_path") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = FunctionRunStatus(d.pop("status")) - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - get_function_run_response_content = cls( - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - function_id=function_id, - function_run_id=function_run_id, - input_=input_, - runtime_path=runtime_path, - started_at=started_at, - status=status, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - get_function_run_response_content.additional_properties = d - return get_function_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_integration_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_integration_response_content.py deleted file mode 100644 index 837945e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_integration_response_content.py +++ /dev/null @@ -1,187 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.integration_type import IntegrationType - -if TYPE_CHECKING: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - -T = TypeVar("T", bound="GetIntegrationResponseContent") - - -@_attrs_define -class GetIntegrationResponseContent: - """ - Attributes: - assistant_ids (list[str]): - config (Union['IntegrationConfigUnionType0', 'IntegrationConfigUnionType1', 'IntegrationConfigUnionType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - integration_id (str): - name (str): - organization_id (str): - structure_ids (list[str]): - type_ (IntegrationType): - updated_at (datetime.datetime): - """ - - assistant_ids: list[str] - config: Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"] - created_at: datetime.datetime - created_by: str - description: str - integration_id: str - name: str - organization_id: str - structure_ids: list[str] - type_: IntegrationType - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - - assistant_ids = self.assistant_ids - - config: dict[str, Any] - if isinstance(self.config, IntegrationConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - integration_id = self.integration_id - - name = self.name - - organization_id = self.organization_id - - structure_ids = self.structure_ids - - type_ = self.type_.value - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_ids": assistant_ids, - "config": config, - "created_at": created_at, - "created_by": created_by, - "description": description, - "integration_id": integration_id, - "name": name, - "organization_id": organization_id, - "structure_ids": structure_ids, - "type": type_, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - d = dict(src_dict) - assistant_ids = cast(list[str], d.pop("assistant_ids")) - - def _parse_config( - data: object, - ) -> Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_0 = IntegrationConfigUnionType0.from_dict(data) - - return componentsschemas_integration_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_1 = IntegrationConfigUnionType1.from_dict(data) - - return componentsschemas_integration_config_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_2 = IntegrationConfigUnionType2.from_dict(data) - - return componentsschemas_integration_config_union_type_2 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - integration_id = d.pop("integration_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - type_ = IntegrationType(d.pop("type")) - - updated_at = isoparse(d.pop("updated_at")) - - get_integration_response_content = cls( - assistant_ids=assistant_ids, - config=config, - created_at=created_at, - created_by=created_by, - description=description, - integration_id=integration_id, - name=name, - organization_id=organization_id, - structure_ids=structure_ids, - type_=type_, - updated_at=updated_at, - ) - - get_integration_response_content.additional_properties = d - return get_integration_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_invite_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_invite_response_content.py deleted file mode 100644 index 8938d72..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_invite_response_content.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.invite_status import InviteStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="GetInviteResponseContent") - - -@_attrs_define -class GetInviteResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - email (str): - expires_at (datetime.datetime): - invite_id (str): - organization_id (str): - status (InviteStatus): - responded_at (Union[Unset, datetime.datetime]): - """ - - created_at: datetime.datetime - created_by: str - email: str - expires_at: datetime.datetime - invite_id: str - organization_id: str - status: InviteStatus - responded_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - email = self.email - - expires_at = self.expires_at.isoformat() - - invite_id = self.invite_id - - organization_id = self.organization_id - - status = self.status.value - - responded_at: Union[Unset, str] = UNSET - if not isinstance(self.responded_at, Unset): - responded_at = self.responded_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "email": email, - "expires_at": expires_at, - "invite_id": invite_id, - "organization_id": organization_id, - "status": status, - } - ) - if responded_at is not UNSET: - field_dict["responded_at"] = responded_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - email = d.pop("email") - - expires_at = isoparse(d.pop("expires_at")) - - invite_id = d.pop("invite_id") - - organization_id = d.pop("organization_id") - - status = InviteStatus(d.pop("status")) - - _responded_at = d.pop("responded_at", UNSET) - responded_at: Union[Unset, datetime.datetime] - if isinstance(_responded_at, Unset): - responded_at = UNSET - else: - responded_at = isoparse(_responded_at) - - get_invite_response_content = cls( - created_at=created_at, - created_by=created_by, - email=email, - expires_at=expires_at, - invite_id=invite_id, - organization_id=organization_id, - status=status, - responded_at=responded_at, - ) - - get_invite_response_content.additional_properties = d - return get_invite_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_job_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_job_response_content.py deleted file mode 100644 index a7cb526..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_job_response_content.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.knowledge_base_job_status import KnowledgeBaseJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="GetKnowledgeBaseJobResponseContent") - - -@_attrs_define -class GetKnowledgeBaseJobResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_job_id (str): - status (KnowledgeBaseJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_job_id: str - status: KnowledgeBaseJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_job_id = self.knowledge_base_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_job_id": knowledge_base_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_job_id = d.pop("knowledge_base_job_id") - - status = KnowledgeBaseJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - get_knowledge_base_job_response_content = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_job_id=knowledge_base_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - get_knowledge_base_job_response_content.additional_properties = d - return get_knowledge_base_job_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_query_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_query_response_content.py deleted file mode 100644 index 44d8a5b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_query_response_content.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.entry import Entry - - -T = TypeVar("T", bound="GetKnowledgeBaseQueryResponseContent") - - -@_attrs_define -class GetKnowledgeBaseQueryResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - entries (list['Entry']): - knowledge_base_id (str): - knowledge_base_query_id (str): - query (str): - """ - - created_at: datetime.datetime - created_by: str - entries: list["Entry"] - knowledge_base_id: str - knowledge_base_query_id: str - query: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - entries = [] - for entries_item_data in self.entries: - entries_item = entries_item_data.to_dict() - entries.append(entries_item) - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_query_id = self.knowledge_base_query_id - - query = self.query - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "entries": entries, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_query_id": knowledge_base_query_id, - "query": query, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.entry import Entry - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - entries = [] - _entries = d.pop("entries") - for entries_item_data in _entries: - entries_item = Entry.from_dict(entries_item_data) - - entries.append(entries_item) - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_query_id = d.pop("knowledge_base_query_id") - - query = d.pop("query") - - get_knowledge_base_query_response_content = cls( - created_at=created_at, - created_by=created_by, - entries=entries, - knowledge_base_id=knowledge_base_id, - knowledge_base_query_id=knowledge_base_query_id, - query=query, - ) - - get_knowledge_base_query_response_content.additional_properties = d - return get_knowledge_base_query_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_response_content.py deleted file mode 100644 index 045d757..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_response_content.py +++ /dev/null @@ -1,260 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="GetKnowledgeBaseResponseContent") - - -@_attrs_define -class GetKnowledgeBaseResponseContent: - """ - Attributes: - asset_paths (list[str]): - config (Union['KnowledgeBaseConfigUnionType0', 'KnowledgeBaseConfigUnionType1', 'KnowledgeBaseConfigUnionType2', - 'KnowledgeBaseConfigUnionType3']): - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - asset_paths: list[str] - config: Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ] - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - - asset_paths = self.asset_paths - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_paths": asset_paths, - "config": config, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - asset_paths = cast(list[str], d.pop("asset_paths")) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_0 = KnowledgeBaseConfigUnionType0.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_1 = KnowledgeBaseConfigUnionType1.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_2 = KnowledgeBaseConfigUnionType2.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_3 = KnowledgeBaseConfigUnionType3.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_3 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - get_knowledge_base_response_content = cls( - asset_paths=asset_paths, - config=config, - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - description=description, - embedding_model=embedding_model, - schedule_expression=schedule_expression, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - get_knowledge_base_response_content.additional_properties = d - return get_knowledge_base_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_search_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_search_response_content.py deleted file mode 100644 index d568935..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_knowledge_base_search_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetKnowledgeBaseSearchResponseContent") - - -@_attrs_define -class GetKnowledgeBaseSearchResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_search_id (str): - query (str): - result (str): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_search_id: str - query: str - result: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_search_id = self.knowledge_base_search_id - - query = self.query - - result = self.result - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_search_id": knowledge_base_search_id, - "query": query, - "result": result, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_search_id = d.pop("knowledge_base_search_id") - - query = d.pop("query") - - result = d.pop("result") - - get_knowledge_base_search_response_content = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_search_id=knowledge_base_search_id, - query=query, - result=result, - ) - - get_knowledge_base_search_response_content.additional_properties = d - return get_knowledge_base_search_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_library_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_library_response_content.py deleted file mode 100644 index d3f18f2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_library_response_content.py +++ /dev/null @@ -1,144 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="GetLibraryResponseContent") - - -@_attrs_define -class GetLibraryResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - data_connector_ids (list[str]): - knowledge_base_ids (list[str]): - library_id (str): - name (str): - organization_id (str): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - data_connector_ids: list[str] - knowledge_base_ids: list[str] - library_id: str - name: str - organization_id: str - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_ids = self.data_connector_ids - - knowledge_base_ids = self.knowledge_base_ids - - library_id = self.library_id - - name = self.name - - organization_id = self.organization_id - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "data_connector_ids": data_connector_ids, - "knowledge_base_ids": knowledge_base_ids, - "library_id": library_id, - "name": name, - "organization_id": organization_id, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - library_id = d.pop("library_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - get_library_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - data_connector_ids=data_connector_ids, - knowledge_base_ids=knowledge_base_ids, - library_id=library_id, - name=name, - organization_id=organization_id, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - get_library_response_content.additional_properties = d - return get_library_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_message_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_message_response_content.py deleted file mode 100644 index 5816070..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_message_response_content.py +++ /dev/null @@ -1,131 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="GetMessageResponseContent") - - -@_attrs_define -class GetMessageResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - index (float): - input_ (str): - message_id (str): - metadata (Metadata): - output (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - index: float - input_: str - message_id: str - metadata: "Metadata" - output: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - index = self.index - - input_ = self.input_ - - message_id = self.message_id - - metadata = self.metadata.to_dict() - - output = self.output - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "index": index, - "input": input_, - "message_id": message_id, - "metadata": metadata, - "output": output, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - index = d.pop("index") - - input_ = d.pop("input") - - message_id = d.pop("message_id") - - metadata = Metadata.from_dict(d.pop("metadata")) - - output = d.pop("output") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_message_response_content = cls( - created_at=created_at, - created_by=created_by, - index=index, - input_=input_, - message_id=message_id, - metadata=metadata, - output=output, - thread_id=thread_id, - updated_at=updated_at, - ) - - get_message_response_content.additional_properties = d - return get_message_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_component_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_component_response_content.py deleted file mode 100644 index 3ac17b3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_component_response_content.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="GetRetrieverComponentResponseContent") - - -@_attrs_define -class GetRetrieverComponentResponseContent: - """ - Attributes: - config (Any): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_component_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - config: Any - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_component_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config = self.config - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_component_id = self.retriever_component_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_component_id": retriever_component_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_component_id = d.pop("retriever_component_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - get_retriever_component_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_component_id=retriever_component_id, - type_=type_, - updated_at=updated_at, - description=description, - ) - - get_retriever_component_response_content.additional_properties = d - return get_retriever_component_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_response_content.py deleted file mode 100644 index a9bb7eb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_retriever_response_content.py +++ /dev/null @@ -1,142 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.retriever_component_detail import RetrieverComponentDetail - - -T = TypeVar("T", bound="GetRetrieverResponseContent") - - -@_attrs_define -class GetRetrieverResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_components (list['RetrieverComponentDetail']): - retriever_components_schema (Any): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_components: list["RetrieverComponentDetail"] - retriever_components_schema: Any - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - retriever_components_schema = self.retriever_components_schema - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_components": retriever_components, - "retriever_components_schema": retriever_components_schema, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_detail import RetrieverComponentDetail - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_components = [] - _retriever_components = d.pop("retriever_components") - for retriever_components_item_data in _retriever_components: - retriever_components_item = RetrieverComponentDetail.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - retriever_components_schema = d.pop("retriever_components_schema") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - get_retriever_response_content = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_components=retriever_components, - retriever_components_schema=retriever_components_schema, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - get_retriever_response_content.additional_properties = d - return get_retriever_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_rule_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_rule_response_content.py deleted file mode 100644 index a952c59..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_rule_response_content.py +++ /dev/null @@ -1,123 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="GetRuleResponseContent") - - -@_attrs_define -class GetRuleResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - metadata (Metadata): - name (str): - organization_id (str): - rule (str): - rule_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - metadata: "Metadata" - name: str - organization_id: str - rule: str - rule_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule = self.rule - - rule_id = self.rule_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule": rule, - "rule_id": rule_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule = d.pop("rule") - - rule_id = d.pop("rule_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_rule_response_content = cls( - created_at=created_at, - created_by=created_by, - metadata=metadata, - name=name, - organization_id=organization_id, - rule=rule, - rule_id=rule_id, - updated_at=updated_at, - ) - - get_rule_response_content.additional_properties = d - return get_rule_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_ruleset_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_ruleset_response_content.py deleted file mode 100644 index 37936a7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_ruleset_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="GetRulesetResponseContent") - - -@_attrs_define -class GetRulesetResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - description (str): - metadata (Metadata): - name (str): - organization_id (str): - rule_ids (list[str]): - ruleset_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - description: str - metadata: "Metadata" - name: str - organization_id: str - rule_ids: list[str] - ruleset_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule_ids = self.rule_ids - - ruleset_id = self.ruleset_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "description": description, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule_ids": rule_ids, - "ruleset_id": ruleset_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule_ids = cast(list[str], d.pop("rule_ids")) - - ruleset_id = d.pop("ruleset_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_ruleset_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - description=description, - metadata=metadata, - name=name, - organization_id=organization_id, - rule_ids=rule_ids, - ruleset_id=ruleset_id, - updated_at=updated_at, - ) - - get_ruleset_response_content.additional_properties = d - return get_ruleset_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_secret_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_secret_response_content.py deleted file mode 100644 index 3b3b613..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_secret_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetSecretResponseContent") - - -@_attrs_define -class GetSecretResponseContent: - """ - Attributes: - created_at (datetime.datetime): - last_used (datetime.datetime): - name (str): - organization_id (str): - secret_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - last_used: datetime.datetime - name: str - organization_id: str - secret_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - secret_id = self.secret_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "secret_id": secret_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - secret_id = d.pop("secret_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_secret_response_content = cls( - created_at=created_at, - last_used=last_used, - name=name, - organization_id=organization_id, - secret_id=secret_id, - updated_at=updated_at, - ) - - get_secret_response_content.additional_properties = d - return get_secret_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_response_content.py deleted file mode 100644 index 5d97199..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_response_content.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="GetStructureResponseContent") - - -@_attrs_define -class GetStructureResponseContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - get_structure_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - get_structure_response_content.additional_properties = d - return get_structure_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_run_response_content.py deleted file mode 100644 index 0d90306..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_structure_run_response_content.py +++ /dev/null @@ -1,223 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.structure_run_status import StructureRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="GetStructureRunResponseContent") - - -@_attrs_define -class GetStructureRunResponseContent: - """ - Attributes: - args (list[str]): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - started_at (Union[None, datetime.datetime]): - status (StructureRunStatus): - structure_id (str): - structure_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - args: list[str] - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - started_at: Union[None, datetime.datetime] - status: StructureRunStatus - structure_id: str - structure_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - structure_id = self.structure_id - - structure_run_id = self.structure_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "started_at": started_at, - "status": status, - "structure_id": structure_id, - "structure_run_id": structure_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = StructureRunStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - structure_run_id = d.pop("structure_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - get_structure_run_response_content = cls( - args=args, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - started_at=started_at, - status=status, - structure_id=structure_id, - structure_run_id=structure_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - get_structure_run_response_content.additional_properties = d - return get_structure_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_structures_dashboard_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_structures_dashboard_response_content.py deleted file mode 100644 index f9483e4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_structures_dashboard_response_content.py +++ /dev/null @@ -1,198 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.deployment_count_gauge import DeploymentCountGauge - from ..models.deployment_duration_gauge import DeploymentDurationGauge - from ..models.deployment_error_rate_gauge import DeploymentErrorRateGauge - from ..models.duration_plot import DurationPlot - from ..models.error_rate_gauge import ErrorRateGauge - from ..models.run_count_gauge import RunCountGauge - from ..models.run_duration_gauge import RunDurationGauge - from ..models.token_count_gauge import TokenCountGauge - - -T = TypeVar("T", bound="GetStructuresDashboardResponseContent") - - -@_attrs_define -class GetStructuresDashboardResponseContent: - """ - Attributes: - deployment_count_gauge (Union[Unset, DeploymentCountGauge]): - deployment_duration_gauge (Union[Unset, DeploymentDurationGauge]): - deployment_error_rate_gauge (Union[Unset, DeploymentErrorRateGauge]): - duration_plot (Union[Unset, DurationPlot]): - error_rate_gauge (Union[Unset, ErrorRateGauge]): - run_count_gauge (Union[Unset, RunCountGauge]): - run_duration_gauge (Union[Unset, RunDurationGauge]): - token_count_gauge (Union[Unset, TokenCountGauge]): - """ - - deployment_count_gauge: Union[Unset, "DeploymentCountGauge"] = UNSET - deployment_duration_gauge: Union[Unset, "DeploymentDurationGauge"] = UNSET - deployment_error_rate_gauge: Union[Unset, "DeploymentErrorRateGauge"] = UNSET - duration_plot: Union[Unset, "DurationPlot"] = UNSET - error_rate_gauge: Union[Unset, "ErrorRateGauge"] = UNSET - run_count_gauge: Union[Unset, "RunCountGauge"] = UNSET - run_duration_gauge: Union[Unset, "RunDurationGauge"] = UNSET - token_count_gauge: Union[Unset, "TokenCountGauge"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - deployment_count_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.deployment_count_gauge, Unset): - deployment_count_gauge = self.deployment_count_gauge.to_dict() - - deployment_duration_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.deployment_duration_gauge, Unset): - deployment_duration_gauge = self.deployment_duration_gauge.to_dict() - - deployment_error_rate_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.deployment_error_rate_gauge, Unset): - deployment_error_rate_gauge = self.deployment_error_rate_gauge.to_dict() - - duration_plot: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.duration_plot, Unset): - duration_plot = self.duration_plot.to_dict() - - error_rate_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.error_rate_gauge, Unset): - error_rate_gauge = self.error_rate_gauge.to_dict() - - run_count_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.run_count_gauge, Unset): - run_count_gauge = self.run_count_gauge.to_dict() - - run_duration_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.run_duration_gauge, Unset): - run_duration_gauge = self.run_duration_gauge.to_dict() - - token_count_gauge: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.token_count_gauge, Unset): - token_count_gauge = self.token_count_gauge.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if deployment_count_gauge is not UNSET: - field_dict["deployment_count_gauge"] = deployment_count_gauge - if deployment_duration_gauge is not UNSET: - field_dict["deployment_duration_gauge"] = deployment_duration_gauge - if deployment_error_rate_gauge is not UNSET: - field_dict["deployment_error_rate_gauge"] = deployment_error_rate_gauge - if duration_plot is not UNSET: - field_dict["duration_plot"] = duration_plot - if error_rate_gauge is not UNSET: - field_dict["error_rate_gauge"] = error_rate_gauge - if run_count_gauge is not UNSET: - field_dict["run_count_gauge"] = run_count_gauge - if run_duration_gauge is not UNSET: - field_dict["run_duration_gauge"] = run_duration_gauge - if token_count_gauge is not UNSET: - field_dict["token_count_gauge"] = token_count_gauge - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.deployment_count_gauge import DeploymentCountGauge - from ..models.deployment_duration_gauge import DeploymentDurationGauge - from ..models.deployment_error_rate_gauge import DeploymentErrorRateGauge - from ..models.duration_plot import DurationPlot - from ..models.error_rate_gauge import ErrorRateGauge - from ..models.run_count_gauge import RunCountGauge - from ..models.run_duration_gauge import RunDurationGauge - from ..models.token_count_gauge import TokenCountGauge - - d = dict(src_dict) - _deployment_count_gauge = d.pop("deployment_count_gauge", UNSET) - deployment_count_gauge: Union[Unset, DeploymentCountGauge] - if isinstance(_deployment_count_gauge, Unset): - deployment_count_gauge = UNSET - else: - deployment_count_gauge = DeploymentCountGauge.from_dict(_deployment_count_gauge) - - _deployment_duration_gauge = d.pop("deployment_duration_gauge", UNSET) - deployment_duration_gauge: Union[Unset, DeploymentDurationGauge] - if isinstance(_deployment_duration_gauge, Unset): - deployment_duration_gauge = UNSET - else: - deployment_duration_gauge = DeploymentDurationGauge.from_dict(_deployment_duration_gauge) - - _deployment_error_rate_gauge = d.pop("deployment_error_rate_gauge", UNSET) - deployment_error_rate_gauge: Union[Unset, DeploymentErrorRateGauge] - if isinstance(_deployment_error_rate_gauge, Unset): - deployment_error_rate_gauge = UNSET - else: - deployment_error_rate_gauge = DeploymentErrorRateGauge.from_dict(_deployment_error_rate_gauge) - - _duration_plot = d.pop("duration_plot", UNSET) - duration_plot: Union[Unset, DurationPlot] - if isinstance(_duration_plot, Unset): - duration_plot = UNSET - else: - duration_plot = DurationPlot.from_dict(_duration_plot) - - _error_rate_gauge = d.pop("error_rate_gauge", UNSET) - error_rate_gauge: Union[Unset, ErrorRateGauge] - if isinstance(_error_rate_gauge, Unset): - error_rate_gauge = UNSET - else: - error_rate_gauge = ErrorRateGauge.from_dict(_error_rate_gauge) - - _run_count_gauge = d.pop("run_count_gauge", UNSET) - run_count_gauge: Union[Unset, RunCountGauge] - if isinstance(_run_count_gauge, Unset): - run_count_gauge = UNSET - else: - run_count_gauge = RunCountGauge.from_dict(_run_count_gauge) - - _run_duration_gauge = d.pop("run_duration_gauge", UNSET) - run_duration_gauge: Union[Unset, RunDurationGauge] - if isinstance(_run_duration_gauge, Unset): - run_duration_gauge = UNSET - else: - run_duration_gauge = RunDurationGauge.from_dict(_run_duration_gauge) - - _token_count_gauge = d.pop("token_count_gauge", UNSET) - token_count_gauge: Union[Unset, TokenCountGauge] - if isinstance(_token_count_gauge, Unset): - token_count_gauge = UNSET - else: - token_count_gauge = TokenCountGauge.from_dict(_token_count_gauge) - - get_structures_dashboard_response_content = cls( - deployment_count_gauge=deployment_count_gauge, - deployment_duration_gauge=deployment_duration_gauge, - deployment_error_rate_gauge=deployment_error_rate_gauge, - duration_plot=duration_plot, - error_rate_gauge=error_rate_gauge, - run_count_gauge=run_count_gauge, - run_duration_gauge=run_duration_gauge, - token_count_gauge=token_count_gauge, - ) - - get_structures_dashboard_response_content.additional_properties = d - return get_structures_dashboard_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_thread_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_thread_response_content.py deleted file mode 100644 index 9109419..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_thread_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="GetThreadResponseContent") - - -@_attrs_define -class GetThreadResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - message_count (float): - messages_length (float): - metadata (Metadata): - name (str): - organization_id (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - message_count: float - messages_length: float - metadata: "Metadata" - name: str - organization_id: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - message_count = self.message_count - - messages_length = self.messages_length - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "message_count": message_count, - "messages_length": messages_length, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - message_count = d.pop("message_count") - - messages_length = d.pop("messages_length") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - get_thread_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - message_count=message_count, - messages_length=messages_length, - metadata=metadata, - name=name, - organization_id=organization_id, - thread_id=thread_id, - updated_at=updated_at, - ) - - get_thread_response_content.additional_properties = d - return get_thread_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_token_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_token_response_content.py deleted file mode 100644 index 832222f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_token_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GetTokenResponseContent") - - -@_attrs_define -class GetTokenResponseContent: - """ - Attributes: - access_token (str): - """ - - access_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - access_token = self.access_token - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "access_token": access_token, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - access_token = d.pop("access_token") - - get_token_response_content = cls( - access_token=access_token, - ) - - get_token_response_content.additional_properties = d - return get_token_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_response_content.py deleted file mode 100644 index 7327228..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="GetToolResponseContent") - - -@_attrs_define -class GetToolResponseContent: - """ - Attributes: - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - tool_id (str): - updated_at (datetime.datetime): - tool_config_file (Union[Unset, str]): - """ - - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - tool_id: str - updated_at: datetime.datetime - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - code: dict[str, Any] - if isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - tool_id = self.tool_id - - updated_at = self.updated_at.isoformat() - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "tool_id": tool_id, - "updated_at": updated_at, - } - ) - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - tool_id = d.pop("tool_id") - - updated_at = isoparse(d.pop("updated_at")) - - tool_config_file = d.pop("tool_config_file", UNSET) - - get_tool_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - tool_id=tool_id, - updated_at=updated_at, - tool_config_file=tool_config_file, - ) - - get_tool_response_content.additional_properties = d - return get_tool_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_run_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_run_response_content.py deleted file mode 100644 index b3bbc86..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_tool_run_response_content.py +++ /dev/null @@ -1,232 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.tool_run_status import ToolRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="GetToolRunResponseContent") - - -@_attrs_define -class GetToolRunResponseContent: - """ - Attributes: - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - input_ (Any): - runtime_path (str): - started_at (Union[None, datetime.datetime]): - status (ToolRunStatus): - tool_id (str): - tool_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - input_: Any - runtime_path: str - started_at: Union[None, datetime.datetime] - status: ToolRunStatus - tool_id: str - tool_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - input_ = self.input_ - - runtime_path = self.runtime_path - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - tool_id = self.tool_id - - tool_run_id = self.tool_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "input": input_, - "runtime_path": runtime_path, - "started_at": started_at, - "status": status, - "tool_id": tool_id, - "tool_run_id": tool_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - input_ = d.pop("input") - - runtime_path = d.pop("runtime_path") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = ToolRunStatus(d.pop("status")) - - tool_id = d.pop("tool_id") - - tool_run_id = d.pop("tool_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - get_tool_run_response_content = cls( - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - input_=input_, - runtime_path=runtime_path, - started_at=started_at, - status=status, - tool_id=tool_id, - tool_run_id=tool_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - get_tool_run_response_content.additional_properties = d - return get_tool_run_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_usage_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_usage_response_content.py deleted file mode 100644 index 67212cc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_usage_response_content.py +++ /dev/null @@ -1,117 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="GetUsageResponseContent") - - -@_attrs_define -class GetUsageResponseContent: - """ - Attributes: - bytes_ingested (float): - bytes_ingested_limit (float): - rag_queries (float): - rag_queries_limit (float): - runtime_seconds (float): - runtime_seconds_limit (float): - usage_period_end (datetime.datetime): - usage_period_start (datetime.datetime): - """ - - bytes_ingested: float - bytes_ingested_limit: float - rag_queries: float - rag_queries_limit: float - runtime_seconds: float - runtime_seconds_limit: float - usage_period_end: datetime.datetime - usage_period_start: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bytes_ingested = self.bytes_ingested - - bytes_ingested_limit = self.bytes_ingested_limit - - rag_queries = self.rag_queries - - rag_queries_limit = self.rag_queries_limit - - runtime_seconds = self.runtime_seconds - - runtime_seconds_limit = self.runtime_seconds_limit - - usage_period_end = self.usage_period_end.isoformat() - - usage_period_start = self.usage_period_start.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bytes_ingested": bytes_ingested, - "bytes_ingested_limit": bytes_ingested_limit, - "rag_queries": rag_queries, - "rag_queries_limit": rag_queries_limit, - "runtime_seconds": runtime_seconds, - "runtime_seconds_limit": runtime_seconds_limit, - "usage_period_end": usage_period_end, - "usage_period_start": usage_period_start, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bytes_ingested = d.pop("bytes_ingested") - - bytes_ingested_limit = d.pop("bytes_ingested_limit") - - rag_queries = d.pop("rag_queries") - - rag_queries_limit = d.pop("rag_queries_limit") - - runtime_seconds = d.pop("runtime_seconds") - - runtime_seconds_limit = d.pop("runtime_seconds_limit") - - usage_period_end = isoparse(d.pop("usage_period_end")) - - usage_period_start = isoparse(d.pop("usage_period_start")) - - get_usage_response_content = cls( - bytes_ingested=bytes_ingested, - bytes_ingested_limit=bytes_ingested_limit, - rag_queries=rag_queries, - rag_queries_limit=rag_queries_limit, - runtime_seconds=runtime_seconds, - runtime_seconds_limit=runtime_seconds_limit, - usage_period_end=usage_period_end, - usage_period_start=usage_period_start, - ) - - get_usage_response_content.additional_properties = d - return get_usage_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/get_user_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/get_user_response_content.py deleted file mode 100644 index 4a87060..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/get_user_response_content.py +++ /dev/null @@ -1,104 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="GetUserResponseContent") - - -@_attrs_define -class GetUserResponseContent: - """ - Attributes: - created_at (datetime.datetime): - email (str): - organizations (list[str]): - updated_at (datetime.datetime): - user_id (str): - name (Union[Unset, str]): - """ - - created_at: datetime.datetime - email: str - organizations: list[str] - updated_at: datetime.datetime - user_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]: - created_at = self.created_at.isoformat() - - email = self.email - - organizations = self.organizations - - updated_at = self.updated_at.isoformat() - - user_id = self.user_id - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "email": email, - "organizations": organizations, - "updated_at": updated_at, - "user_id": user_id, - } - ) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - email = d.pop("email") - - organizations = cast(list[str], d.pop("organizations")) - - updated_at = isoparse(d.pop("updated_at")) - - user_id = d.pop("user_id") - - name = d.pop("name", UNSET) - - get_user_response_content = cls( - created_at=created_at, - email=email, - organizations=organizations, - updated_at=updated_at, - user_id=user_id, - name=name, - ) - - get_user_response_content.additional_properties = d - return get_user_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_detail.py deleted file mode 100644 index 3544fea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_detail.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GitHubAppDetail") - - -@_attrs_define -class GitHubAppDetail: - """ - Attributes: - app_id (str): - integration_endpoint (str): - private_key_secret_ref (str): - webhook_secret_ref (str): - """ - - app_id: str - integration_endpoint: str - private_key_secret_ref: str - webhook_secret_ref: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - integration_endpoint = self.integration_endpoint - - private_key_secret_ref = self.private_key_secret_ref - - webhook_secret_ref = self.webhook_secret_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_id": app_id, - "integration_endpoint": integration_endpoint, - "private_key_secret_ref": private_key_secret_ref, - "webhook_secret_ref": webhook_secret_ref, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_id = d.pop("app_id") - - integration_endpoint = d.pop("integration_endpoint") - - private_key_secret_ref = d.pop("private_key_secret_ref") - - webhook_secret_ref = d.pop("webhook_secret_ref") - - git_hub_app_detail = cls( - app_id=app_id, - integration_endpoint=integration_endpoint, - private_key_secret_ref=private_key_secret_ref, - webhook_secret_ref=webhook_secret_ref, - ) - - git_hub_app_detail.additional_properties = d - return git_hub_app_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_input.py deleted file mode 100644 index 1d7b255..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_app_input.py +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GitHubAppInput") - - -@_attrs_define -class GitHubAppInput: - """ - Attributes: - app_id (Union[Unset, str]): - private_key_secret_ref (Union[Unset, str]): - webhook_secret_ref (Union[Unset, str]): - """ - - app_id: Union[Unset, str] = UNSET - private_key_secret_ref: Union[Unset, str] = UNSET - webhook_secret_ref: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_id = self.app_id - - private_key_secret_ref = self.private_key_secret_ref - - webhook_secret_ref = self.webhook_secret_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if app_id is not UNSET: - field_dict["app_id"] = app_id - if private_key_secret_ref is not UNSET: - field_dict["private_key_secret_ref"] = private_key_secret_ref - if webhook_secret_ref is not UNSET: - field_dict["webhook_secret_ref"] = webhook_secret_ref - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_id = d.pop("app_id", UNSET) - - private_key_secret_ref = d.pop("private_key_secret_ref", UNSET) - - webhook_secret_ref = d.pop("webhook_secret_ref", UNSET) - - git_hub_app_input = cls( - app_id=app_id, - private_key_secret_ref=private_key_secret_ref, - webhook_secret_ref=webhook_secret_ref, - ) - - git_hub_app_input.additional_properties = d - return git_hub_app_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_credentials_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_credentials_input.py deleted file mode 100644 index e5011c3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/git_hub_credentials_input.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GitHubCredentialsInput") - - -@_attrs_define -class GitHubCredentialsInput: - """ - Attributes: - auth_code (str): - """ - - auth_code: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - auth_code = self.auth_code - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "auth_code": auth_code, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - auth_code = d.pop("auth_code") - - git_hub_credentials_input = cls( - auth_code=auth_code, - ) - - git_hub_credentials_input.additional_properties = d - return git_hub_credentials_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source.py deleted file mode 100644 index 9fe04b4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GithubCodeSource") - - -@_attrs_define -class GithubCodeSource: - """ - Attributes: - commit_sha (Union[Unset, str]): - """ - - commit_sha: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - commit_sha = self.commit_sha - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if commit_sha is not UNSET: - field_dict["commit_sha"] = commit_sha - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - commit_sha = d.pop("commit_sha", UNSET) - - github_code_source = cls( - commit_sha=commit_sha, - ) - - github_code_source.additional_properties = d - return github_code_source - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source_input.py deleted file mode 100644 index c733600..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_code_source_input.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GithubCodeSourceInput") - - -@_attrs_define -class GithubCodeSourceInput: - """ - Attributes: - access_token (Union[Unset, str]): - commit_sha (Union[Unset, str]): - """ - - access_token: Union[Unset, str] = UNSET - commit_sha: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - access_token = self.access_token - - commit_sha = self.commit_sha - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if access_token is not UNSET: - field_dict["access_token"] = access_token - if commit_sha is not UNSET: - field_dict["commit_sha"] = commit_sha - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - access_token = d.pop("access_token", UNSET) - - commit_sha = d.pop("commit_sha", UNSET) - - github_code_source_input = cls( - access_token=access_token, - commit_sha=commit_sha, - ) - - github_code_source_input.additional_properties = d - return github_code_source_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code.py deleted file mode 100644 index b86a402..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_function_code_push_config import GithubFunctionCodePushConfig - - -T = TypeVar("T", bound="GithubFunctionCode") - - -@_attrs_define -class GithubFunctionCode: - """ - Attributes: - name (str): - owner (str): - push (GithubFunctionCodePushConfig): - """ - - name: str - owner: str - push: "GithubFunctionCodePushConfig" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - owner = self.owner - - push = self.push.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "owner": owner, - "push": push, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_function_code_push_config import GithubFunctionCodePushConfig - - d = dict(src_dict) - name = d.pop("name") - - owner = d.pop("owner") - - push = GithubFunctionCodePushConfig.from_dict(d.pop("push")) - - github_function_code = cls( - name=name, - owner=owner, - push=push, - ) - - github_function_code.additional_properties = d - return github_function_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code_push_config.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code_push_config.py deleted file mode 100644 index 99bf7f5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_function_code_push_config.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GithubFunctionCodePushConfig") - - -@_attrs_define -class GithubFunctionCodePushConfig: - """ - Attributes: - branch (str): - tag (Union[Unset, str]): - """ - - branch: str - tag: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - tag = self.tag - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - } - ) - if tag is not UNSET: - field_dict["tag"] = tag - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - tag = d.pop("tag", UNSET) - - github_function_code_push_config = cls( - branch=branch, - tag=tag, - ) - - github_function_code_push_config.additional_properties = d - return github_function_code_push_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/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code.py deleted file mode 100644 index a76d2b4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_structure_code_push_config import GithubStructureCodePushConfig - - -T = TypeVar("T", bound="GithubStructureCode") - - -@_attrs_define -class GithubStructureCode: - """ - Attributes: - name (str): - owner (str): - push (GithubStructureCodePushConfig): - """ - - name: str - owner: str - push: "GithubStructureCodePushConfig" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - owner = self.owner - - push = self.push.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "owner": owner, - "push": push, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_structure_code_push_config import GithubStructureCodePushConfig - - d = dict(src_dict) - name = d.pop("name") - - owner = d.pop("owner") - - push = GithubStructureCodePushConfig.from_dict(d.pop("push")) - - github_structure_code = cls( - name=name, - owner=owner, - push=push, - ) - - github_structure_code.additional_properties = d - return github_structure_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code_push_config.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code_push_config.py deleted file mode 100644 index d03439e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_structure_code_push_config.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GithubStructureCodePushConfig") - - -@_attrs_define -class GithubStructureCodePushConfig: - """ - Attributes: - branch (str): - tag (Union[Unset, str]): - """ - - branch: str - tag: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - tag = self.tag - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - } - ) - if tag is not UNSET: - field_dict["tag"] = tag - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - tag = d.pop("tag", UNSET) - - github_structure_code_push_config = cls( - branch=branch, - tag=tag, - ) - - github_structure_code_push_config.additional_properties = d - return github_structure_code_push_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/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code.py deleted file mode 100644 index 7a86920..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_tool_code_push_config import GithubToolCodePushConfig - - -T = TypeVar("T", bound="GithubToolCode") - - -@_attrs_define -class GithubToolCode: - """ - Attributes: - name (str): - owner (str): - push (GithubToolCodePushConfig): - """ - - name: str - owner: str - push: "GithubToolCodePushConfig" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - owner = self.owner - - push = self.push.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "owner": owner, - "push": push, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_tool_code_push_config import GithubToolCodePushConfig - - d = dict(src_dict) - name = d.pop("name") - - owner = d.pop("owner") - - push = GithubToolCodePushConfig.from_dict(d.pop("push")) - - github_tool_code = cls( - name=name, - owner=owner, - push=push, - ) - - github_tool_code.additional_properties = d - return github_tool_code - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code_push_config.py b/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code_push_config.py deleted file mode 100644 index 59328b0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/github_tool_code_push_config.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GithubToolCodePushConfig") - - -@_attrs_define -class GithubToolCodePushConfig: - """ - Attributes: - branch (str): - tag (Union[Unset, str]): - """ - - branch: str - tag: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - branch = self.branch - - tag = self.tag - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "branch": branch, - } - ) - if tag is not UNSET: - field_dict["tag"] = tag - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - branch = d.pop("branch") - - tag = d.pop("tag", UNSET) - - github_tool_code_push_config = cls( - branch=branch, - tag=tag, - ) - - github_tool_code_push_config.additional_properties = d - return github_tool_code_push_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/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_detail.py deleted file mode 100644 index f14a82c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_detail.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GoogleDriveDetail") - - -@_attrs_define -class GoogleDriveDetail: - """ - Attributes: - access_token (str): - file_ids (list[str]): - encoding (Union[Unset, str]): - """ - - access_token: str - file_ids: list[str] - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - access_token = self.access_token - - file_ids = self.file_ids - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "access_token": access_token, - "file_ids": file_ids, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - access_token = d.pop("access_token") - - file_ids = cast(list[str], d.pop("file_ids")) - - encoding = d.pop("encoding", UNSET) - - google_drive_detail = cls( - access_token=access_token, - file_ids=file_ids, - encoding=encoding, - ) - - google_drive_detail.additional_properties = d - return google_drive_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_input.py deleted file mode 100644 index ba37946..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/google_drive_input.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GoogleDriveInput") - - -@_attrs_define -class GoogleDriveInput: - """ - Attributes: - auth_code (str): - file_ids (list[str]): - encoding (Union[Unset, str]): - """ - - auth_code: str - file_ids: list[str] - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - auth_code = self.auth_code - - file_ids = self.file_ids - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "auth_code": auth_code, - "file_ids": file_ids, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - auth_code = d.pop("auth_code") - - file_ids = cast(list[str], d.pop("file_ids")) - - encoding = d.pop("encoding", UNSET) - - google_drive_input = cls( - auth_code=auth_code, - file_ids=file_ids, - encoding=encoding, - ) - - google_drive_input.additional_properties = d - return google_drive_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_detail.py deleted file mode 100644 index b45da77..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_detail.py +++ /dev/null @@ -1,115 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.structured_column_detail import StructuredColumnDetail - from ..models.unstructured_column_detail import UnstructuredColumnDetail - - -T = TypeVar("T", bound="GTCHybidSQLPGVectorKnowledgeBaseDetail") - - -@_attrs_define -class GTCHybidSQLPGVectorKnowledgeBaseDetail: - """ - Attributes: - embedding_model (str): - query_schema (Any): - structured_columns (list['StructuredColumnDetail']): - unstructured_columns (list['UnstructuredColumnDetail']): - use_default_embedding_model (bool): - """ - - embedding_model: str - query_schema: Any - structured_columns: list["StructuredColumnDetail"] - unstructured_columns: list["UnstructuredColumnDetail"] - use_default_embedding_model: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - embedding_model = self.embedding_model - - query_schema = self.query_schema - - structured_columns = [] - for structured_columns_item_data in self.structured_columns: - structured_columns_item = structured_columns_item_data.to_dict() - structured_columns.append(structured_columns_item) - - unstructured_columns = [] - for unstructured_columns_item_data in self.unstructured_columns: - unstructured_columns_item = unstructured_columns_item_data.to_dict() - unstructured_columns.append(unstructured_columns_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "embedding_model": embedding_model, - "query_schema": query_schema, - "structured_columns": structured_columns, - "unstructured_columns": unstructured_columns, - "use_default_embedding_model": use_default_embedding_model, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structured_column_detail import StructuredColumnDetail - from ..models.unstructured_column_detail import UnstructuredColumnDetail - - d = dict(src_dict) - embedding_model = d.pop("embedding_model") - - query_schema = d.pop("query_schema") - - structured_columns = [] - _structured_columns = d.pop("structured_columns") - for structured_columns_item_data in _structured_columns: - structured_columns_item = StructuredColumnDetail.from_dict(structured_columns_item_data) - - structured_columns.append(structured_columns_item) - - unstructured_columns = [] - _unstructured_columns = d.pop("unstructured_columns") - for unstructured_columns_item_data in _unstructured_columns: - unstructured_columns_item = UnstructuredColumnDetail.from_dict(unstructured_columns_item_data) - - unstructured_columns.append(unstructured_columns_item) - - use_default_embedding_model = d.pop("use_default_embedding_model") - - gtc_hybid_sqlpg_vector_knowledge_base_detail = cls( - embedding_model=embedding_model, - query_schema=query_schema, - structured_columns=structured_columns, - unstructured_columns=unstructured_columns, - use_default_embedding_model=use_default_embedding_model, - ) - - gtc_hybid_sqlpg_vector_knowledge_base_detail.additional_properties = d - return gtc_hybid_sqlpg_vector_knowledge_base_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_input.py deleted file mode 100644 index 30f692d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/gtc_hybid_sqlpg_vector_knowledge_base_input.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.structured_column_input import StructuredColumnInput - from ..models.unstructured_column_input import UnstructuredColumnInput - - -T = TypeVar("T", bound="GTCHybidSQLPGVectorKnowledgeBaseInput") - - -@_attrs_define -class GTCHybidSQLPGVectorKnowledgeBaseInput: - """ - Attributes: - structured_columns (list['StructuredColumnInput']): - unstructured_columns (list['UnstructuredColumnInput']): - embedding_model (Union[Unset, str]): - use_default_embedding_model (Union[Unset, bool]): - """ - - structured_columns: list["StructuredColumnInput"] - unstructured_columns: list["UnstructuredColumnInput"] - embedding_model: Union[Unset, str] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structured_columns = [] - for structured_columns_item_data in self.structured_columns: - structured_columns_item = structured_columns_item_data.to_dict() - structured_columns.append(structured_columns_item) - - unstructured_columns = [] - for unstructured_columns_item_data in self.unstructured_columns: - unstructured_columns_item = unstructured_columns_item_data.to_dict() - unstructured_columns.append(unstructured_columns_item) - - embedding_model = self.embedding_model - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structured_columns": structured_columns, - "unstructured_columns": unstructured_columns, - } - ) - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structured_column_input import StructuredColumnInput - from ..models.unstructured_column_input import UnstructuredColumnInput - - d = dict(src_dict) - structured_columns = [] - _structured_columns = d.pop("structured_columns") - for structured_columns_item_data in _structured_columns: - structured_columns_item = StructuredColumnInput.from_dict(structured_columns_item_data) - - structured_columns.append(structured_columns_item) - - unstructured_columns = [] - _unstructured_columns = d.pop("unstructured_columns") - for unstructured_columns_item_data in _unstructured_columns: - unstructured_columns_item = UnstructuredColumnInput.from_dict(unstructured_columns_item_data) - - unstructured_columns.append(unstructured_columns_item) - - embedding_model = d.pop("embedding_model", UNSET) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - gtc_hybid_sqlpg_vector_knowledge_base_input = cls( - structured_columns=structured_columns, - unstructured_columns=unstructured_columns, - embedding_model=embedding_model, - use_default_embedding_model=use_default_embedding_model, - ) - - gtc_hybid_sqlpg_vector_knowledge_base_input.additional_properties = d - return gtc_hybid_sqlpg_vector_knowledge_base_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_detail.py deleted file mode 100644 index a28678e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_detail.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="GTCPGVectorKnowledgeBaseDetail") - - -@_attrs_define -class GTCPGVectorKnowledgeBaseDetail: - """ - Attributes: - embedding_model (str): - query_schema (Any): - use_default_embedding_model (bool): - """ - - embedding_model: str - query_schema: Any - use_default_embedding_model: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - embedding_model = self.embedding_model - - query_schema = self.query_schema - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "embedding_model": embedding_model, - "query_schema": query_schema, - "use_default_embedding_model": use_default_embedding_model, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - embedding_model = d.pop("embedding_model") - - query_schema = d.pop("query_schema") - - use_default_embedding_model = d.pop("use_default_embedding_model") - - gtcpg_vector_knowledge_base_detail = cls( - embedding_model=embedding_model, - query_schema=query_schema, - use_default_embedding_model=use_default_embedding_model, - ) - - gtcpg_vector_knowledge_base_detail.additional_properties = d - return gtcpg_vector_knowledge_base_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_input.py deleted file mode 100644 index 6902ce5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/gtcpg_vector_knowledge_base_input.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="GTCPGVectorKnowledgeBaseInput") - - -@_attrs_define -class GTCPGVectorKnowledgeBaseInput: - """ - Attributes: - embedding_model (Union[Unset, str]): - use_default_embedding_model (Union[Unset, bool]): - """ - - embedding_model: Union[Unset, str] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - embedding_model = self.embedding_model - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - embedding_model = d.pop("embedding_model", UNSET) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - gtcpg_vector_knowledge_base_input = cls( - embedding_model=embedding_model, - use_default_embedding_model=use_default_embedding_model, - ) - - gtcpg_vector_knowledge_base_input.additional_properties = d - return gtcpg_vector_knowledge_base_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_0.py deleted file mode 100644 index 461e81f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.slack_input import SlackInput - - -T = TypeVar("T", bound="IntegrationConfigInputUnionType0") - - -@_attrs_define -class IntegrationConfigInputUnionType0: - """ - Attributes: - slack (SlackInput): - """ - - slack: "SlackInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - slack = self.slack.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "slack": slack, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.slack_input import SlackInput - - d = dict(src_dict) - slack = SlackInput.from_dict(d.pop("slack")) - - integration_config_input_union_type_0 = cls( - slack=slack, - ) - - integration_config_input_union_type_0.additional_properties = d - return integration_config_input_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_1.py deleted file mode 100644 index 8f34496..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.git_hub_app_input import GitHubAppInput - - -T = TypeVar("T", bound="IntegrationConfigInputUnionType1") - - -@_attrs_define -class IntegrationConfigInputUnionType1: - """ - Attributes: - github_app (GitHubAppInput): - """ - - github_app: "GitHubAppInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github_app = self.github_app.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github_app": github_app, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.git_hub_app_input import GitHubAppInput - - d = dict(src_dict) - github_app = GitHubAppInput.from_dict(d.pop("github_app")) - - integration_config_input_union_type_1 = cls( - github_app=github_app, - ) - - integration_config_input_union_type_1.additional_properties = d - return integration_config_input_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_2.py deleted file mode 100644 index 181e70d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_input_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.webhook_input import WebhookInput - - -T = TypeVar("T", bound="IntegrationConfigInputUnionType2") - - -@_attrs_define -class IntegrationConfigInputUnionType2: - """ - Attributes: - webhook (WebhookInput): - """ - - webhook: "WebhookInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - webhook = self.webhook.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "webhook": webhook, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.webhook_input import WebhookInput - - d = dict(src_dict) - webhook = WebhookInput.from_dict(d.pop("webhook")) - - integration_config_input_union_type_2 = cls( - webhook=webhook, - ) - - integration_config_input_union_type_2.additional_properties = d - return integration_config_input_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_0.py deleted file mode 100644 index 943a67f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.slack_detail import SlackDetail - - -T = TypeVar("T", bound="IntegrationConfigUnionType0") - - -@_attrs_define -class IntegrationConfigUnionType0: - """ - Attributes: - slack (SlackDetail): - """ - - slack: "SlackDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - slack = self.slack.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "slack": slack, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.slack_detail import SlackDetail - - d = dict(src_dict) - slack = SlackDetail.from_dict(d.pop("slack")) - - integration_config_union_type_0 = cls( - slack=slack, - ) - - integration_config_union_type_0.additional_properties = d - return integration_config_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_1.py deleted file mode 100644 index 8ee2965..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.git_hub_app_detail import GitHubAppDetail - - -T = TypeVar("T", bound="IntegrationConfigUnionType1") - - -@_attrs_define -class IntegrationConfigUnionType1: - """ - Attributes: - github_app (GitHubAppDetail): - """ - - github_app: "GitHubAppDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github_app = self.github_app.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github_app": github_app, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.git_hub_app_detail import GitHubAppDetail - - d = dict(src_dict) - github_app = GitHubAppDetail.from_dict(d.pop("github_app")) - - integration_config_union_type_1 = cls( - github_app=github_app, - ) - - integration_config_union_type_1.additional_properties = d - return integration_config_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_2.py deleted file mode 100644 index 0f86eea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_config_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.webhook_detail import WebhookDetail - - -T = TypeVar("T", bound="IntegrationConfigUnionType2") - - -@_attrs_define -class IntegrationConfigUnionType2: - """ - Attributes: - webhook (WebhookDetail): - """ - - webhook: "WebhookDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - webhook = self.webhook.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "webhook": webhook, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.webhook_detail import WebhookDetail - - d = dict(src_dict) - webhook = WebhookDetail.from_dict(d.pop("webhook")) - - integration_config_union_type_2 = cls( - webhook=webhook, - ) - - integration_config_union_type_2.additional_properties = d - return integration_config_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_detail.py deleted file mode 100644 index 79e2a18..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_detail.py +++ /dev/null @@ -1,187 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.integration_type import IntegrationType - -if TYPE_CHECKING: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - -T = TypeVar("T", bound="IntegrationDetail") - - -@_attrs_define -class IntegrationDetail: - """ - Attributes: - assistant_ids (list[str]): - config (Union['IntegrationConfigUnionType0', 'IntegrationConfigUnionType1', 'IntegrationConfigUnionType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - integration_id (str): - name (str): - organization_id (str): - structure_ids (list[str]): - type_ (IntegrationType): - updated_at (datetime.datetime): - """ - - assistant_ids: list[str] - config: Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"] - created_at: datetime.datetime - created_by: str - description: str - integration_id: str - name: str - organization_id: str - structure_ids: list[str] - type_: IntegrationType - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - - assistant_ids = self.assistant_ids - - config: dict[str, Any] - if isinstance(self.config, IntegrationConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - integration_id = self.integration_id - - name = self.name - - organization_id = self.organization_id - - structure_ids = self.structure_ids - - type_ = self.type_.value - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_ids": assistant_ids, - "config": config, - "created_at": created_at, - "created_by": created_by, - "description": description, - "integration_id": integration_id, - "name": name, - "organization_id": organization_id, - "structure_ids": structure_ids, - "type": type_, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - d = dict(src_dict) - assistant_ids = cast(list[str], d.pop("assistant_ids")) - - def _parse_config( - data: object, - ) -> Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_0 = IntegrationConfigUnionType0.from_dict(data) - - return componentsschemas_integration_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_1 = IntegrationConfigUnionType1.from_dict(data) - - return componentsschemas_integration_config_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_2 = IntegrationConfigUnionType2.from_dict(data) - - return componentsschemas_integration_config_union_type_2 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - integration_id = d.pop("integration_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - type_ = IntegrationType(d.pop("type")) - - updated_at = isoparse(d.pop("updated_at")) - - integration_detail = cls( - assistant_ids=assistant_ids, - config=config, - created_at=created_at, - created_by=created_by, - description=description, - integration_id=integration_id, - name=name, - organization_id=organization_id, - structure_ids=structure_ids, - type_=type_, - updated_at=updated_at, - ) - - integration_detail.additional_properties = d - return integration_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/integration_type.py b/griptape_cloud_client/generated/griptape_cloud_client/models/integration_type.py deleted file mode 100644 index b35a106..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/integration_type.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class IntegrationType(str, Enum): - GITHUB_APP = "github_app" - SLACK = "slack" - WEBHOOK = "webhook" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/invite_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/invite_detail.py deleted file mode 100644 index 1e8787b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/invite_detail.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.invite_status import InviteStatus -from ..types import UNSET, Unset - -T = TypeVar("T", bound="InviteDetail") - - -@_attrs_define -class InviteDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - email (str): - expires_at (datetime.datetime): - invite_id (str): - organization_id (str): - status (InviteStatus): - responded_at (Union[Unset, datetime.datetime]): - """ - - created_at: datetime.datetime - created_by: str - email: str - expires_at: datetime.datetime - invite_id: str - organization_id: str - status: InviteStatus - responded_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - email = self.email - - expires_at = self.expires_at.isoformat() - - invite_id = self.invite_id - - organization_id = self.organization_id - - status = self.status.value - - responded_at: Union[Unset, str] = UNSET - if not isinstance(self.responded_at, Unset): - responded_at = self.responded_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "email": email, - "expires_at": expires_at, - "invite_id": invite_id, - "organization_id": organization_id, - "status": status, - } - ) - if responded_at is not UNSET: - field_dict["responded_at"] = responded_at - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - email = d.pop("email") - - expires_at = isoparse(d.pop("expires_at")) - - invite_id = d.pop("invite_id") - - organization_id = d.pop("organization_id") - - status = InviteStatus(d.pop("status")) - - _responded_at = d.pop("responded_at", UNSET) - responded_at: Union[Unset, datetime.datetime] - if isinstance(_responded_at, Unset): - responded_at = UNSET - else: - responded_at = isoparse(_responded_at) - - invite_detail = cls( - created_at=created_at, - created_by=created_by, - email=email, - expires_at=expires_at, - invite_id=invite_id, - organization_id=organization_id, - status=status, - responded_at=responded_at, - ) - - invite_detail.additional_properties = d - return invite_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/invite_response_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/invite_response_status.py deleted file mode 100644 index 1a5a1fc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/invite_response_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class InviteResponseStatus(str, Enum): - ACCEPTED = "ACCEPTED" - REJECTED = "REJECTED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/invite_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/invite_status.py deleted file mode 100644 index eb36a5d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/invite_status.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class InviteStatus(str, Enum): - ACCEPTED = "ACCEPTED" - EXPIRED = "EXPIRED" - PENDING = "PENDING" - REJECTED = "REJECTED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_get_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_get_response_content.py deleted file mode 100644 index 2befc33..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_get_response_content.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="InvokeStructureWebhookGetResponseContent") - - -@_attrs_define -class InvokeStructureWebhookGetResponseContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - invoke_structure_webhook_get_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - invoke_structure_webhook_get_response_content.additional_properties = d - return invoke_structure_webhook_get_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_post_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_post_response_content.py deleted file mode 100644 index e434475..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/invoke_structure_webhook_post_response_content.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="InvokeStructureWebhookPostResponseContent") - - -@_attrs_define -class InvokeStructureWebhookPostResponseContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - invoke_structure_webhook_post_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - invoke_structure_webhook_post_response_content.additional_properties = d - return invoke_structure_webhook_post_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema.py b/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema.py deleted file mode 100644 index 9d016da..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema.py +++ /dev/null @@ -1,121 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.json_schema_properties import JsonSchemaProperties - - -T = TypeVar("T", bound="JsonSchema") - - -@_attrs_define -class JsonSchema: - """ - Attributes: - additional_properties (bool): - description (str): - id (str): - properties (JsonSchemaProperties): - required (list[str]): - schema (str): - title (str): - type_ (str): - """ - - additional_properties: bool - description: str - id: str - properties: "JsonSchemaProperties" - required: list[str] - schema: str - title: str - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - additional_properties = self.additional_properties - - description = self.description - - id = self.id - - properties = self.properties.to_dict() - - required = self.required - - schema = self.schema - - title = self.title - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "additionalProperties": additional_properties, - "description": description, - "id": id, - "properties": properties, - "required": required, - "schema": schema, - "title": title, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.json_schema_properties import JsonSchemaProperties - - d = dict(src_dict) - additional_properties = d.pop("additionalProperties") - - description = d.pop("description") - - id = d.pop("id") - - properties = JsonSchemaProperties.from_dict(d.pop("properties")) - - required = cast(list[str], d.pop("required")) - - schema = d.pop("schema") - - title = d.pop("title") - - type_ = d.pop("type") - - json_schema = cls( - additional_properties=additional_properties, - description=description, - id=id, - properties=properties, - required=required, - schema=schema, - title=title, - type_=type_, - ) - - json_schema.additional_properties = d - return json_schema - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_properties.py b/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_properties.py deleted file mode 100644 index 58ed487..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_properties.py +++ /dev/null @@ -1,72 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.json_schema_property import JsonSchemaProperty - - -T = TypeVar("T", bound="JsonSchemaProperties") - - -@_attrs_define -class JsonSchemaProperties: - """ - Attributes: - member (Union[Unset, JsonSchemaProperty]): - """ - - member: Union[Unset, "JsonSchemaProperty"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - member: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.member, Unset): - member = self.member.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if member is not UNSET: - field_dict["member"] = member - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.json_schema_property import JsonSchemaProperty - - d = dict(src_dict) - _member = d.pop("member", UNSET) - member: Union[Unset, JsonSchemaProperty] - if isinstance(_member, Unset): - member = UNSET - else: - member = JsonSchemaProperty.from_dict(_member) - - json_schema_properties = cls( - member=member, - ) - - json_schema_properties.additional_properties = d - return json_schema_properties - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_property.py b/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_property.py deleted file mode 100644 index e7be668..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/json_schema_property.py +++ /dev/null @@ -1,97 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.json_schema_properties import JsonSchemaProperties - - -T = TypeVar("T", bound="JsonSchemaProperty") - - -@_attrs_define -class JsonSchemaProperty: - """ - Attributes: - additional_properties (bool): - description (str): - properties (JsonSchemaProperties): - required (list[str]): - type_ (str): - """ - - additional_properties: bool - description: str - properties: "JsonSchemaProperties" - required: list[str] - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - additional_properties = self.additional_properties - - description = self.description - - properties = self.properties.to_dict() - - required = self.required - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "additionalProperties": additional_properties, - "description": description, - "properties": properties, - "required": required, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.json_schema_properties import JsonSchemaProperties - - d = dict(src_dict) - additional_properties = d.pop("additionalProperties") - - description = d.pop("description") - - properties = JsonSchemaProperties.from_dict(d.pop("properties")) - - required = cast(list[str], d.pop("required")) - - type_ = d.pop("type") - - json_schema_property = cls( - additional_properties=additional_properties, - description=description, - properties=properties, - required=required, - type_=type_, - ) - - json_schema_property.additional_properties = d - return json_schema_property - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_0.py deleted file mode 100644 index c785ab2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pg_vector_knowledge_base_input import PGVectorKnowledgeBaseInput - - -T = TypeVar("T", bound="KnowledgeBaseConfigInputUnionType0") - - -@_attrs_define -class KnowledgeBaseConfigInputUnionType0: - """ - Attributes: - pg_vector (PGVectorKnowledgeBaseInput): - """ - - pg_vector: "PGVectorKnowledgeBaseInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pg_vector = self.pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pg_vector": pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pg_vector_knowledge_base_input import PGVectorKnowledgeBaseInput - - d = dict(src_dict) - pg_vector = PGVectorKnowledgeBaseInput.from_dict(d.pop("pg_vector")) - - knowledge_base_config_input_union_type_0 = cls( - pg_vector=pg_vector, - ) - - knowledge_base_config_input_union_type_0.additional_properties = d - return knowledge_base_config_input_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_1.py deleted file mode 100644 index e1827d0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.gtcpg_vector_knowledge_base_input import GTCPGVectorKnowledgeBaseInput - - -T = TypeVar("T", bound="KnowledgeBaseConfigInputUnionType1") - - -@_attrs_define -class KnowledgeBaseConfigInputUnionType1: - """ - Attributes: - gtc_pg_vector (GTCPGVectorKnowledgeBaseInput): - """ - - gtc_pg_vector: "GTCPGVectorKnowledgeBaseInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - gtc_pg_vector = self.gtc_pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "gtc_pg_vector": gtc_pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.gtcpg_vector_knowledge_base_input import GTCPGVectorKnowledgeBaseInput - - d = dict(src_dict) - gtc_pg_vector = GTCPGVectorKnowledgeBaseInput.from_dict(d.pop("gtc_pg_vector")) - - knowledge_base_config_input_union_type_1 = cls( - gtc_pg_vector=gtc_pg_vector, - ) - - knowledge_base_config_input_union_type_1.additional_properties = d - return knowledge_base_config_input_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_2.py deleted file mode 100644 index d95634c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.gtc_hybid_sqlpg_vector_knowledge_base_input import GTCHybidSQLPGVectorKnowledgeBaseInput - - -T = TypeVar("T", bound="KnowledgeBaseConfigInputUnionType2") - - -@_attrs_define -class KnowledgeBaseConfigInputUnionType2: - """ - Attributes: - gtc_hybrid_sql_pg_vector (GTCHybidSQLPGVectorKnowledgeBaseInput): - """ - - gtc_hybrid_sql_pg_vector: "GTCHybidSQLPGVectorKnowledgeBaseInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - gtc_hybrid_sql_pg_vector = self.gtc_hybrid_sql_pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "gtc_hybrid_sql_pg_vector": gtc_hybrid_sql_pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.gtc_hybid_sqlpg_vector_knowledge_base_input import GTCHybidSQLPGVectorKnowledgeBaseInput - - d = dict(src_dict) - gtc_hybrid_sql_pg_vector = GTCHybidSQLPGVectorKnowledgeBaseInput.from_dict(d.pop("gtc_hybrid_sql_pg_vector")) - - knowledge_base_config_input_union_type_2 = cls( - gtc_hybrid_sql_pg_vector=gtc_hybrid_sql_pg_vector, - ) - - knowledge_base_config_input_union_type_2.additional_properties = d - return knowledge_base_config_input_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_3.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_3.py deleted file mode 100644 index 6abe595..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_input_union_type_3.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pgai_knowledge_base_knowledge_base_input import PGAIKnowledgeBaseKnowledgeBaseInput - - -T = TypeVar("T", bound="KnowledgeBaseConfigInputUnionType3") - - -@_attrs_define -class KnowledgeBaseConfigInputUnionType3: - """ - Attributes: - pgai_knowledge_base (PGAIKnowledgeBaseKnowledgeBaseInput): - """ - - pgai_knowledge_base: "PGAIKnowledgeBaseKnowledgeBaseInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pgai_knowledge_base = self.pgai_knowledge_base.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pgai_knowledge_base": pgai_knowledge_base, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pgai_knowledge_base_knowledge_base_input import PGAIKnowledgeBaseKnowledgeBaseInput - - d = dict(src_dict) - pgai_knowledge_base = PGAIKnowledgeBaseKnowledgeBaseInput.from_dict(d.pop("pgai_knowledge_base")) - - knowledge_base_config_input_union_type_3 = cls( - pgai_knowledge_base=pgai_knowledge_base, - ) - - knowledge_base_config_input_union_type_3.additional_properties = d - return knowledge_base_config_input_union_type_3 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_0.py deleted file mode 100644 index e818aed..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pg_vector_knowledge_base_detail import PGVectorKnowledgeBaseDetail - - -T = TypeVar("T", bound="KnowledgeBaseConfigUnionType0") - - -@_attrs_define -class KnowledgeBaseConfigUnionType0: - """ - Attributes: - pg_vector (PGVectorKnowledgeBaseDetail): - """ - - pg_vector: "PGVectorKnowledgeBaseDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pg_vector = self.pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pg_vector": pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pg_vector_knowledge_base_detail import PGVectorKnowledgeBaseDetail - - d = dict(src_dict) - pg_vector = PGVectorKnowledgeBaseDetail.from_dict(d.pop("pg_vector")) - - knowledge_base_config_union_type_0 = cls( - pg_vector=pg_vector, - ) - - knowledge_base_config_union_type_0.additional_properties = d - return knowledge_base_config_union_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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_1.py deleted file mode 100644 index cee8c51..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.gtcpg_vector_knowledge_base_detail import GTCPGVectorKnowledgeBaseDetail - - -T = TypeVar("T", bound="KnowledgeBaseConfigUnionType1") - - -@_attrs_define -class KnowledgeBaseConfigUnionType1: - """ - Attributes: - gtc_pg_vector (GTCPGVectorKnowledgeBaseDetail): - """ - - gtc_pg_vector: "GTCPGVectorKnowledgeBaseDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - gtc_pg_vector = self.gtc_pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "gtc_pg_vector": gtc_pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.gtcpg_vector_knowledge_base_detail import GTCPGVectorKnowledgeBaseDetail - - d = dict(src_dict) - gtc_pg_vector = GTCPGVectorKnowledgeBaseDetail.from_dict(d.pop("gtc_pg_vector")) - - knowledge_base_config_union_type_1 = cls( - gtc_pg_vector=gtc_pg_vector, - ) - - knowledge_base_config_union_type_1.additional_properties = d - return knowledge_base_config_union_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_2.py deleted file mode 100644 index 9833a48..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.gtc_hybid_sqlpg_vector_knowledge_base_detail import GTCHybidSQLPGVectorKnowledgeBaseDetail - - -T = TypeVar("T", bound="KnowledgeBaseConfigUnionType2") - - -@_attrs_define -class KnowledgeBaseConfigUnionType2: - """ - Attributes: - gtc_hybrid_sql_pg_vector (GTCHybidSQLPGVectorKnowledgeBaseDetail): - """ - - gtc_hybrid_sql_pg_vector: "GTCHybidSQLPGVectorKnowledgeBaseDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - gtc_hybrid_sql_pg_vector = self.gtc_hybrid_sql_pg_vector.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "gtc_hybrid_sql_pg_vector": gtc_hybrid_sql_pg_vector, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.gtc_hybid_sqlpg_vector_knowledge_base_detail import GTCHybidSQLPGVectorKnowledgeBaseDetail - - d = dict(src_dict) - gtc_hybrid_sql_pg_vector = GTCHybidSQLPGVectorKnowledgeBaseDetail.from_dict(d.pop("gtc_hybrid_sql_pg_vector")) - - knowledge_base_config_union_type_2 = cls( - gtc_hybrid_sql_pg_vector=gtc_hybrid_sql_pg_vector, - ) - - knowledge_base_config_union_type_2.additional_properties = d - return knowledge_base_config_union_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_3.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_3.py deleted file mode 100644 index e01800d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_config_union_type_3.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pgai_knowledge_base_knowledge_base_detail import PGAIKnowledgeBaseKnowledgeBaseDetail - - -T = TypeVar("T", bound="KnowledgeBaseConfigUnionType3") - - -@_attrs_define -class KnowledgeBaseConfigUnionType3: - """ - Attributes: - pgai_knowledge_base (PGAIKnowledgeBaseKnowledgeBaseDetail): - """ - - pgai_knowledge_base: "PGAIKnowledgeBaseKnowledgeBaseDetail" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pgai_knowledge_base = self.pgai_knowledge_base.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pgai_knowledge_base": pgai_knowledge_base, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pgai_knowledge_base_knowledge_base_detail import PGAIKnowledgeBaseKnowledgeBaseDetail - - d = dict(src_dict) - pgai_knowledge_base = PGAIKnowledgeBaseKnowledgeBaseDetail.from_dict(d.pop("pgai_knowledge_base")) - - knowledge_base_config_union_type_3 = cls( - pgai_knowledge_base=pgai_knowledge_base, - ) - - knowledge_base_config_union_type_3.additional_properties = d - return knowledge_base_config_union_type_3 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_detail.py deleted file mode 100644 index 5ac4f16..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_detail.py +++ /dev/null @@ -1,260 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="KnowledgeBaseDetail") - - -@_attrs_define -class KnowledgeBaseDetail: - """ - Attributes: - asset_paths (list[str]): - config (Union['KnowledgeBaseConfigUnionType0', 'KnowledgeBaseConfigUnionType1', 'KnowledgeBaseConfigUnionType2', - 'KnowledgeBaseConfigUnionType3']): - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - asset_paths: list[str] - config: Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ] - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - - asset_paths = self.asset_paths - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_paths": asset_paths, - "config": config, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - asset_paths = cast(list[str], d.pop("asset_paths")) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_0 = KnowledgeBaseConfigUnionType0.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_1 = KnowledgeBaseConfigUnionType1.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_2 = KnowledgeBaseConfigUnionType2.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_3 = KnowledgeBaseConfigUnionType3.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_3 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - knowledge_base_detail = cls( - asset_paths=asset_paths, - config=config, - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - description=description, - embedding_model=embedding_model, - schedule_expression=schedule_expression, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - knowledge_base_detail.additional_properties = d - return knowledge_base_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_detail.py deleted file mode 100644 index 5e4e1ac..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_detail.py +++ /dev/null @@ -1,169 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.knowledge_base_job_status import KnowledgeBaseJobStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.error import Error - - -T = TypeVar("T", bound="KnowledgeBaseJobDetail") - - -@_attrs_define -class KnowledgeBaseJobDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_job_id (str): - status (KnowledgeBaseJobStatus): - bytes_ingested (Union[Unset, float]): - completed_at (Union[None, Unset, datetime.datetime]): - errors (Union[Unset, list['Error']]): - status_detail (Union[Unset, Any]): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_job_id: str - status: KnowledgeBaseJobStatus - bytes_ingested: Union[Unset, float] = UNSET - completed_at: Union[None, Unset, datetime.datetime] = UNSET - errors: Union[Unset, list["Error"]] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_job_id = self.knowledge_base_job_id - - status = self.status.value - - bytes_ingested = self.bytes_ingested - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - errors: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.errors, Unset): - errors = [] - for errors_item_data in self.errors: - errors_item = errors_item_data.to_dict() - errors.append(errors_item) - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_job_id": knowledge_base_job_id, - "status": status, - } - ) - if bytes_ingested is not UNSET: - field_dict["bytes_ingested"] = bytes_ingested - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if errors is not UNSET: - field_dict["errors"] = errors - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.error import Error - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_job_id = d.pop("knowledge_base_job_id") - - status = KnowledgeBaseJobStatus(d.pop("status")) - - bytes_ingested = d.pop("bytes_ingested", UNSET) - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - errors = [] - _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = Error.from_dict(errors_item_data) - - errors.append(errors_item) - - status_detail = d.pop("status_detail", UNSET) - - knowledge_base_job_detail = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_job_id=knowledge_base_job_id, - status=status, - bytes_ingested=bytes_ingested, - completed_at=completed_at, - errors=errors, - status_detail=status_detail, - ) - - knowledge_base_job_detail.additional_properties = d - return knowledge_base_job_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_status.py deleted file mode 100644 index cee6b9a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_job_status.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class KnowledgeBaseJobStatus(str, Enum): - CANCELLED = "CANCELLED" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_query_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_query_detail.py deleted file mode 100644 index 2e283fa..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_query_detail.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.entry import Entry - - -T = TypeVar("T", bound="KnowledgeBaseQueryDetail") - - -@_attrs_define -class KnowledgeBaseQueryDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - entries (list['Entry']): - knowledge_base_id (str): - knowledge_base_query_id (str): - query (str): - """ - - created_at: datetime.datetime - created_by: str - entries: list["Entry"] - knowledge_base_id: str - knowledge_base_query_id: str - query: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - entries = [] - for entries_item_data in self.entries: - entries_item = entries_item_data.to_dict() - entries.append(entries_item) - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_query_id = self.knowledge_base_query_id - - query = self.query - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "entries": entries, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_query_id": knowledge_base_query_id, - "query": query, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.entry import Entry - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - entries = [] - _entries = d.pop("entries") - for entries_item_data in _entries: - entries_item = Entry.from_dict(entries_item_data) - - entries.append(entries_item) - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_query_id = d.pop("knowledge_base_query_id") - - query = d.pop("query") - - knowledge_base_query_detail = cls( - created_at=created_at, - created_by=created_by, - entries=entries, - knowledge_base_id=knowledge_base_id, - knowledge_base_query_id=knowledge_base_query_id, - query=query, - ) - - knowledge_base_query_detail.additional_properties = d - return knowledge_base_query_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_search_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_search_detail.py deleted file mode 100644 index a5dbe2e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/knowledge_base_search_detail.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="KnowledgeBaseSearchDetail") - - -@_attrs_define -class KnowledgeBaseSearchDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_search_id (str): - query (str): - result (str): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_search_id: str - query: str - result: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_search_id = self.knowledge_base_search_id - - query = self.query - - result = self.result - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_search_id": knowledge_base_search_id, - "query": query, - "result": result, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_search_id = d.pop("knowledge_base_search_id") - - query = d.pop("query") - - result = d.pop("result") - - knowledge_base_search_detail = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_search_id=knowledge_base_search_id, - query=query, - result=result, - ) - - knowledge_base_search_detail.additional_properties = d - return knowledge_base_search_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/library_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/library_detail.py deleted file mode 100644 index 83758b6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/library_detail.py +++ /dev/null @@ -1,144 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="LibraryDetail") - - -@_attrs_define -class LibraryDetail: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - data_connector_ids (list[str]): - knowledge_base_ids (list[str]): - library_id (str): - name (str): - organization_id (str): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - data_connector_ids: list[str] - knowledge_base_ids: list[str] - library_id: str - name: str - organization_id: str - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_ids = self.data_connector_ids - - knowledge_base_ids = self.knowledge_base_ids - - library_id = self.library_id - - name = self.name - - organization_id = self.organization_id - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "data_connector_ids": data_connector_ids, - "knowledge_base_ids": knowledge_base_ids, - "library_id": library_id, - "name": name, - "organization_id": organization_id, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - library_id = d.pop("library_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - library_detail = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - data_connector_ids=data_connector_ids, - knowledge_base_ids=knowledge_base_ids, - library_id=library_id, - name=name, - organization_id=organization_id, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - library_detail.additional_properties = d - return library_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_api_keys_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_api_keys_response_content.py deleted file mode 100644 index d394a3d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_api_keys_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.api_key_detail import ApiKeyDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListApiKeysResponseContent") - - -@_attrs_define -class ListApiKeysResponseContent: - """ - Attributes: - api_keys (list['ApiKeyDetail']): - pagination (Pagination): - """ - - api_keys: list["ApiKeyDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - api_keys = [] - for api_keys_item_data in self.api_keys: - api_keys_item = api_keys_item_data.to_dict() - api_keys.append(api_keys_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "api_keys": api_keys, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.api_key_detail import ApiKeyDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - api_keys = [] - _api_keys = d.pop("api_keys") - for api_keys_item_data in _api_keys: - api_keys_item = ApiKeyDetail.from_dict(api_keys_item_data) - - api_keys.append(api_keys_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_api_keys_response_content = cls( - api_keys=api_keys, - pagination=pagination, - ) - - list_api_keys_response_content.additional_properties = d - return list_api_keys_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_assets_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_assets_response_content.py deleted file mode 100644 index a8514e5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_assets_response_content.py +++ /dev/null @@ -1,103 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.asset_detail import AssetDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListAssetsResponseContent") - - -@_attrs_define -class ListAssetsResponseContent: - """ - Attributes: - assets (list['AssetDetail']): - pagination (Pagination): - postfix (Union[Unset, str]): - prefix (Union[Unset, str]): - """ - - assets: list["AssetDetail"] - pagination: "Pagination" - postfix: Union[Unset, str] = UNSET - prefix: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assets = [] - for assets_item_data in self.assets: - assets_item = assets_item_data.to_dict() - assets.append(assets_item) - - pagination = self.pagination.to_dict() - - postfix = self.postfix - - prefix = self.prefix - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assets": assets, - "pagination": pagination, - } - ) - if postfix is not UNSET: - field_dict["postfix"] = postfix - if prefix is not UNSET: - field_dict["prefix"] = prefix - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.asset_detail import AssetDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - assets = [] - _assets = d.pop("assets") - for assets_item_data in _assets: - assets_item = AssetDetail.from_dict(assets_item_data) - - assets.append(assets_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - postfix = d.pop("postfix", UNSET) - - prefix = d.pop("prefix", UNSET) - - list_assets_response_content = cls( - assets=assets, - pagination=pagination, - postfix=postfix, - prefix=prefix, - ) - - list_assets_response_content.additional_properties = d - return list_assets_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_events_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_events_response_content.py deleted file mode 100644 index 09c056b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_events_response_content.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.assistant_event_detail import AssistantEventDetail - - -T = TypeVar("T", bound="ListAssistantEventsResponseContent") - - -@_attrs_define -class ListAssistantEventsResponseContent: - """ - Attributes: - count (float): - events (list['AssistantEventDetail']): - limit (float): - next_offset (float): - offset (float): - total_count (float): - """ - - count: float - events: list["AssistantEventDetail"] - limit: float - next_offset: float - offset: float - total_count: float - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - count = self.count - - events = [] - for events_item_data in self.events: - events_item = events_item_data.to_dict() - events.append(events_item) - - limit = self.limit - - next_offset = self.next_offset - - offset = self.offset - - total_count = self.total_count - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "count": count, - "events": events, - "limit": limit, - "next_offset": next_offset, - "offset": offset, - "total_count": total_count, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.assistant_event_detail import AssistantEventDetail - - d = dict(src_dict) - count = d.pop("count") - - events = [] - _events = d.pop("events") - for events_item_data in _events: - events_item = AssistantEventDetail.from_dict(events_item_data) - - events.append(events_item) - - limit = d.pop("limit") - - next_offset = d.pop("next_offset") - - offset = d.pop("offset") - - total_count = d.pop("total_count") - - list_assistant_events_response_content = cls( - count=count, - events=events, - limit=limit, - next_offset=next_offset, - offset=offset, - total_count=total_count, - ) - - list_assistant_events_response_content.additional_properties = d - return list_assistant_events_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_runs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_runs_response_content.py deleted file mode 100644 index 6e35ea1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistant_runs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.assistant_run_detail import AssistantRunDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListAssistantRunsResponseContent") - - -@_attrs_define -class ListAssistantRunsResponseContent: - """ - Attributes: - assistant_runs (list['AssistantRunDetail']): - pagination (Pagination): - """ - - assistant_runs: list["AssistantRunDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_runs = [] - for assistant_runs_item_data in self.assistant_runs: - assistant_runs_item = assistant_runs_item_data.to_dict() - assistant_runs.append(assistant_runs_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_runs": assistant_runs, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.assistant_run_detail import AssistantRunDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - assistant_runs = [] - _assistant_runs = d.pop("assistant_runs") - for assistant_runs_item_data in _assistant_runs: - assistant_runs_item = AssistantRunDetail.from_dict(assistant_runs_item_data) - - assistant_runs.append(assistant_runs_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_assistant_runs_response_content = cls( - assistant_runs=assistant_runs, - pagination=pagination, - ) - - list_assistant_runs_response_content.additional_properties = d - return list_assistant_runs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistants_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistants_response_content.py deleted file mode 100644 index db8ff65..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_assistants_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.assistant_detail import AssistantDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListAssistantsResponseContent") - - -@_attrs_define -class ListAssistantsResponseContent: - """ - Attributes: - assistants (list['AssistantDetail']): - pagination (Pagination): - """ - - assistants: list["AssistantDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistants = [] - for assistants_item_data in self.assistants: - assistants_item = assistants_item_data.to_dict() - assistants.append(assistants_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistants": assistants, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.assistant_detail import AssistantDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - assistants = [] - _assistants = d.pop("assistants") - for assistants_item_data in _assistants: - assistants_item = AssistantDetail.from_dict(assistants_item_data) - - assistants.append(assistants_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_assistants_response_content = cls( - assistants=assistants, - pagination=pagination, - ) - - list_assistants_response_content.additional_properties = d - return list_assistants_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_buckets_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_buckets_response_content.py deleted file mode 100644 index 90c5036..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_buckets_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.bucket_detail import BucketDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListBucketsResponseContent") - - -@_attrs_define -class ListBucketsResponseContent: - """ - Attributes: - buckets (list['BucketDetail']): - pagination (Pagination): - """ - - buckets: list["BucketDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - buckets = [] - for buckets_item_data in self.buckets: - buckets_item = buckets_item_data.to_dict() - buckets.append(buckets_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "buckets": buckets, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.bucket_detail import BucketDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - buckets = [] - _buckets = d.pop("buckets") - for buckets_item_data in _buckets: - buckets_item = BucketDetail.from_dict(buckets_item_data) - - buckets.append(buckets_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_buckets_response_content = cls( - buckets=buckets, - pagination=pagination, - ) - - list_buckets_response_content.additional_properties = d - return list_buckets_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_connections_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_connections_response_content.py deleted file mode 100644 index 49c5532..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_connections_response_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.connection_detail import ConnectionDetail - - -T = TypeVar("T", bound="ListConnectionsResponseContent") - - -@_attrs_define -class ListConnectionsResponseContent: - """ - Attributes: - connections (Union[Unset, list['ConnectionDetail']]): - """ - - connections: Union[Unset, list["ConnectionDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connections: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.connections, Unset): - connections = [] - for connections_item_data in self.connections: - connections_item = connections_item_data.to_dict() - connections.append(connections_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if connections is not UNSET: - field_dict["connections"] = connections - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.connection_detail import ConnectionDetail - - d = dict(src_dict) - connections = [] - _connections = d.pop("connections", UNSET) - for connections_item_data in _connections or []: - connections_item = ConnectionDetail.from_dict(connections_item_data) - - connections.append(connections_item) - - list_connections_response_content = cls( - connections=connections, - ) - - list_connections_response_content.additional_properties = d - return list_connections_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_connectors_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_connectors_response_content.py deleted file mode 100644 index f225cd8..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_connectors_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_connector_detail import DataConnectorDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListDataConnectorsResponseContent") - - -@_attrs_define -class ListDataConnectorsResponseContent: - """ - Attributes: - data_connectors (list['DataConnectorDetail']): - pagination (Pagination): - """ - - data_connectors: list["DataConnectorDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_connectors = [] - for data_connectors_item_data in self.data_connectors: - data_connectors_item = data_connectors_item_data.to_dict() - data_connectors.append(data_connectors_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_connectors": data_connectors, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_detail import DataConnectorDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - data_connectors = [] - _data_connectors = d.pop("data_connectors") - for data_connectors_item_data in _data_connectors: - data_connectors_item = DataConnectorDetail.from_dict(data_connectors_item_data) - - data_connectors.append(data_connectors_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_data_connectors_response_content = cls( - data_connectors=data_connectors, - pagination=pagination, - ) - - list_data_connectors_response_content.additional_properties = d - return list_data_connectors_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_jobs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_jobs_response_content.py deleted file mode 100644 index 11ea56c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_data_jobs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_job_detail import DataJobDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListDataJobsResponseContent") - - -@_attrs_define -class ListDataJobsResponseContent: - """ - Attributes: - data_jobs (list['DataJobDetail']): - pagination (Pagination): - """ - - data_jobs: list["DataJobDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_jobs = [] - for data_jobs_item_data in self.data_jobs: - data_jobs_item = data_jobs_item_data.to_dict() - data_jobs.append(data_jobs_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_jobs": data_jobs, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_job_detail import DataJobDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - data_jobs = [] - _data_jobs = d.pop("data_jobs") - for data_jobs_item_data in _data_jobs: - data_jobs_item = DataJobDetail.from_dict(data_jobs_item_data) - - data_jobs.append(data_jobs_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_data_jobs_response_content = cls( - data_jobs=data_jobs, - pagination=pagination, - ) - - list_data_jobs_response_content.additional_properties = d - return list_data_jobs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_events_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_events_response_content.py deleted file mode 100644 index 4167eb7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_events_response_content.py +++ /dev/null @@ -1,113 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.event_detail import EventDetail - - -T = TypeVar("T", bound="ListEventsResponseContent") - - -@_attrs_define -class ListEventsResponseContent: - """ - Attributes: - count (float): - events (list['EventDetail']): - limit (float): - next_offset (float): - offset (float): - total_count (float): - """ - - count: float - events: list["EventDetail"] - limit: float - next_offset: float - offset: float - total_count: float - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - count = self.count - - events = [] - for events_item_data in self.events: - events_item = events_item_data.to_dict() - events.append(events_item) - - limit = self.limit - - next_offset = self.next_offset - - offset = self.offset - - total_count = self.total_count - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "count": count, - "events": events, - "limit": limit, - "next_offset": next_offset, - "offset": offset, - "total_count": total_count, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.event_detail import EventDetail - - d = dict(src_dict) - count = d.pop("count") - - events = [] - _events = d.pop("events") - for events_item_data in _events: - events_item = EventDetail.from_dict(events_item_data) - - events.append(events_item) - - limit = d.pop("limit") - - next_offset = d.pop("next_offset") - - offset = d.pop("offset") - - total_count = d.pop("total_count") - - list_events_response_content = cls( - count=count, - events=events, - limit=limit, - next_offset=next_offset, - offset=offset, - total_count=total_count, - ) - - list_events_response_content.additional_properties = d - return list_events_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_deployments_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_deployments_response_content.py deleted file mode 100644 index aa54841..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_deployments_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.function_deployment_detail import FunctionDeploymentDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListFunctionDeploymentsResponseContent") - - -@_attrs_define -class ListFunctionDeploymentsResponseContent: - """ - Attributes: - deployments (list['FunctionDeploymentDetail']): - pagination (Pagination): - """ - - deployments: list["FunctionDeploymentDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - deployments = [] - for deployments_item_data in self.deployments: - deployments_item = deployments_item_data.to_dict() - deployments.append(deployments_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "deployments": deployments, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.function_deployment_detail import FunctionDeploymentDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - deployments = [] - _deployments = d.pop("deployments") - for deployments_item_data in _deployments: - deployments_item = FunctionDeploymentDetail.from_dict(deployments_item_data) - - deployments.append(deployments_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_function_deployments_response_content = cls( - deployments=deployments, - pagination=pagination, - ) - - list_function_deployments_response_content.additional_properties = d - return list_function_deployments_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_run_logs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_run_logs_response_content.py deleted file mode 100644 index bf992f6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_run_logs_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ListFunctionRunLogsResponseContent") - - -@_attrs_define -class ListFunctionRunLogsResponseContent: - """ - Attributes: - logs (list[str]): - """ - - logs: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - logs = self.logs - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "logs": logs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - logs = cast(list[str], d.pop("logs")) - - list_function_run_logs_response_content = cls( - logs=logs, - ) - - list_function_run_logs_response_content.additional_properties = d - return list_function_run_logs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_runs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_runs_response_content.py deleted file mode 100644 index 391012c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_function_runs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.function_run_detail import FunctionRunDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListFunctionRunsResponseContent") - - -@_attrs_define -class ListFunctionRunsResponseContent: - """ - Attributes: - function_runs (list['FunctionRunDetail']): - pagination (Pagination): - """ - - function_runs: list["FunctionRunDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - function_runs = [] - for function_runs_item_data in self.function_runs: - function_runs_item = function_runs_item_data.to_dict() - function_runs.append(function_runs_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "function_runs": function_runs, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.function_run_detail import FunctionRunDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - function_runs = [] - _function_runs = d.pop("function_runs") - for function_runs_item_data in _function_runs: - function_runs_item = FunctionRunDetail.from_dict(function_runs_item_data) - - function_runs.append(function_runs_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_function_runs_response_content = cls( - function_runs=function_runs, - pagination=pagination, - ) - - list_function_runs_response_content.additional_properties = d - return list_function_runs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_functions_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_functions_response_content.py deleted file mode 100644 index 78b3b51..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_functions_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.function_detail import FunctionDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListFunctionsResponseContent") - - -@_attrs_define -class ListFunctionsResponseContent: - """ - Attributes: - functions (list['FunctionDetail']): - pagination (Pagination): - """ - - functions: list["FunctionDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - functions = [] - for functions_item_data in self.functions: - functions_item = functions_item_data.to_dict() - functions.append(functions_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "functions": functions, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.function_detail import FunctionDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - functions = [] - _functions = d.pop("functions") - for functions_item_data in _functions: - functions_item = FunctionDetail.from_dict(functions_item_data) - - functions.append(functions_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_functions_response_content = cls( - functions=functions, - pagination=pagination, - ) - - list_functions_response_content.additional_properties = d - return list_functions_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_integrations_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_integrations_response_content.py deleted file mode 100644 index 507eccf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_integrations_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.integration_detail import IntegrationDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListIntegrationsResponseContent") - - -@_attrs_define -class ListIntegrationsResponseContent: - """ - Attributes: - integrations (list['IntegrationDetail']): - pagination (Pagination): - """ - - integrations: list["IntegrationDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - integrations = [] - for integrations_item_data in self.integrations: - integrations_item = integrations_item_data.to_dict() - integrations.append(integrations_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "integrations": integrations, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_detail import IntegrationDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - integrations = [] - _integrations = d.pop("integrations") - for integrations_item_data in _integrations: - integrations_item = IntegrationDetail.from_dict(integrations_item_data) - - integrations.append(integrations_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_integrations_response_content = cls( - integrations=integrations, - pagination=pagination, - ) - - list_integrations_response_content.additional_properties = d - return list_integrations_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_invites_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_invites_response_content.py deleted file mode 100644 index 7036e6a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_invites_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.invite_detail import InviteDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListInvitesResponseContent") - - -@_attrs_define -class ListInvitesResponseContent: - """ - Attributes: - invites (list['InviteDetail']): - pagination (Pagination): - """ - - invites: list["InviteDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - invites = [] - for invites_item_data in self.invites: - invites_item = invites_item_data.to_dict() - invites.append(invites_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "invites": invites, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.invite_detail import InviteDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - invites = [] - _invites = d.pop("invites") - for invites_item_data in _invites: - invites_item = InviteDetail.from_dict(invites_item_data) - - invites.append(invites_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_invites_response_content = cls( - invites=invites, - pagination=pagination, - ) - - list_invites_response_content.additional_properties = d - return list_invites_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_jobs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_jobs_response_content.py deleted file mode 100644 index d9241f0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_jobs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.knowledge_base_job_detail import KnowledgeBaseJobDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListKnowledgeBaseJobsResponseContent") - - -@_attrs_define -class ListKnowledgeBaseJobsResponseContent: - """ - Attributes: - knowledge_base_jobs (list['KnowledgeBaseJobDetail']): - pagination (Pagination): - """ - - knowledge_base_jobs: list["KnowledgeBaseJobDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - knowledge_base_jobs = [] - for knowledge_base_jobs_item_data in self.knowledge_base_jobs: - knowledge_base_jobs_item = knowledge_base_jobs_item_data.to_dict() - knowledge_base_jobs.append(knowledge_base_jobs_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "knowledge_base_jobs": knowledge_base_jobs, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_job_detail import KnowledgeBaseJobDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - knowledge_base_jobs = [] - _knowledge_base_jobs = d.pop("knowledge_base_jobs") - for knowledge_base_jobs_item_data in _knowledge_base_jobs: - knowledge_base_jobs_item = KnowledgeBaseJobDetail.from_dict(knowledge_base_jobs_item_data) - - knowledge_base_jobs.append(knowledge_base_jobs_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_knowledge_base_jobs_response_content = cls( - knowledge_base_jobs=knowledge_base_jobs, - pagination=pagination, - ) - - list_knowledge_base_jobs_response_content.additional_properties = d - return list_knowledge_base_jobs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_queries_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_queries_response_content.py deleted file mode 100644 index cc88e67..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_queries_response_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.knowledge_base_query_detail import KnowledgeBaseQueryDetail - - -T = TypeVar("T", bound="ListKnowledgeBaseQueriesResponseContent") - - -@_attrs_define -class ListKnowledgeBaseQueriesResponseContent: - """ - Attributes: - knowledge_base_queries (Union[Unset, list['KnowledgeBaseQueryDetail']]): - """ - - knowledge_base_queries: Union[Unset, list["KnowledgeBaseQueryDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - knowledge_base_queries: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.knowledge_base_queries, Unset): - knowledge_base_queries = [] - for knowledge_base_queries_item_data in self.knowledge_base_queries: - knowledge_base_queries_item = knowledge_base_queries_item_data.to_dict() - knowledge_base_queries.append(knowledge_base_queries_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if knowledge_base_queries is not UNSET: - field_dict["knowledge_base_queries"] = knowledge_base_queries - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_query_detail import KnowledgeBaseQueryDetail - - d = dict(src_dict) - knowledge_base_queries = [] - _knowledge_base_queries = d.pop("knowledge_base_queries", UNSET) - for knowledge_base_queries_item_data in _knowledge_base_queries or []: - knowledge_base_queries_item = KnowledgeBaseQueryDetail.from_dict(knowledge_base_queries_item_data) - - knowledge_base_queries.append(knowledge_base_queries_item) - - list_knowledge_base_queries_response_content = cls( - knowledge_base_queries=knowledge_base_queries, - ) - - list_knowledge_base_queries_response_content.additional_properties = d - return list_knowledge_base_queries_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_searches_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_searches_response_content.py deleted file mode 100644 index 3566eda..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_base_searches_response_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.knowledge_base_search_detail import KnowledgeBaseSearchDetail - - -T = TypeVar("T", bound="ListKnowledgeBaseSearchesResponseContent") - - -@_attrs_define -class ListKnowledgeBaseSearchesResponseContent: - """ - Attributes: - knowledge_base_searches (Union[Unset, list['KnowledgeBaseSearchDetail']]): - """ - - knowledge_base_searches: Union[Unset, list["KnowledgeBaseSearchDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - knowledge_base_searches: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.knowledge_base_searches, Unset): - knowledge_base_searches = [] - for knowledge_base_searches_item_data in self.knowledge_base_searches: - knowledge_base_searches_item = knowledge_base_searches_item_data.to_dict() - knowledge_base_searches.append(knowledge_base_searches_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if knowledge_base_searches is not UNSET: - field_dict["knowledge_base_searches"] = knowledge_base_searches - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_search_detail import KnowledgeBaseSearchDetail - - d = dict(src_dict) - knowledge_base_searches = [] - _knowledge_base_searches = d.pop("knowledge_base_searches", UNSET) - for knowledge_base_searches_item_data in _knowledge_base_searches or []: - knowledge_base_searches_item = KnowledgeBaseSearchDetail.from_dict(knowledge_base_searches_item_data) - - knowledge_base_searches.append(knowledge_base_searches_item) - - list_knowledge_base_searches_response_content = cls( - knowledge_base_searches=knowledge_base_searches, - ) - - list_knowledge_base_searches_response_content.additional_properties = d - return list_knowledge_base_searches_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_bases_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_bases_response_content.py deleted file mode 100644 index f79c9ef..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_knowledge_bases_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.knowledge_base_detail import KnowledgeBaseDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListKnowledgeBasesResponseContent") - - -@_attrs_define -class ListKnowledgeBasesResponseContent: - """ - Attributes: - knowledge_bases (list['KnowledgeBaseDetail']): - pagination (Pagination): - """ - - knowledge_bases: list["KnowledgeBaseDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - knowledge_bases = [] - for knowledge_bases_item_data in self.knowledge_bases: - knowledge_bases_item = knowledge_bases_item_data.to_dict() - knowledge_bases.append(knowledge_bases_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "knowledge_bases": knowledge_bases, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_detail import KnowledgeBaseDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - knowledge_bases = [] - _knowledge_bases = d.pop("knowledge_bases") - for knowledge_bases_item_data in _knowledge_bases: - knowledge_bases_item = KnowledgeBaseDetail.from_dict(knowledge_bases_item_data) - - knowledge_bases.append(knowledge_bases_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_knowledge_bases_response_content = cls( - knowledge_bases=knowledge_bases, - pagination=pagination, - ) - - list_knowledge_bases_response_content.additional_properties = d - return list_knowledge_bases_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_libraries_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_libraries_response_content.py deleted file mode 100644 index 4039314..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_libraries_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.library_detail import LibraryDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListLibrariesResponseContent") - - -@_attrs_define -class ListLibrariesResponseContent: - """ - Attributes: - libraries (list['LibraryDetail']): - pagination (Pagination): - """ - - libraries: list["LibraryDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - libraries = [] - for libraries_item_data in self.libraries: - libraries_item = libraries_item_data.to_dict() - libraries.append(libraries_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "libraries": libraries, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.library_detail import LibraryDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - libraries = [] - _libraries = d.pop("libraries") - for libraries_item_data in _libraries: - libraries_item = LibraryDetail.from_dict(libraries_item_data) - - libraries.append(libraries_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_libraries_response_content = cls( - libraries=libraries, - pagination=pagination, - ) - - list_libraries_response_content.additional_properties = d - return list_libraries_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_messages_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_messages_response_content.py deleted file mode 100644 index 33bd230..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_messages_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.message_detail import MessageDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListMessagesResponseContent") - - -@_attrs_define -class ListMessagesResponseContent: - """ - Attributes: - messages (list['MessageDetail']): - pagination (Pagination): - """ - - messages: list["MessageDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - messages = [] - for messages_item_data in self.messages: - messages_item = messages_item_data.to_dict() - messages.append(messages_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "messages": messages, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.message_detail import MessageDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - messages = [] - _messages = d.pop("messages") - for messages_item_data in _messages: - messages_item = MessageDetail.from_dict(messages_item_data) - - messages.append(messages_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_messages_response_content = cls( - messages=messages, - pagination=pagination, - ) - - list_messages_response_content.additional_properties = d - return list_messages_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_models_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_models_response_content.py deleted file mode 100644 index 0a52946..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_models_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.model_detail import ModelDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListModelsResponseContent") - - -@_attrs_define -class ListModelsResponseContent: - """ - Attributes: - models (list['ModelDetail']): - pagination (Pagination): - """ - - models: list["ModelDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - models = [] - for models_item_data in self.models: - models_item = models_item_data.to_dict() - models.append(models_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "models": models, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.model_detail import ModelDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - models = [] - _models = d.pop("models") - for models_item_data in _models: - models_item = ModelDetail.from_dict(models_item_data) - - models.append(models_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_models_response_content = cls( - models=models, - pagination=pagination, - ) - - list_models_response_content.additional_properties = d - return list_models_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_api_keys_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_api_keys_response_content.py deleted file mode 100644 index 6e31847..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_api_keys_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.api_key_detail import ApiKeyDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListOrganizationApiKeysResponseContent") - - -@_attrs_define -class ListOrganizationApiKeysResponseContent: - """ - Attributes: - api_keys (list['ApiKeyDetail']): - pagination (Pagination): - """ - - api_keys: list["ApiKeyDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - api_keys = [] - for api_keys_item_data in self.api_keys: - api_keys_item = api_keys_item_data.to_dict() - api_keys.append(api_keys_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "api_keys": api_keys, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.api_key_detail import ApiKeyDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - api_keys = [] - _api_keys = d.pop("api_keys") - for api_keys_item_data in _api_keys: - api_keys_item = ApiKeyDetail.from_dict(api_keys_item_data) - - api_keys.append(api_keys_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_organization_api_keys_response_content = cls( - api_keys=api_keys, - pagination=pagination, - ) - - list_organization_api_keys_response_content.additional_properties = d - return list_organization_api_keys_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_users_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_users_response_content.py deleted file mode 100644 index 2ebef95..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_organization_users_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.organization_user_detail import OrganizationUserDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListOrganizationUsersResponseContent") - - -@_attrs_define -class ListOrganizationUsersResponseContent: - """ - Attributes: - pagination (Pagination): - users (list['OrganizationUserDetail']): - """ - - pagination: "Pagination" - users: list["OrganizationUserDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - users = [] - for users_item_data in self.users: - users_item = users_item_data.to_dict() - users.append(users_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "users": users, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.organization_user_detail import OrganizationUserDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - users = [] - _users = d.pop("users") - for users_item_data in _users: - users_item = OrganizationUserDetail.from_dict(users_item_data) - - users.append(users_item) - - list_organization_users_response_content = cls( - pagination=pagination, - users=users, - ) - - list_organization_users_response_content.additional_properties = d - return list_organization_users_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_retriever_components_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_retriever_components_response_content.py deleted file mode 100644 index 7d5f363..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_retriever_components_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.retriever_component_detail import RetrieverComponentDetail - - -T = TypeVar("T", bound="ListRetrieverComponentsResponseContent") - - -@_attrs_define -class ListRetrieverComponentsResponseContent: - """ - Attributes: - pagination (Pagination): - retriever_components (list['RetrieverComponentDetail']): - """ - - pagination: "Pagination" - retriever_components: list["RetrieverComponentDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "retriever_components": retriever_components, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.retriever_component_detail import RetrieverComponentDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - retriever_components = [] - _retriever_components = d.pop("retriever_components") - for retriever_components_item_data in _retriever_components: - retriever_components_item = RetrieverComponentDetail.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - list_retriever_components_response_content = cls( - pagination=pagination, - retriever_components=retriever_components, - ) - - list_retriever_components_response_content.additional_properties = d - return list_retriever_components_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_retrievers_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_retrievers_response_content.py deleted file mode 100644 index 0cf83d9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_retrievers_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.retriever_detail import RetrieverDetail - - -T = TypeVar("T", bound="ListRetrieversResponseContent") - - -@_attrs_define -class ListRetrieversResponseContent: - """ - Attributes: - pagination (Pagination): - retrievers (list['RetrieverDetail']): - """ - - pagination: "Pagination" - retrievers: list["RetrieverDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - retrievers = [] - for retrievers_item_data in self.retrievers: - retrievers_item = retrievers_item_data.to_dict() - retrievers.append(retrievers_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "retrievers": retrievers, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.retriever_detail import RetrieverDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - retrievers = [] - _retrievers = d.pop("retrievers") - for retrievers_item_data in _retrievers: - retrievers_item = RetrieverDetail.from_dict(retrievers_item_data) - - retrievers.append(retrievers_item) - - list_retrievers_response_content = cls( - pagination=pagination, - retrievers=retrievers, - ) - - list_retrievers_response_content.additional_properties = d - return list_retrievers_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_rules_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_rules_response_content.py deleted file mode 100644 index a6fa209..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_rules_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.rule_detail import RuleDetail - - -T = TypeVar("T", bound="ListRulesResponseContent") - - -@_attrs_define -class ListRulesResponseContent: - """ - Attributes: - pagination (Pagination): - rules (list['RuleDetail']): - """ - - pagination: "Pagination" - rules: list["RuleDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - rules = [] - for rules_item_data in self.rules: - rules_item = rules_item_data.to_dict() - rules.append(rules_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "rules": rules, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.rule_detail import RuleDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - rules = [] - _rules = d.pop("rules") - for rules_item_data in _rules: - rules_item = RuleDetail.from_dict(rules_item_data) - - rules.append(rules_item) - - list_rules_response_content = cls( - pagination=pagination, - rules=rules, - ) - - list_rules_response_content.additional_properties = d - return list_rules_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_rulesets_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_rulesets_response_content.py deleted file mode 100644 index 17e799b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_rulesets_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.ruleset_detail import RulesetDetail - - -T = TypeVar("T", bound="ListRulesetsResponseContent") - - -@_attrs_define -class ListRulesetsResponseContent: - """ - Attributes: - pagination (Pagination): - rulesets (list['RulesetDetail']): - """ - - pagination: "Pagination" - rulesets: list["RulesetDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - rulesets = [] - for rulesets_item_data in self.rulesets: - rulesets_item = rulesets_item_data.to_dict() - rulesets.append(rulesets_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "rulesets": rulesets, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.ruleset_detail import RulesetDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - rulesets = [] - _rulesets = d.pop("rulesets") - for rulesets_item_data in _rulesets: - rulesets_item = RulesetDetail.from_dict(rulesets_item_data) - - rulesets.append(rulesets_item) - - list_rulesets_response_content = cls( - pagination=pagination, - rulesets=rulesets, - ) - - list_rulesets_response_content.additional_properties = d - return list_rulesets_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_secrets_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_secrets_response_content.py deleted file mode 100644 index c3aab32..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_secrets_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.secret_detail import SecretDetail - - -T = TypeVar("T", bound="ListSecretsResponseContent") - - -@_attrs_define -class ListSecretsResponseContent: - """ - Attributes: - pagination (Pagination): - secrets (list['SecretDetail']): - """ - - pagination: "Pagination" - secrets: list["SecretDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - secrets = [] - for secrets_item_data in self.secrets: - secrets_item = secrets_item_data.to_dict() - secrets.append(secrets_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "secrets": secrets, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.secret_detail import SecretDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - secrets = [] - _secrets = d.pop("secrets") - for secrets_item_data in _secrets: - secrets_item = SecretDetail.from_dict(secrets_item_data) - - secrets.append(secrets_item) - - list_secrets_response_content = cls( - pagination=pagination, - secrets=secrets, - ) - - list_secrets_response_content.additional_properties = d - return list_secrets_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_spans_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_spans_response_content.py deleted file mode 100644 index 6d70049..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_spans_response_content.py +++ /dev/null @@ -1,84 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.span_detail import SpanDetail - - -T = TypeVar("T", bound="ListSpansResponseContent") - - -@_attrs_define -class ListSpansResponseContent: - """ - Attributes: - spans (list['SpanDetail']): - page (Union[Unset, float]): - """ - - spans: list["SpanDetail"] - page: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - spans = [] - for spans_item_data in self.spans: - spans_item = spans_item_data.to_dict() - spans.append(spans_item) - - page = self.page - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "spans": spans, - } - ) - if page is not UNSET: - field_dict["page"] = page - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.span_detail import SpanDetail - - d = dict(src_dict) - spans = [] - _spans = d.pop("spans") - for spans_item_data in _spans: - spans_item = SpanDetail.from_dict(spans_item_data) - - spans.append(spans_item) - - page = d.pop("page", UNSET) - - list_spans_response_content = cls( - spans=spans, - page=page, - ) - - list_spans_response_content.additional_properties = d - return list_spans_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_deployments_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_deployments_response_content.py deleted file mode 100644 index 54429d6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_deployments_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.structure_deployment_detail import StructureDeploymentDetail - - -T = TypeVar("T", bound="ListStructureDeploymentsResponseContent") - - -@_attrs_define -class ListStructureDeploymentsResponseContent: - """ - Attributes: - deployments (list['StructureDeploymentDetail']): - pagination (Pagination): - """ - - deployments: list["StructureDeploymentDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - deployments = [] - for deployments_item_data in self.deployments: - deployments_item = deployments_item_data.to_dict() - deployments.append(deployments_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "deployments": deployments, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.structure_deployment_detail import StructureDeploymentDetail - - d = dict(src_dict) - deployments = [] - _deployments = d.pop("deployments") - for deployments_item_data in _deployments: - deployments_item = StructureDeploymentDetail.from_dict(deployments_item_data) - - deployments.append(deployments_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_structure_deployments_response_content = cls( - deployments=deployments, - pagination=pagination, - ) - - list_structure_deployments_response_content.additional_properties = d - return list_structure_deployments_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_run_logs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_run_logs_response_content.py deleted file mode 100644 index fe4087e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_run_logs_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ListStructureRunLogsResponseContent") - - -@_attrs_define -class ListStructureRunLogsResponseContent: - """ - Attributes: - logs (list[str]): - """ - - logs: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - logs = self.logs - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "logs": logs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - logs = cast(list[str], d.pop("logs")) - - list_structure_run_logs_response_content = cls( - logs=logs, - ) - - list_structure_run_logs_response_content.additional_properties = d - return list_structure_run_logs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_runs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_runs_response_content.py deleted file mode 100644 index efe4aea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_structure_runs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.structure_run_detail import StructureRunDetail - - -T = TypeVar("T", bound="ListStructureRunsResponseContent") - - -@_attrs_define -class ListStructureRunsResponseContent: - """ - Attributes: - pagination (Pagination): - structure_runs (list['StructureRunDetail']): - """ - - pagination: "Pagination" - structure_runs: list["StructureRunDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - structure_runs = [] - for structure_runs_item_data in self.structure_runs: - structure_runs_item = structure_runs_item_data.to_dict() - structure_runs.append(structure_runs_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "structure_runs": structure_runs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.structure_run_detail import StructureRunDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - structure_runs = [] - _structure_runs = d.pop("structure_runs") - for structure_runs_item_data in _structure_runs: - structure_runs_item = StructureRunDetail.from_dict(structure_runs_item_data) - - structure_runs.append(structure_runs_item) - - list_structure_runs_response_content = cls( - pagination=pagination, - structure_runs=structure_runs, - ) - - list_structure_runs_response_content.additional_properties = d - return list_structure_runs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_structures_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_structures_response_content.py deleted file mode 100644 index 6e1877e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_structures_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.structure_detail import StructureDetail - - -T = TypeVar("T", bound="ListStructuresResponseContent") - - -@_attrs_define -class ListStructuresResponseContent: - """ - Attributes: - pagination (Pagination): - structures (list['StructureDetail']): - """ - - pagination: "Pagination" - structures: list["StructureDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - structures = [] - for structures_item_data in self.structures: - structures_item = structures_item_data.to_dict() - structures.append(structures_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "structures": structures, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.structure_detail import StructureDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - structures = [] - _structures = d.pop("structures") - for structures_item_data in _structures: - structures_item = StructureDetail.from_dict(structures_item_data) - - structures.append(structures_item) - - list_structures_response_content = cls( - pagination=pagination, - structures=structures, - ) - - list_structures_response_content.additional_properties = d - return list_structures_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_threads_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_threads_response_content.py deleted file mode 100644 index b050bca..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_threads_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.thread_detail import ThreadDetail - - -T = TypeVar("T", bound="ListThreadsResponseContent") - - -@_attrs_define -class ListThreadsResponseContent: - """ - Attributes: - pagination (Pagination): - threads (list['ThreadDetail']): - """ - - pagination: "Pagination" - threads: list["ThreadDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - threads = [] - for threads_item_data in self.threads: - threads_item = threads_item_data.to_dict() - threads.append(threads_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "threads": threads, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.thread_detail import ThreadDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - threads = [] - _threads = d.pop("threads") - for threads_item_data in _threads: - threads_item = ThreadDetail.from_dict(threads_item_data) - - threads.append(threads_item) - - list_threads_response_content = cls( - pagination=pagination, - threads=threads, - ) - - list_threads_response_content.additional_properties = d - return list_threads_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_deployments_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_deployments_response_content.py deleted file mode 100644 index e3b4f02..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_deployments_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.tool_deployment_detail import ToolDeploymentDetail - - -T = TypeVar("T", bound="ListToolDeploymentsResponseContent") - - -@_attrs_define -class ListToolDeploymentsResponseContent: - """ - Attributes: - deployments (list['ToolDeploymentDetail']): - pagination (Pagination): - """ - - deployments: list["ToolDeploymentDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - deployments = [] - for deployments_item_data in self.deployments: - deployments_item = deployments_item_data.to_dict() - deployments.append(deployments_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "deployments": deployments, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.tool_deployment_detail import ToolDeploymentDetail - - d = dict(src_dict) - deployments = [] - _deployments = d.pop("deployments") - for deployments_item_data in _deployments: - deployments_item = ToolDeploymentDetail.from_dict(deployments_item_data) - - deployments.append(deployments_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_tool_deployments_response_content = cls( - deployments=deployments, - pagination=pagination, - ) - - list_tool_deployments_response_content.additional_properties = d - return list_tool_deployments_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_run_logs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_run_logs_response_content.py deleted file mode 100644 index 039ef2f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_run_logs_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ListToolRunLogsResponseContent") - - -@_attrs_define -class ListToolRunLogsResponseContent: - """ - Attributes: - logs (list[str]): - """ - - logs: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - logs = self.logs - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "logs": logs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - logs = cast(list[str], d.pop("logs")) - - list_tool_run_logs_response_content = cls( - logs=logs, - ) - - list_tool_run_logs_response_content.additional_properties = d - return list_tool_run_logs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_runs_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_runs_response_content.py deleted file mode 100644 index a403912..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_tool_runs_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.tool_run_detail import ToolRunDetail - - -T = TypeVar("T", bound="ListToolRunsResponseContent") - - -@_attrs_define -class ListToolRunsResponseContent: - """ - Attributes: - pagination (Pagination): - tool_runs (list['ToolRunDetail']): - """ - - pagination: "Pagination" - tool_runs: list["ToolRunDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - tool_runs = [] - for tool_runs_item_data in self.tool_runs: - tool_runs_item = tool_runs_item_data.to_dict() - tool_runs.append(tool_runs_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "tool_runs": tool_runs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.tool_run_detail import ToolRunDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - tool_runs = [] - _tool_runs = d.pop("tool_runs") - for tool_runs_item_data in _tool_runs: - tool_runs_item = ToolRunDetail.from_dict(tool_runs_item_data) - - tool_runs.append(tool_runs_item) - - list_tool_runs_response_content = cls( - pagination=pagination, - tool_runs=tool_runs, - ) - - list_tool_runs_response_content.additional_properties = d - return list_tool_runs_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_tools_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_tools_response_content.py deleted file mode 100644 index 4f2db8e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_tools_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.pagination import Pagination - from ..models.tool_detail import ToolDetail - - -T = TypeVar("T", bound="ListToolsResponseContent") - - -@_attrs_define -class ListToolsResponseContent: - """ - Attributes: - pagination (Pagination): - tools (list['ToolDetail']): - """ - - pagination: "Pagination" - tools: list["ToolDetail"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - pagination = self.pagination.to_dict() - - tools = [] - for tools_item_data in self.tools: - tools_item = tools_item_data.to_dict() - tools.append(tools_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "pagination": pagination, - "tools": tools, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pagination import Pagination - from ..models.tool_detail import ToolDetail - - d = dict(src_dict) - pagination = Pagination.from_dict(d.pop("pagination")) - - tools = [] - _tools = d.pop("tools") - for tools_item_data in _tools: - tools_item = ToolDetail.from_dict(tools_item_data) - - tools.append(tools_item) - - list_tools_response_content = cls( - pagination=pagination, - tools=tools, - ) - - list_tools_response_content.additional_properties = d - return list_tools_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_user_invites_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_user_invites_response_content.py deleted file mode 100644 index 2083bb6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_user_invites_response_content.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.invite_detail import InviteDetail - from ..models.pagination import Pagination - - -T = TypeVar("T", bound="ListUserInvitesResponseContent") - - -@_attrs_define -class ListUserInvitesResponseContent: - """ - Attributes: - invites (list['InviteDetail']): - pagination (Pagination): - """ - - invites: list["InviteDetail"] - pagination: "Pagination" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - invites = [] - for invites_item_data in self.invites: - invites_item = invites_item_data.to_dict() - invites.append(invites_item) - - pagination = self.pagination.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "invites": invites, - "pagination": pagination, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.invite_detail import InviteDetail - from ..models.pagination import Pagination - - d = dict(src_dict) - invites = [] - _invites = d.pop("invites") - for invites_item_data in _invites: - invites_item = InviteDetail.from_dict(invites_item_data) - - invites.append(invites_item) - - pagination = Pagination.from_dict(d.pop("pagination")) - - list_user_invites_response_content = cls( - invites=invites, - pagination=pagination, - ) - - list_user_invites_response_content.additional_properties = d - return list_user_invites_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/list_users_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/list_users_response_content.py deleted file mode 100644 index 3ad7c44..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/list_users_response_content.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.user_detail import UserDetail - - -T = TypeVar("T", bound="ListUsersResponseContent") - - -@_attrs_define -class ListUsersResponseContent: - """ - Attributes: - users (Union[Unset, list['UserDetail']]): - """ - - users: Union[Unset, list["UserDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - users: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.users, Unset): - users = [] - for users_item_data in self.users: - users_item = users_item_data.to_dict() - users.append(users_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if users is not UNSET: - field_dict["users"] = users - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.user_detail import UserDetail - - d = dict(src_dict) - users = [] - _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = UserDetail.from_dict(users_item_data) - - users.append(users_item) - - list_users_response_content = cls( - users=users, - ) - - list_users_response_content.additional_properties = d - return list_users_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/message_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/message_content.py deleted file mode 100644 index cc6c419..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/message_content.py +++ /dev/null @@ -1,73 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.artifact import Artifact - - -T = TypeVar("T", bound="MessageContent") - - -@_attrs_define -class MessageContent: - """ - Attributes: - artifact (Artifact): - type_ (str): - """ - - artifact: "Artifact" - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - artifact = self.artifact.to_dict() - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "artifact": artifact, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.artifact import Artifact - - d = dict(src_dict) - artifact = Artifact.from_dict(d.pop("artifact")) - - type_ = d.pop("type") - - message_content = cls( - artifact=artifact, - type_=type_, - ) - - message_content.additional_properties = d - return message_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/message_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/message_detail.py deleted file mode 100644 index e0ca721..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/message_detail.py +++ /dev/null @@ -1,131 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="MessageDetail") - - -@_attrs_define -class MessageDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - index (float): - input_ (str): - message_id (str): - metadata (Metadata): - output (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - index: float - input_: str - message_id: str - metadata: "Metadata" - output: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - index = self.index - - input_ = self.input_ - - message_id = self.message_id - - metadata = self.metadata.to_dict() - - output = self.output - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "index": index, - "input": input_, - "message_id": message_id, - "metadata": metadata, - "output": output, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - index = d.pop("index") - - input_ = d.pop("input") - - message_id = d.pop("message_id") - - metadata = Metadata.from_dict(d.pop("metadata")) - - output = d.pop("output") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - message_detail = cls( - created_at=created_at, - created_by=created_by, - index=index, - input_=input_, - message_id=message_id, - metadata=metadata, - output=output, - thread_id=thread_id, - updated_at=updated_at, - ) - - message_detail.additional_properties = d - return message_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/message_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/message_input.py deleted file mode 100644 index fa56ee6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/message_input.py +++ /dev/null @@ -1,91 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="MessageInput") - - -@_attrs_define -class MessageInput: - """ - Attributes: - input_ (str): - output (str): - metadata (Union[Unset, Metadata]): - """ - - input_: str - output: str - metadata: Union[Unset, "Metadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_ = self.input_ - - output = self.output - - 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( - { - "input": input_, - "output": output, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - input_ = d.pop("input") - - output = d.pop("output") - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - message_input = cls( - input_=input_, - output=output, - metadata=metadata, - ) - - message_input.additional_properties = d - return message_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/meta.py b/griptape_cloud_client/generated/griptape_cloud_client/models/meta.py deleted file mode 100644 index f46fdaf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/meta.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="Meta") - - -@_attrs_define -class Meta: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - meta = cls() - - meta.additional_properties = d - return meta - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/metadata.py b/griptape_cloud_client/generated/griptape_cloud_client/models/metadata.py deleted file mode 100644 index 51f405d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/metadata.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="Metadata") - - -@_attrs_define -class Metadata: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - metadata = cls() - - metadata.additional_properties = d - return 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/griptape_cloud_client/generated/griptape_cloud_client/models/model_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/model_detail.py deleted file mode 100644 index 4276106..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/model_detail.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.model_type import ModelType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ModelDetail") - - -@_attrs_define -class ModelDetail: - """ - Attributes: - default (bool): - model_name (str): - model_type (ModelType): - description (Union[Unset, str]): - """ - - default: bool - model_name: str - model_type: ModelType - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - default = self.default - - model_name = self.model_name - - model_type = self.model_type.value - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "default": default, - "model_name": model_name, - "model_type": model_type, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - default = d.pop("default") - - model_name = d.pop("model_name") - - model_type = ModelType(d.pop("model_type")) - - description = d.pop("description", UNSET) - - model_detail = cls( - default=default, - model_name=model_name, - model_type=model_type, - description=description, - ) - - model_detail.additional_properties = d - return model_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts.py b/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts.py deleted file mode 100644 index cb7cdac..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ModelTokenCounts") - - -@_attrs_define -class ModelTokenCounts: - """ - Attributes: - input_ (Union[Unset, float]): - output (Union[Unset, float]): - """ - - input_: Union[Unset, float] = UNSET - output: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_ = self.input_ - - output = self.output - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - model_token_counts = cls( - input_=input_, - output=output, - ) - - model_token_counts.additional_properties = d - return model_token_counts - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts_map.py b/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts_map.py deleted file mode 100644 index 8efae8e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/model_token_counts_map.py +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.model_token_counts import ModelTokenCounts - - -T = TypeVar("T", bound="ModelTokenCountsMap") - - -@_attrs_define -class ModelTokenCountsMap: - """ """ - - additional_properties: dict[str, "ModelTokenCounts"] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - for prop_name, prop in self.additional_properties.items(): - field_dict[prop_name] = prop.to_dict() - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.model_token_counts import ModelTokenCounts - - d = dict(src_dict) - model_token_counts_map = cls() - - additional_properties = {} - for prop_name, prop_dict in d.items(): - additional_property = ModelTokenCounts.from_dict(prop_dict) - - additional_properties[prop_name] = additional_property - - model_token_counts_map.additional_properties = additional_properties - return model_token_counts_map - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> "ModelTokenCounts": - return self.additional_properties[key] - - def __setitem__(self, key: str, value: "ModelTokenCounts") -> 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/griptape_cloud_client/generated/griptape_cloud_client/models/model_type.py b/griptape_cloud_client/generated/griptape_cloud_client/models/model_type.py deleted file mode 100644 index f11a93c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/model_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class ModelType(str, Enum): - CHAT = "chat" - EMBEDDING = "embedding" - IMAGE_GENERATION = "image_generation" - RERANK = "rerank" - UNKNOWN = "unknown" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/observability_event.py b/griptape_cloud_client/generated/griptape_cloud_client/models/observability_event.py deleted file mode 100644 index 60a18dc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/observability_event.py +++ /dev/null @@ -1,77 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="ObservabilityEvent") - - -@_attrs_define -class ObservabilityEvent: - """ - Attributes: - attributes (Any): - name (str): - timestamp (datetime.datetime): - """ - - attributes: Any - name: str - timestamp: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - attributes = self.attributes - - name = self.name - - timestamp = self.timestamp.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "attributes": attributes, - "name": name, - "timestamp": timestamp, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - attributes = d.pop("attributes") - - name = d.pop("name") - - timestamp = isoparse(d.pop("timestamp")) - - observability_event = cls( - attributes=attributes, - name=name, - timestamp=timestamp, - ) - - observability_event.additional_properties = d - return observability_event - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/organization_model_config.py b/griptape_cloud_client/generated/griptape_cloud_client/models/organization_model_config.py deleted file mode 100644 index 860ca5f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/organization_model_config.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="OrganizationModelConfig") - - -@_attrs_define -class OrganizationModelConfig: - """ - Attributes: - default_chat_model (Union[Unset, str]): - default_embedding_model (Union[Unset, str]): - default_image_generation_model (Union[Unset, str]): - default_rerank_model (Union[Unset, str]): - """ - - default_chat_model: Union[Unset, str] = UNSET - default_embedding_model: Union[Unset, str] = UNSET - default_image_generation_model: Union[Unset, str] = UNSET - default_rerank_model: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - default_chat_model = self.default_chat_model - - default_embedding_model = self.default_embedding_model - - default_image_generation_model = self.default_image_generation_model - - default_rerank_model = self.default_rerank_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if default_chat_model is not UNSET: - field_dict["default_chat_model"] = default_chat_model - if default_embedding_model is not UNSET: - field_dict["default_embedding_model"] = default_embedding_model - if default_image_generation_model is not UNSET: - field_dict["default_image_generation_model"] = default_image_generation_model - if default_rerank_model is not UNSET: - field_dict["default_rerank_model"] = default_rerank_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - default_chat_model = d.pop("default_chat_model", UNSET) - - default_embedding_model = d.pop("default_embedding_model", UNSET) - - default_image_generation_model = d.pop("default_image_generation_model", UNSET) - - default_rerank_model = d.pop("default_rerank_model", UNSET) - - organization_model_config = cls( - default_chat_model=default_chat_model, - default_embedding_model=default_embedding_model, - default_image_generation_model=default_image_generation_model, - default_rerank_model=default_rerank_model, - ) - - organization_model_config.additional_properties = d - return organization_model_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/griptape_cloud_client/generated/griptape_cloud_client/models/organization_user_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/organization_user_detail.py deleted file mode 100644 index 74c1c43..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/organization_user_detail.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="OrganizationUserDetail") - - -@_attrs_define -class OrganizationUserDetail: - """ - Attributes: - email (str): - user_id (str): - """ - - email: str - user_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - email = self.email - - user_id = self.user_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "email": email, - "user_id": user_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - email = d.pop("email") - - user_id = d.pop("user_id") - - organization_user_detail = cls( - email=email, - user_id=user_id, - ) - - organization_user_detail.additional_properties = d - return organization_user_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/pagination.py b/griptape_cloud_client/generated/griptape_cloud_client/models/pagination.py deleted file mode 100644 index e0ea0bc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/pagination.py +++ /dev/null @@ -1,103 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="Pagination") - - -@_attrs_define -class Pagination: - """ - Attributes: - page_number (float): - page_size (float): - total_count (float): - total_pages (float): - next_page (Union[Unset, float]): - previous_page (Union[Unset, float]): - """ - - page_number: float - page_size: float - total_count: float - total_pages: float - next_page: Union[Unset, float] = UNSET - previous_page: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - page_number = self.page_number - - page_size = self.page_size - - total_count = self.total_count - - total_pages = self.total_pages - - next_page = self.next_page - - previous_page = self.previous_page - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "page_number": page_number, - "page_size": page_size, - "total_count": total_count, - "total_pages": total_pages, - } - ) - if next_page is not UNSET: - field_dict["next_page"] = next_page - if previous_page is not UNSET: - field_dict["previous_page"] = previous_page - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - page_number = d.pop("page_number") - - page_size = d.pop("page_size") - - total_count = d.pop("total_count") - - total_pages = d.pop("total_pages") - - next_page = d.pop("next_page", UNSET) - - previous_page = d.pop("previous_page", UNSET) - - pagination = cls( - page_number=page_number, - page_size=page_size, - total_count=total_count, - total_pages=total_pages, - next_page=next_page, - previous_page=previous_page, - ) - - pagination.additional_properties = d - return pagination - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/period.py b/griptape_cloud_client/generated/griptape_cloud_client/models/period.py deleted file mode 100644 index 9a90bdb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/period.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class Period(str, Enum): - VALUE_0 = "1m" - VALUE_1 = "1h" - VALUE_2 = "1d" - VALUE_3 = "1w" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_detail.py deleted file mode 100644 index fac5ba8..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_detail.py +++ /dev/null @@ -1,83 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="PGVectorKnowledgeBaseDetail") - - -@_attrs_define -class PGVectorKnowledgeBaseDetail: - """ - Attributes: - connection_string (str): - embedding_model (str): - query_schema (Any): - use_default_embedding_model (bool): - """ - - connection_string: str - embedding_model: str - query_schema: Any - use_default_embedding_model: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connection_string = self.connection_string - - embedding_model = self.embedding_model - - query_schema = self.query_schema - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_string": connection_string, - "embedding_model": embedding_model, - "query_schema": query_schema, - "use_default_embedding_model": use_default_embedding_model, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connection_string = d.pop("connection_string") - - embedding_model = d.pop("embedding_model") - - query_schema = d.pop("query_schema") - - use_default_embedding_model = d.pop("use_default_embedding_model") - - pg_vector_knowledge_base_detail = cls( - connection_string=connection_string, - embedding_model=embedding_model, - query_schema=query_schema, - use_default_embedding_model=use_default_embedding_model, - ) - - pg_vector_knowledge_base_detail.additional_properties = d - return pg_vector_knowledge_base_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_input.py deleted file mode 100644 index a728cfb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/pg_vector_knowledge_base_input.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="PGVectorKnowledgeBaseInput") - - -@_attrs_define -class PGVectorKnowledgeBaseInput: - """ - Attributes: - connection_string (str): - password (str): - embedding_model (Union[Unset, str]): - use_default_embedding_model (Union[Unset, bool]): - """ - - connection_string: str - password: str - embedding_model: Union[Unset, str] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connection_string = self.connection_string - - password = self.password - - embedding_model = self.embedding_model - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_string": connection_string, - "password": password, - } - ) - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connection_string = d.pop("connection_string") - - password = d.pop("password") - - embedding_model = d.pop("embedding_model", UNSET) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - pg_vector_knowledge_base_input = cls( - connection_string=connection_string, - password=password, - embedding_model=embedding_model, - use_default_embedding_model=use_default_embedding_model, - ) - - pg_vector_knowledge_base_input.additional_properties = d - return pg_vector_knowledge_base_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_detail.py deleted file mode 100644 index dde83e5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_detail.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="PGAIKnowledgeBaseKnowledgeBaseDetail") - - -@_attrs_define -class PGAIKnowledgeBaseKnowledgeBaseDetail: - """ - Attributes: - knowledge_base_name (str): - query_schema (Any): - """ - - knowledge_base_name: str - query_schema: Any - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - knowledge_base_name = self.knowledge_base_name - - query_schema = self.query_schema - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "knowledge_base_name": knowledge_base_name, - "query_schema": query_schema, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - knowledge_base_name = d.pop("knowledge_base_name") - - query_schema = d.pop("query_schema") - - pgai_knowledge_base_knowledge_base_detail = cls( - knowledge_base_name=knowledge_base_name, - query_schema=query_schema, - ) - - pgai_knowledge_base_knowledge_base_detail.additional_properties = d - return pgai_knowledge_base_knowledge_base_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_input.py deleted file mode 100644 index a9e1fdc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/pgai_knowledge_base_knowledge_base_input.py +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="PGAIKnowledgeBaseKnowledgeBaseInput") - - -@_attrs_define -class PGAIKnowledgeBaseKnowledgeBaseInput: - """ """ - - 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: Mapping[str, Any]) -> T: - d = dict(src_dict) - pgai_knowledge_base_knowledge_base_input = cls() - - pgai_knowledge_base_knowledge_base_input.additional_properties = d - return pgai_knowledge_base_knowledge_base_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_request_content.py deleted file mode 100644 index 04ecb5c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_request_content.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="QueryKnowledgeBaseRequestContent") - - -@_attrs_define -class QueryKnowledgeBaseRequestContent: - """ - Attributes: - query (Union[Unset, str]): - query_args (Union[Unset, Any]): - """ - - query: Union[Unset, str] = UNSET - query_args: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - query = self.query - - query_args = self.query_args - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if query is not UNSET: - field_dict["query"] = query - if query_args is not UNSET: - field_dict["query_args"] = query_args - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - query = d.pop("query", UNSET) - - query_args = d.pop("query_args", UNSET) - - query_knowledge_base_request_content = cls( - query=query, - query_args=query_args, - ) - - query_knowledge_base_request_content.additional_properties = d - return query_knowledge_base_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_response_content.py deleted file mode 100644 index 4769e12..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/query_knowledge_base_response_content.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.entry import Entry - - -T = TypeVar("T", bound="QueryKnowledgeBaseResponseContent") - - -@_attrs_define -class QueryKnowledgeBaseResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - entries (list['Entry']): - knowledge_base_id (str): - knowledge_base_query_id (str): - query (str): - """ - - created_at: datetime.datetime - created_by: str - entries: list["Entry"] - knowledge_base_id: str - knowledge_base_query_id: str - query: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - entries = [] - for entries_item_data in self.entries: - entries_item = entries_item_data.to_dict() - entries.append(entries_item) - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_query_id = self.knowledge_base_query_id - - query = self.query - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "entries": entries, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_query_id": knowledge_base_query_id, - "query": query, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.entry import Entry - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - entries = [] - _entries = d.pop("entries") - for entries_item_data in _entries: - entries_item = Entry.from_dict(entries_item_data) - - entries.append(entries_item) - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_query_id = d.pop("knowledge_base_query_id") - - query = d.pop("query") - - query_knowledge_base_response_content = cls( - created_at=created_at, - created_by=created_by, - entries=entries, - knowledge_base_id=knowledge_base_id, - knowledge_base_query_id=knowledge_base_query_id, - query=query, - ) - - query_knowledge_base_response_content.additional_properties = d - return query_knowledge_base_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_request_content.py deleted file mode 100644 index 9ac2968..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_request_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="QueryRetrieverRequestContent") - - -@_attrs_define -class QueryRetrieverRequestContent: - """ - Attributes: - query (str): - retriever_components_query_args (Union[Unset, Any]): - """ - - query: str - retriever_components_query_args: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - query = self.query - - retriever_components_query_args = self.retriever_components_query_args - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "query": query, - } - ) - if retriever_components_query_args is not UNSET: - field_dict["retriever_components_query_args"] = retriever_components_query_args - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - query = d.pop("query") - - retriever_components_query_args = d.pop("retriever_components_query_args", UNSET) - - query_retriever_request_content = cls( - query=query, - retriever_components_query_args=retriever_components_query_args, - ) - - query_retriever_request_content.additional_properties = d - return query_retriever_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_response_content.py deleted file mode 100644 index 2d62c19..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/query_retriever_response_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="QueryRetrieverResponseContent") - - -@_attrs_define -class QueryRetrieverResponseContent: - """ - Attributes: - outputs (list[Any]): - """ - - outputs: list[Any] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - outputs = self.outputs - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "outputs": outputs, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - outputs = cast(list[Any], d.pop("outputs")) - - query_retriever_response_content = cls( - outputs=outputs, - ) - - query_retriever_response_content.additional_properties = d - return query_retriever_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/respond_to_invite_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/respond_to_invite_request_content.py deleted file mode 100644 index 7320d93..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/respond_to_invite_request_content.py +++ /dev/null @@ -1,61 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.invite_response_status import InviteResponseStatus - -T = TypeVar("T", bound="RespondToInviteRequestContent") - - -@_attrs_define -class RespondToInviteRequestContent: - """ - Attributes: - response (InviteResponseStatus): - """ - - response: InviteResponseStatus - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - response = self.response.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "response": response, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - response = InviteResponseStatus(d.pop("response")) - - respond_to_invite_request_content = cls( - response=response, - ) - - respond_to_invite_request_content.additional_properties = d - return respond_to_invite_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_detail.py deleted file mode 100644 index b587860..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_detail.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="RetrieverComponentDetail") - - -@_attrs_define -class RetrieverComponentDetail: - """ - Attributes: - config (Any): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_component_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - config: Any - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_component_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config = self.config - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_component_id = self.retriever_component_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_component_id": retriever_component_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_component_id = d.pop("retriever_component_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - retriever_component_detail = cls( - config=config, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_component_id=retriever_component_id, - type_=type_, - updated_at=updated_at, - description=description, - ) - - retriever_component_detail.additional_properties = d - return retriever_component_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_input.py deleted file mode 100644 index 32a1601..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_component_input.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="RetrieverComponentInput") - - -@_attrs_define -class RetrieverComponentInput: - """ - Attributes: - name (str): - type_ (str): - config (Union[Unset, Any]): - description (Union[Unset, str]): - """ - - name: str - type_: str - config: Union[Unset, Any] = UNSET - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - type_ = self.type_ - - config = self.config - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "name": name, - "type": type_, - } - ) - if config is not UNSET: - field_dict["config"] = config - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name") - - type_ = d.pop("type") - - config = d.pop("config", UNSET) - - description = d.pop("description", UNSET) - - retriever_component_input = cls( - name=name, - type_=type_, - config=config, - description=description, - ) - - retriever_component_input.additional_properties = d - return retriever_component_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_detail.py deleted file mode 100644 index 38edf3b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/retriever_detail.py +++ /dev/null @@ -1,142 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.retriever_component_detail import RetrieverComponentDetail - - -T = TypeVar("T", bound="RetrieverDetail") - - -@_attrs_define -class RetrieverDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_components (list['RetrieverComponentDetail']): - retriever_components_schema (Any): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_components: list["RetrieverComponentDetail"] - retriever_components_schema: Any - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - retriever_components_schema = self.retriever_components_schema - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_components": retriever_components, - "retriever_components_schema": retriever_components_schema, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_detail import RetrieverComponentDetail - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_components = [] - _retriever_components = d.pop("retriever_components") - for retriever_components_item_data in _retriever_components: - retriever_components_item = RetrieverComponentDetail.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - retriever_components_schema = d.pop("retriever_components_schema") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - retriever_detail = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_components=retriever_components, - retriever_components_schema=retriever_components_schema, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - retriever_detail.additional_properties = d - return retriever_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/rule_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/rule_detail.py deleted file mode 100644 index 311b91b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/rule_detail.py +++ /dev/null @@ -1,123 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="RuleDetail") - - -@_attrs_define -class RuleDetail: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - metadata (Metadata): - name (str): - organization_id (str): - rule (str): - rule_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - metadata: "Metadata" - name: str - organization_id: str - rule: str - rule_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule = self.rule - - rule_id = self.rule_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule": rule, - "rule_id": rule_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule = d.pop("rule") - - rule_id = d.pop("rule_id") - - updated_at = isoparse(d.pop("updated_at")) - - rule_detail = cls( - created_at=created_at, - created_by=created_by, - metadata=metadata, - name=name, - organization_id=organization_id, - rule=rule, - rule_id=rule_id, - updated_at=updated_at, - ) - - rule_detail.additional_properties = d - return rule_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/ruleset_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/ruleset_detail.py deleted file mode 100644 index 9029a8a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/ruleset_detail.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="RulesetDetail") - - -@_attrs_define -class RulesetDetail: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - description (str): - metadata (Metadata): - name (str): - organization_id (str): - rule_ids (list[str]): - ruleset_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - description: str - metadata: "Metadata" - name: str - organization_id: str - rule_ids: list[str] - ruleset_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule_ids = self.rule_ids - - ruleset_id = self.ruleset_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "description": description, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule_ids": rule_ids, - "ruleset_id": ruleset_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule_ids = cast(list[str], d.pop("rule_ids")) - - ruleset_id = d.pop("ruleset_id") - - updated_at = isoparse(d.pop("updated_at")) - - ruleset_detail = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - description=description, - metadata=metadata, - name=name, - organization_id=organization_id, - rule_ids=rule_ids, - ruleset_id=ruleset_id, - updated_at=updated_at, - ) - - ruleset_detail.additional_properties = d - return ruleset_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/run_count_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/run_count_gauge.py deleted file mode 100644 index 47af204..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/run_count_gauge.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="RunCountGauge") - - -@_attrs_define -class RunCountGauge: - """ - Attributes: - active_count (Union[Unset, float]): - total_count (Union[Unset, float]): - """ - - active_count: Union[Unset, float] = UNSET - total_count: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active_count = self.active_count - - total_count = self.total_count - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if active_count is not UNSET: - field_dict["active_count"] = active_count - if total_count is not UNSET: - field_dict["total_count"] = total_count - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active_count = d.pop("active_count", UNSET) - - total_count = d.pop("total_count", UNSET) - - run_count_gauge = cls( - active_count=active_count, - total_count=total_count, - ) - - run_count_gauge.additional_properties = d - return run_count_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/run_duration_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/run_duration_gauge.py deleted file mode 100644 index 8d961a7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/run_duration_gauge.py +++ /dev/null @@ -1,84 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.activity_duration import ActivityDuration - - -T = TypeVar("T", bound="RunDurationGauge") - - -@_attrs_define -class RunDurationGauge: - """ - Attributes: - activity_durations (Union[Unset, list['ActivityDuration']]): - total_seconds (Union[Unset, float]): - """ - - activity_durations: Union[Unset, list["ActivityDuration"]] = UNSET - total_seconds: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - activity_durations: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.activity_durations, Unset): - activity_durations = [] - for activity_durations_item_data in self.activity_durations: - activity_durations_item = activity_durations_item_data.to_dict() - activity_durations.append(activity_durations_item) - - total_seconds = self.total_seconds - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if activity_durations is not UNSET: - field_dict["activity_durations"] = activity_durations - if total_seconds is not UNSET: - field_dict["total_seconds"] = total_seconds - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.activity_duration import ActivityDuration - - d = dict(src_dict) - activity_durations = [] - _activity_durations = d.pop("activity_durations", UNSET) - for activity_durations_item_data in _activity_durations or []: - activity_durations_item = ActivityDuration.from_dict(activity_durations_item_data) - - activity_durations.append(activity_durations_item) - - total_seconds = d.pop("total_seconds", UNSET) - - run_duration_gauge = cls( - activity_durations=activity_durations, - total_seconds=total_seconds, - ) - - run_duration_gauge.additional_properties = d - return run_duration_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_detail.py deleted file mode 100644 index 3ba2272..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_detail.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="S3ConnectorDetail") - - -@_attrs_define -class S3ConnectorDetail: - """ - Attributes: - aws_access_key_id (str): - uris (list[str]): - encoding (Union[Unset, str]): - """ - - aws_access_key_id: str - uris: list[str] - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_access_key_id = self.aws_access_key_id - - uris = self.uris - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "aws_access_key_id": aws_access_key_id, - "uris": uris, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - aws_access_key_id = d.pop("aws_access_key_id") - - uris = cast(list[str], d.pop("uris")) - - encoding = d.pop("encoding", UNSET) - - s3_connector_detail = cls( - aws_access_key_id=aws_access_key_id, - uris=uris, - encoding=encoding, - ) - - s3_connector_detail.additional_properties = d - return s3_connector_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_input.py deleted file mode 100644 index 24a7791..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/s3_connector_input.py +++ /dev/null @@ -1,86 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="S3ConnectorInput") - - -@_attrs_define -class S3ConnectorInput: - """ - Attributes: - aws_access_key_id (str): - aws_secret_access_key (str): - uris (list[str]): - encoding (Union[Unset, str]): - """ - - aws_access_key_id: str - aws_secret_access_key: str - uris: list[str] - encoding: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - aws_access_key_id = self.aws_access_key_id - - aws_secret_access_key = self.aws_secret_access_key - - uris = self.uris - - encoding = self.encoding - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "uris": uris, - } - ) - if encoding is not UNSET: - field_dict["encoding"] = encoding - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - aws_access_key_id = d.pop("aws_access_key_id") - - aws_secret_access_key = d.pop("aws_secret_access_key") - - uris = cast(list[str], d.pop("uris")) - - encoding = d.pop("encoding", UNSET) - - s3_connector_input = cls( - aws_access_key_id=aws_access_key_id, - aws_secret_access_key=aws_secret_access_key, - uris=uris, - encoding=encoding, - ) - - s3_connector_input.additional_properties = d - return s3_connector_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_request_content.py deleted file mode 100644 index 94b3286..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_request_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="SearchKnowledgeBaseRequestContent") - - -@_attrs_define -class SearchKnowledgeBaseRequestContent: - """ - Attributes: - query (str): - query_args (Union[Unset, Any]): - """ - - query: str - query_args: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - query = self.query - - query_args = self.query_args - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "query": query, - } - ) - if query_args is not UNSET: - field_dict["query_args"] = query_args - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - query = d.pop("query") - - query_args = d.pop("query_args", UNSET) - - search_knowledge_base_request_content = cls( - query=query, - query_args=query_args, - ) - - search_knowledge_base_request_content.additional_properties = d - return search_knowledge_base_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_response_content.py deleted file mode 100644 index f523be7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/search_knowledge_base_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="SearchKnowledgeBaseResponseContent") - - -@_attrs_define -class SearchKnowledgeBaseResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - knowledge_base_search_id (str): - query (str): - result (str): - """ - - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - knowledge_base_search_id: str - query: str - result: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - knowledge_base_search_id = self.knowledge_base_search_id - - query = self.query - - result = self.result - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "knowledge_base_search_id": knowledge_base_search_id, - "query": query, - "result": result, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - knowledge_base_search_id = d.pop("knowledge_base_search_id") - - query = d.pop("query") - - result = d.pop("result") - - search_knowledge_base_response_content = cls( - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - knowledge_base_search_id=knowledge_base_search_id, - query=query, - result=result, - ) - - search_knowledge_base_response_content.additional_properties = d - return search_knowledge_base_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/secret_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/secret_detail.py deleted file mode 100644 index 0e983b3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/secret_detail.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="SecretDetail") - - -@_attrs_define -class SecretDetail: - """ - Attributes: - created_at (datetime.datetime): - last_used (datetime.datetime): - name (str): - organization_id (str): - secret_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - last_used: datetime.datetime - name: str - organization_id: str - secret_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - secret_id = self.secret_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "secret_id": secret_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - secret_id = d.pop("secret_id") - - updated_at = isoparse(d.pop("updated_at")) - - secret_detail = cls( - created_at=created_at, - last_used=last_used, - name=name, - organization_id=organization_id, - secret_id=secret_id, - updated_at=updated_at, - ) - - secret_detail.additional_properties = d - return secret_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/service_error_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/service_error_response_content.py deleted file mode 100644 index bce9906..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/service_error_response_content.py +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="ServiceErrorResponseContent") - - -@_attrs_define -class ServiceErrorResponseContent: - """ - Attributes: - errors (Union[Unset, list[Any]]): - type_ (Union[Unset, str]): - """ - - errors: Union[Unset, list[Any]] = UNSET - type_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - errors: Union[Unset, list[Any]] = UNSET - if not isinstance(self.errors, Unset): - errors = self.errors - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict["errors"] = errors - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - errors = cast(list[Any], d.pop("errors", UNSET)) - - type_ = d.pop("type", UNSET) - - service_error_response_content = cls( - errors=errors, - type_=type_, - ) - - service_error_response_content.additional_properties = d - return service_error_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/slack_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/slack_detail.py deleted file mode 100644 index 1f773b3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/slack_detail.py +++ /dev/null @@ -1,99 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SlackDetail") - - -@_attrs_define -class SlackDetail: - """ - Attributes: - app_description (str): - app_display_name (str): - app_manifest (Any): - app_name (str): - bot_token_secret_ref (str): - signing_secret_secret_ref (str): - """ - - app_description: str - app_display_name: str - app_manifest: Any - app_name: str - bot_token_secret_ref: str - signing_secret_secret_ref: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_description = self.app_description - - app_display_name = self.app_display_name - - app_manifest = self.app_manifest - - app_name = self.app_name - - bot_token_secret_ref = self.bot_token_secret_ref - - signing_secret_secret_ref = self.signing_secret_secret_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_description": app_description, - "app_display_name": app_display_name, - "app_manifest": app_manifest, - "app_name": app_name, - "bot_token_secret_ref": bot_token_secret_ref, - "signing_secret_secret_ref": signing_secret_secret_ref, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_description = d.pop("app_description") - - app_display_name = d.pop("app_display_name") - - app_manifest = d.pop("app_manifest") - - app_name = d.pop("app_name") - - bot_token_secret_ref = d.pop("bot_token_secret_ref") - - signing_secret_secret_ref = d.pop("signing_secret_secret_ref") - - slack_detail = cls( - app_description=app_description, - app_display_name=app_display_name, - app_manifest=app_manifest, - app_name=app_name, - bot_token_secret_ref=bot_token_secret_ref, - signing_secret_secret_ref=signing_secret_secret_ref, - ) - - slack_detail.additional_properties = d - return slack_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/slack_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/slack_input.py deleted file mode 100644 index 16aafcf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/slack_input.py +++ /dev/null @@ -1,95 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="SlackInput") - - -@_attrs_define -class SlackInput: - """ - Attributes: - app_description (str): - app_display_name (str): - app_name (str): - bot_token_secret_ref (Union[Unset, str]): - signing_secret_secret_ref (Union[Unset, str]): - """ - - app_description: str - app_display_name: str - app_name: str - bot_token_secret_ref: Union[Unset, str] = UNSET - signing_secret_secret_ref: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - app_description = self.app_description - - app_display_name = self.app_display_name - - app_name = self.app_name - - bot_token_secret_ref = self.bot_token_secret_ref - - signing_secret_secret_ref = self.signing_secret_secret_ref - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "app_description": app_description, - "app_display_name": app_display_name, - "app_name": app_name, - } - ) - if bot_token_secret_ref is not UNSET: - field_dict["bot_token_secret_ref"] = bot_token_secret_ref - if signing_secret_secret_ref is not UNSET: - field_dict["signing_secret_secret_ref"] = signing_secret_secret_ref - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - app_description = d.pop("app_description") - - app_display_name = d.pop("app_display_name") - - app_name = d.pop("app_name") - - bot_token_secret_ref = d.pop("bot_token_secret_ref", UNSET) - - signing_secret_secret_ref = d.pop("signing_secret_secret_ref", UNSET) - - slack_input = cls( - app_description=app_description, - app_display_name=app_display_name, - app_name=app_name, - bot_token_secret_ref=bot_token_secret_ref, - signing_secret_secret_ref=signing_secret_secret_ref, - ) - - slack_input.additional_properties = d - return slack_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/span_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/span_detail.py deleted file mode 100644 index e4946e0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/span_detail.py +++ /dev/null @@ -1,135 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.span_status import SpanStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.observability_event import ObservabilityEvent - - -T = TypeVar("T", bound="SpanDetail") - - -@_attrs_define -class SpanDetail: - """ - Attributes: - attributes (Any): - end_time (datetime.datetime): - events (ObservabilityEvent): - name (str): - span_id (str): - start_time (datetime.datetime): - status (SpanStatus): - trace_id (str): - parent_id (Union[Unset, str]): - """ - - attributes: Any - end_time: datetime.datetime - events: "ObservabilityEvent" - name: str - span_id: str - start_time: datetime.datetime - status: SpanStatus - trace_id: str - parent_id: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - attributes = self.attributes - - end_time = self.end_time.isoformat() - - events = self.events.to_dict() - - name = self.name - - span_id = self.span_id - - start_time = self.start_time.isoformat() - - status = self.status.value - - trace_id = self.trace_id - - parent_id = self.parent_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "attributes": attributes, - "end_time": end_time, - "events": events, - "name": name, - "span_id": span_id, - "start_time": start_time, - "status": status, - "trace_id": trace_id, - } - ) - if parent_id is not UNSET: - field_dict["parent_id"] = parent_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.observability_event import ObservabilityEvent - - d = dict(src_dict) - attributes = d.pop("attributes") - - end_time = isoparse(d.pop("end_time")) - - events = ObservabilityEvent.from_dict(d.pop("events")) - - name = d.pop("name") - - span_id = d.pop("span_id") - - start_time = isoparse(d.pop("start_time")) - - status = SpanStatus(d.pop("status")) - - trace_id = d.pop("trace_id") - - parent_id = d.pop("parent_id", UNSET) - - span_detail = cls( - attributes=attributes, - end_time=end_time, - events=events, - name=name, - span_id=span_id, - start_time=start_time, - status=status, - trace_id=trace_id, - parent_id=parent_id, - ) - - span_detail.additional_properties = d - return span_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/span_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/span_status.py deleted file mode 100644 index b935cea..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/span_status.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class SpanStatus(str, Enum): - ERROR = "ERROR" - OK = "OK" - UNSET = "UNSET" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/stream_message_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/stream_message_content.py deleted file mode 100644 index 23fb8d9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/stream_message_content.py +++ /dev/null @@ -1,73 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.artifact import Artifact - - -T = TypeVar("T", bound="StreamMessageContent") - - -@_attrs_define -class StreamMessageContent: - """ - Attributes: - artifact (Artifact): - type_ (str): - """ - - artifact: "Artifact" - type_: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - artifact = self.artifact.to_dict() - - type_ = self.type_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "artifact": artifact, - "type": type_, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.artifact import Artifact - - d = dict(src_dict) - artifact = Artifact.from_dict(d.pop("artifact")) - - type_ = d.pop("type") - - stream_message_content = cls( - artifact=artifact, - type_=type_, - ) - - stream_message_content.additional_properties = d - return stream_message_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_0.py deleted file mode 100644 index 10de2ba..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_structure_code import GithubStructureCode - - -T = TypeVar("T", bound="StructureCodeType0") - - -@_attrs_define -class StructureCodeType0: - """ - Attributes: - github (GithubStructureCode): - """ - - github: "GithubStructureCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_structure_code import GithubStructureCode - - d = dict(src_dict) - github = GithubStructureCode.from_dict(d.pop("github")) - - structure_code_type_0 = cls( - github=github, - ) - - structure_code_type_0.additional_properties = d - return structure_code_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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_1.py deleted file mode 100644 index 5f47cd0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_structure_code import DataLakeStructureCode - - -T = TypeVar("T", bound="StructureCodeType1") - - -@_attrs_define -class StructureCodeType1: - """ - Attributes: - data_lake (DataLakeStructureCode): - """ - - data_lake: "DataLakeStructureCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_structure_code import DataLakeStructureCode - - d = dict(src_dict) - data_lake = DataLakeStructureCode.from_dict(d.pop("data_lake")) - - structure_code_type_1 = cls( - data_lake=data_lake, - ) - - structure_code_type_1.additional_properties = d - return structure_code_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_2.py deleted file mode 100644 index 9e95bb1..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_code_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.default_structure_code import DefaultStructureCode - - -T = TypeVar("T", bound="StructureCodeType2") - - -@_attrs_define -class StructureCodeType2: - """ - Attributes: - default (DefaultStructureCode): - """ - - default: "DefaultStructureCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - default = self.default.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "default": default, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.default_structure_code import DefaultStructureCode - - d = dict(src_dict) - default = DefaultStructureCode.from_dict(d.pop("default")) - - structure_code_type_2 = cls( - default=default, - ) - - structure_code_type_2.additional_properties = d - return structure_code_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_detail.py deleted file mode 100644 index 410cbb0..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_detail.py +++ /dev/null @@ -1,72 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="StructureConnectorDetail") - - -@_attrs_define -class StructureConnectorDetail: - """ - Attributes: - structure_id (str): - args (Union[Unset, list[str]]): - """ - - structure_id: str - args: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure_id = self.structure_id - - args: Union[Unset, list[str]] = UNSET - if not isinstance(self.args, Unset): - args = self.args - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure_id": structure_id, - } - ) - if args is not UNSET: - field_dict["args"] = args - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - structure_id = d.pop("structure_id") - - args = cast(list[str], d.pop("args", UNSET)) - - structure_connector_detail = cls( - structure_id=structure_id, - args=args, - ) - - structure_connector_detail.additional_properties = d - return structure_connector_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_input.py deleted file mode 100644 index e43d443..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_connector_input.py +++ /dev/null @@ -1,72 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="StructureConnectorInput") - - -@_attrs_define -class StructureConnectorInput: - """ - Attributes: - structure_id (str): - args (Union[Unset, list[str]]): - """ - - structure_id: str - args: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure_id = self.structure_id - - args: Union[Unset, list[str]] = UNSET - if not isinstance(self.args, Unset): - args = self.args - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure_id": structure_id, - } - ) - if args is not UNSET: - field_dict["args"] = args - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - structure_id = d.pop("structure_id") - - args = cast(list[str], d.pop("args", UNSET)) - - structure_connector_input = cls( - structure_id=structure_id, - args=args, - ) - - structure_connector_input.additional_properties = d - return structure_connector_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_deployment_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_deployment_detail.py deleted file mode 100644 index b38f4eb..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_deployment_detail.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="StructureDeploymentDetail") - - -@_attrs_define -class StructureDeploymentDetail: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - status (DeploymentStatus): - structure_id (str): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - status: DeploymentStatus - structure_id: str - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - status = self.status.value - - structure_id = self.structure_id - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "status": status, - "structure_id": structure_id, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - status = DeploymentStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - structure_deployment_detail = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - status=status, - structure_id=structure_id, - completed_at=completed_at, - status_detail=status_detail, - ) - - structure_deployment_detail.additional_properties = d - return structure_deployment_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_detail.py deleted file mode 100644 index 6c28f4a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_detail.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="StructureDetail") - - -@_attrs_define -class StructureDetail: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - structure_detail = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - structure_detail.additional_properties = d - return structure_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_detail.py deleted file mode 100644 index 4baf61c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_detail.py +++ /dev/null @@ -1,223 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.structure_run_status import StructureRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="StructureRunDetail") - - -@_attrs_define -class StructureRunDetail: - """ - Attributes: - args (list[str]): - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - started_at (Union[None, datetime.datetime]): - status (StructureRunStatus): - structure_id (str): - structure_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - args: list[str] - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - started_at: Union[None, datetime.datetime] - status: StructureRunStatus - structure_id: str - structure_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - args = self.args - - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - structure_id = self.structure_id - - structure_run_id = self.structure_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "args": args, - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "started_at": started_at, - "status": status, - "structure_id": structure_id, - "structure_run_id": structure_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - args = cast(list[str], d.pop("args")) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = StructureRunStatus(d.pop("status")) - - structure_id = d.pop("structure_id") - - structure_run_id = d.pop("structure_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - structure_run_detail = cls( - args=args, - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - started_at=started_at, - status=status, - structure_id=structure_id, - structure_run_id=structure_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - structure_run_detail.additional_properties = d - return structure_run_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_status.py deleted file mode 100644 index f875313..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structure_run_status.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class StructureRunStatus(str, Enum): - CANCELLED = "CANCELLED" - ERROR = "ERROR" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - STARTING = "STARTING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_detail.py deleted file mode 100644 index 0635dc5..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_detail.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StructuredColumnDetail") - - -@_attrs_define -class StructuredColumnDetail: - """ - Attributes: - column_name (str): - sql_type (str): - """ - - column_name: str - sql_type: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - column_name = self.column_name - - sql_type = self.sql_type - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "column_name": column_name, - "sql_type": sql_type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - column_name = d.pop("column_name") - - sql_type = d.pop("sql_type") - - structured_column_detail = cls( - column_name=column_name, - sql_type=sql_type, - ) - - structured_column_detail.additional_properties = d - return structured_column_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_input.py deleted file mode 100644 index b9ca55b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/structured_column_input.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StructuredColumnInput") - - -@_attrs_define -class StructuredColumnInput: - """ - Attributes: - column_name (str): - description (str): - sql_type (str): - """ - - column_name: str - description: str - sql_type: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - column_name = self.column_name - - description = self.description - - sql_type = self.sql_type - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "column_name": column_name, - "description": description, - "sql_type": sql_type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - column_name = d.pop("column_name") - - description = d.pop("description") - - sql_type = d.pop("sql_type") - - structured_column_input = cls( - column_name=column_name, - description=description, - sql_type=sql_type, - ) - - structured_column_input.additional_properties = d - return structured_column_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/thread_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/thread_detail.py deleted file mode 100644 index e087ec3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/thread_detail.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="ThreadDetail") - - -@_attrs_define -class ThreadDetail: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - message_count (float): - messages_length (float): - metadata (Metadata): - name (str): - organization_id (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - message_count: float - messages_length: float - metadata: "Metadata" - name: str - organization_id: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - message_count = self.message_count - - messages_length = self.messages_length - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "message_count": message_count, - "messages_length": messages_length, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - message_count = d.pop("message_count") - - messages_length = d.pop("messages_length") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - thread_detail = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - message_count=message_count, - messages_length=messages_length, - metadata=metadata, - name=name, - organization_id=organization_id, - thread_id=thread_id, - updated_at=updated_at, - ) - - thread_detail.additional_properties = d - return thread_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/token_count_gauge.py b/griptape_cloud_client/generated/griptape_cloud_client/models/token_count_gauge.py deleted file mode 100644 index e269622..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/token_count_gauge.py +++ /dev/null @@ -1,90 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.model_token_counts_map import ModelTokenCountsMap - - -T = TypeVar("T", bound="TokenCountGauge") - - -@_attrs_define -class TokenCountGauge: - """ - Attributes: - by_model (Union[Unset, ModelTokenCountsMap]): - input_ (Union[Unset, float]): - output (Union[Unset, float]): - """ - - by_model: Union[Unset, "ModelTokenCountsMap"] = UNSET - input_: Union[Unset, float] = UNSET - output: Union[Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - by_model: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.by_model, Unset): - by_model = self.by_model.to_dict() - - input_ = self.input_ - - output = self.output - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if by_model is not UNSET: - field_dict["by_model"] = by_model - if input_ is not UNSET: - field_dict["input"] = input_ - if output is not UNSET: - field_dict["output"] = output - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.model_token_counts_map import ModelTokenCountsMap - - d = dict(src_dict) - _by_model = d.pop("by_model", UNSET) - by_model: Union[Unset, ModelTokenCountsMap] - if isinstance(_by_model, Unset): - by_model = UNSET - else: - by_model = ModelTokenCountsMap.from_dict(_by_model) - - input_ = d.pop("input", UNSET) - - output = d.pop("output", UNSET) - - token_count_gauge = cls( - by_model=by_model, - input_=input_, - output=output, - ) - - token_count_gauge.additional_properties = d - return token_count_gauge - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_0.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_0.py deleted file mode 100644 index dbafb21..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_0.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.github_tool_code import GithubToolCode - - -T = TypeVar("T", bound="ToolCodeType0") - - -@_attrs_define -class ToolCodeType0: - """ - Attributes: - github (GithubToolCode): - """ - - github: "GithubToolCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github = self.github.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github": github, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.github_tool_code import GithubToolCode - - d = dict(src_dict) - github = GithubToolCode.from_dict(d.pop("github")) - - tool_code_type_0 = cls( - github=github, - ) - - tool_code_type_0.additional_properties = d - return tool_code_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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_1.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_1.py deleted file mode 100644 index 76942df..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_1.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.data_lake_tool_code import DataLakeToolCode - - -T = TypeVar("T", bound="ToolCodeType1") - - -@_attrs_define -class ToolCodeType1: - """ - Attributes: - data_lake (DataLakeToolCode): - """ - - data_lake: "DataLakeToolCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - data_lake = self.data_lake.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_lake": data_lake, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_lake_tool_code import DataLakeToolCode - - d = dict(src_dict) - data_lake = DataLakeToolCode.from_dict(d.pop("data_lake")) - - tool_code_type_1 = cls( - data_lake=data_lake, - ) - - tool_code_type_1.additional_properties = d - return tool_code_type_1 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_2.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_2.py deleted file mode 100644 index c501932..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_code_type_2.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.default_tool_code import DefaultToolCode - - -T = TypeVar("T", bound="ToolCodeType2") - - -@_attrs_define -class ToolCodeType2: - """ - Attributes: - default (DefaultToolCode): - """ - - default: "DefaultToolCode" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - default = self.default.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "default": default, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.default_tool_code import DefaultToolCode - - d = dict(src_dict) - default = DefaultToolCode.from_dict(d.pop("default")) - - tool_code_type_2 = cls( - default=default, - ) - - tool_code_type_2.additional_properties = d - return tool_code_type_2 - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_deployment_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_deployment_detail.py deleted file mode 100644 index 22b2c91..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_deployment_detail.py +++ /dev/null @@ -1,173 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.deployment_status import DeploymentStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - -T = TypeVar("T", bound="ToolDeploymentDetail") - - -@_attrs_define -class ToolDeploymentDetail: - """ - Attributes: - code_source (Union['CodeSourceType0', 'CodeSourceType1']): - created_at (datetime.datetime): - created_by (str): - deployment_id (str): - status (DeploymentStatus): - tool_id (str): - completed_at (Union[None, Unset, datetime.datetime]): - status_detail (Union[Unset, Any]): - """ - - code_source: Union["CodeSourceType0", "CodeSourceType1"] - created_at: datetime.datetime - created_by: str - deployment_id: str - status: DeploymentStatus - tool_id: str - completed_at: Union[None, Unset, datetime.datetime] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.code_source_type_0 import CodeSourceType0 - - code_source: dict[str, Any] - if isinstance(self.code_source, CodeSourceType0): - code_source = self.code_source.to_dict() - else: - code_source = self.code_source.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - deployment_id = self.deployment_id - - status = self.status.value - - tool_id = self.tool_id - - completed_at: Union[None, Unset, str] - if isinstance(self.completed_at, Unset): - completed_at = UNSET - elif isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code_source": code_source, - "created_at": created_at, - "created_by": created_by, - "deployment_id": deployment_id, - "status": status, - "tool_id": tool_id, - } - ) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.code_source_type_0 import CodeSourceType0 - from ..models.code_source_type_1 import CodeSourceType1 - - d = dict(src_dict) - - def _parse_code_source(data: object) -> Union["CodeSourceType0", "CodeSourceType1"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_0 = CodeSourceType0.from_dict(data) - - return componentsschemas_code_source_type_0 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_code_source_type_1 = CodeSourceType1.from_dict(data) - - return componentsschemas_code_source_type_1 - - code_source = _parse_code_source(d.pop("code_source")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - deployment_id = d.pop("deployment_id") - - status = DeploymentStatus(d.pop("status")) - - tool_id = d.pop("tool_id") - - def _parse_completed_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() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - - status_detail = d.pop("status_detail", UNSET) - - tool_deployment_detail = cls( - code_source=code_source, - created_at=created_at, - created_by=created_by, - deployment_id=deployment_id, - status=status, - tool_id=tool_id, - completed_at=completed_at, - status_detail=status_detail, - ) - - tool_deployment_detail.additional_properties = d - return tool_deployment_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_detail.py deleted file mode 100644 index 781d8e7..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_detail.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="ToolDetail") - - -@_attrs_define -class ToolDetail: - """ - Attributes: - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - tool_id (str): - updated_at (datetime.datetime): - tool_config_file (Union[Unset, str]): - """ - - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - tool_id: str - updated_at: datetime.datetime - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - code: dict[str, Any] - if isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - tool_id = self.tool_id - - updated_at = self.updated_at.isoformat() - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "tool_id": tool_id, - "updated_at": updated_at, - } - ) - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - tool_id = d.pop("tool_id") - - updated_at = isoparse(d.pop("updated_at")) - - tool_config_file = d.pop("tool_config_file", UNSET) - - tool_detail = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - tool_id=tool_id, - updated_at=updated_at, - tool_config_file=tool_config_file, - ) - - tool_detail.additional_properties = d - return tool_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_detail.py deleted file mode 100644 index a655b97..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_detail.py +++ /dev/null @@ -1,232 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.tool_run_status import ToolRunStatus -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - - -T = TypeVar("T", bound="ToolRunDetail") - - -@_attrs_define -class ToolRunDetail: - """ - Attributes: - completed_at (Union[None, datetime.datetime]): - created_at (datetime.datetime): - created_by (str): - input_ (Any): - runtime_path (str): - started_at (Union[None, datetime.datetime]): - status (ToolRunStatus): - tool_id (str): - tool_run_id (str): - updated_at (datetime.datetime): - deployment_id (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - output (Union[Unset, Any]): - output_timestamp (Union[Unset, float]): - status_detail (Union[Unset, Any]): - """ - - completed_at: Union[None, datetime.datetime] - created_at: datetime.datetime - created_by: str - input_: Any - runtime_path: str - started_at: Union[None, datetime.datetime] - status: ToolRunStatus - tool_id: str - tool_run_id: str - updated_at: datetime.datetime - deployment_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - output: Union[Unset, Any] = UNSET - output_timestamp: Union[Unset, float] = UNSET - status_detail: Union[Unset, Any] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - completed_at: Union[None, str] - if isinstance(self.completed_at, datetime.datetime): - completed_at = self.completed_at.isoformat() - else: - completed_at = self.completed_at - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - input_ = self.input_ - - runtime_path = self.runtime_path - - started_at: Union[None, str] - if isinstance(self.started_at, datetime.datetime): - started_at = self.started_at.isoformat() - else: - started_at = self.started_at - - status = self.status.value - - tool_id = self.tool_id - - tool_run_id = self.tool_run_id - - updated_at = self.updated_at.isoformat() - - deployment_id = self.deployment_id - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - output = self.output - - output_timestamp = self.output_timestamp - - status_detail = self.status_detail - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "completed_at": completed_at, - "created_at": created_at, - "created_by": created_by, - "input": input_, - "runtime_path": runtime_path, - "started_at": started_at, - "status": status, - "tool_id": tool_id, - "tool_run_id": tool_run_id, - "updated_at": updated_at, - } - ) - if deployment_id is not UNSET: - field_dict["deployment_id"] = deployment_id - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if output is not UNSET: - field_dict["output"] = output - if output_timestamp is not UNSET: - field_dict["output_timestamp"] = output_timestamp - if status_detail is not UNSET: - field_dict["status_detail"] = status_detail - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - - d = dict(src_dict) - - def _parse_completed_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - completed_at_type_0 = isoparse(data) - - return completed_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - completed_at = _parse_completed_at(d.pop("completed_at")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - input_ = d.pop("input") - - runtime_path = d.pop("runtime_path") - - def _parse_started_at(data: object) -> Union[None, datetime.datetime]: - if data is None: - return data - try: - if not isinstance(data, str): - raise TypeError() - started_at_type_0 = isoparse(data) - - return started_at_type_0 - except: # noqa: E722 - pass - return cast(Union[None, datetime.datetime], data) - - started_at = _parse_started_at(d.pop("started_at")) - - status = ToolRunStatus(d.pop("status")) - - tool_id = d.pop("tool_id") - - tool_run_id = d.pop("tool_run_id") - - updated_at = isoparse(d.pop("updated_at")) - - deployment_id = d.pop("deployment_id", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - output = d.pop("output", UNSET) - - output_timestamp = d.pop("output_timestamp", UNSET) - - status_detail = d.pop("status_detail", UNSET) - - tool_run_detail = cls( - completed_at=completed_at, - created_at=created_at, - created_by=created_by, - input_=input_, - runtime_path=runtime_path, - started_at=started_at, - status=status, - tool_id=tool_id, - tool_run_id=tool_run_id, - updated_at=updated_at, - deployment_id=deployment_id, - env_vars=env_vars, - output=output, - output_timestamp=output_timestamp, - status_detail=status_detail, - ) - - tool_run_detail.additional_properties = d - return tool_run_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_status.py b/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_status.py deleted file mode 100644 index 0c8ec9c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/tool_run_status.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class ToolRunStatus(str, Enum): - CANCELLED = "CANCELLED" - ERROR = "ERROR" - FAILED = "FAILED" - QUEUED = "QUEUED" - RUNNING = "RUNNING" - STARTING = "STARTING" - SUCCEEDED = "SUCCEEDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/griptape_cloud_client/generated/griptape_cloud_client/models/transform_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/transform_detail.py deleted file mode 100644 index b96ea52..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/transform_detail.py +++ /dev/null @@ -1,72 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.structure_connector_detail import StructureConnectorDetail - - -T = TypeVar("T", bound="TransformDetail") - - -@_attrs_define -class TransformDetail: - """ - Attributes: - structure (Union[Unset, StructureConnectorDetail]): - """ - - structure: Union[Unset, "StructureConnectorDetail"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.structure, Unset): - structure = self.structure.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if structure is not UNSET: - field_dict["structure"] = structure - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structure_connector_detail import StructureConnectorDetail - - d = dict(src_dict) - _structure = d.pop("structure", UNSET) - structure: Union[Unset, StructureConnectorDetail] - if isinstance(_structure, Unset): - structure = UNSET - else: - structure = StructureConnectorDetail.from_dict(_structure) - - transform_detail = cls( - structure=structure, - ) - - transform_detail.additional_properties = d - return transform_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/transform_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/transform_input.py deleted file mode 100644 index 474a6e9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/transform_input.py +++ /dev/null @@ -1,65 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.structure_connector_input import StructureConnectorInput - - -T = TypeVar("T", bound="TransformInput") - - -@_attrs_define -class TransformInput: - """ - Attributes: - structure (StructureConnectorInput): - """ - - structure: "StructureConnectorInput" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure = self.structure.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure": structure, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.structure_connector_input import StructureConnectorInput - - d = dict(src_dict) - structure = StructureConnectorInput.from_dict(d.pop("structure")) - - transform_input = cls( - structure=structure, - ) - - transform_input.additional_properties = d - return transform_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_detail.py deleted file mode 100644 index c3a904f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_detail.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UnstructuredColumnDetail") - - -@_attrs_define -class UnstructuredColumnDetail: - """ - Attributes: - column_name (str): - """ - - column_name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - column_name = self.column_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "column_name": column_name, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - column_name = d.pop("column_name") - - unstructured_column_detail = cls( - column_name=column_name, - ) - - unstructured_column_detail.additional_properties = d - return unstructured_column_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_input.py deleted file mode 100644 index 939b697..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/unstructured_column_input.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UnstructuredColumnInput") - - -@_attrs_define -class UnstructuredColumnInput: - """ - Attributes: - column_name (str): - description (str): - """ - - column_name: str - description: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - column_name = self.column_name - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "column_name": column_name, - "description": description, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - column_name = d.pop("column_name") - - description = d.pop("description") - - unstructured_column_input = cls( - column_name=column_name, - description=description, - ) - - unstructured_column_input.additional_properties = d - return unstructured_column_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_request_content.py deleted file mode 100644 index 3bf4f38..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="UpdateApiKeyRequestContent") - - -@_attrs_define -class UpdateApiKeyRequestContent: - """ - Attributes: - name (Union[Unset, str]): - """ - - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - update_api_key_request_content = cls( - name=name, - ) - - update_api_key_request_content.additional_properties = d - return update_api_key_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_response_content.py deleted file mode 100644 index 9dc28aa..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_api_key_response_content.py +++ /dev/null @@ -1,117 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="UpdateApiKeyResponseContent") - - -@_attrs_define -class UpdateApiKeyResponseContent: - """ - Attributes: - active (bool): - api_key_id (str): - created_at (datetime.datetime): - created_by (str): - last_used (datetime.datetime): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - active: bool - api_key_id: str - created_at: datetime.datetime - created_by: str - last_used: datetime.datetime - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - active = self.active - - api_key_id = self.api_key_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "active": active, - "api_key_id": api_key_id, - "created_at": created_at, - "created_by": created_by, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - active = d.pop("active") - - api_key_id = d.pop("api_key_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_api_key_response_content = cls( - active=active, - api_key_id=api_key_id, - created_at=created_at, - created_by=created_by, - last_used=last_used, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - update_api_key_response_content.additional_properties = d - return update_api_key_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_request_content.py deleted file mode 100644 index 2d34af3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_request_content.py +++ /dev/null @@ -1,121 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="UpdateAssistantRequestContent") - - -@_attrs_define -class UpdateAssistantRequestContent: - """ - Attributes: - description (Union[Unset, str]): - input_ (Union[Unset, str]): - knowledge_base_ids (Union[Unset, list[str]]): - name (Union[Unset, str]): - ruleset_ids (Union[Unset, list[str]]): - structure_ids (Union[Unset, list[str]]): - tool_ids (Union[Unset, list[str]]): - """ - - description: Union[Unset, str] = UNSET - input_: Union[Unset, str] = UNSET - knowledge_base_ids: Union[Unset, list[str]] = UNSET - name: Union[Unset, str] = UNSET - ruleset_ids: Union[Unset, list[str]] = UNSET - structure_ids: Union[Unset, list[str]] = UNSET - tool_ids: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - input_ = self.input_ - - knowledge_base_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.knowledge_base_ids, Unset): - knowledge_base_ids = self.knowledge_base_ids - - name = self.name - - ruleset_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.ruleset_ids, Unset): - ruleset_ids = self.ruleset_ids - - structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.structure_ids, Unset): - structure_ids = self.structure_ids - - tool_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.tool_ids, Unset): - tool_ids = self.tool_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if description is not UNSET: - field_dict["description"] = description - if input_ is not UNSET: - field_dict["input"] = input_ - if knowledge_base_ids is not UNSET: - field_dict["knowledge_base_ids"] = knowledge_base_ids - if name is not UNSET: - field_dict["name"] = name - if ruleset_ids is not UNSET: - field_dict["ruleset_ids"] = ruleset_ids - if structure_ids is not UNSET: - field_dict["structure_ids"] = structure_ids - if tool_ids is not UNSET: - field_dict["tool_ids"] = tool_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description", UNSET) - - input_ = d.pop("input", UNSET) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids", UNSET)) - - name = d.pop("name", UNSET) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids", UNSET)) - - structure_ids = cast(list[str], d.pop("structure_ids", UNSET)) - - tool_ids = cast(list[str], d.pop("tool_ids", UNSET)) - - update_assistant_request_content = cls( - description=description, - input_=input_, - knowledge_base_ids=knowledge_base_ids, - name=name, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - ) - - update_assistant_request_content.additional_properties = d - return update_assistant_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_response_content.py deleted file mode 100644 index d1af5e2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_assistant_response_content.py +++ /dev/null @@ -1,160 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="UpdateAssistantResponseContent") - - -@_attrs_define -class UpdateAssistantResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - description (str): - knowledge_base_ids (list[str]): - name (str): - organization_id (str): - retriever_ids (list[str]): - ruleset_ids (list[str]): - structure_ids (list[str]): - tool_ids (list[str]): - updated_at (datetime.datetime): - input_ (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - description: str - knowledge_base_ids: list[str] - name: str - organization_id: str - retriever_ids: list[str] - ruleset_ids: list[str] - structure_ids: list[str] - tool_ids: list[str] - updated_at: datetime.datetime - input_: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - knowledge_base_ids = self.knowledge_base_ids - - name = self.name - - organization_id = self.organization_id - - retriever_ids = self.retriever_ids - - ruleset_ids = self.ruleset_ids - - structure_ids = self.structure_ids - - tool_ids = self.tool_ids - - updated_at = self.updated_at.isoformat() - - input_ = self.input_ - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "description": description, - "knowledge_base_ids": knowledge_base_ids, - "name": name, - "organization_id": organization_id, - "retriever_ids": retriever_ids, - "ruleset_ids": ruleset_ids, - "structure_ids": structure_ids, - "tool_ids": tool_ids, - "updated_at": updated_at, - } - ) - if input_ is not UNSET: - field_dict["input"] = input_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_ids = cast(list[str], d.pop("retriever_ids")) - - ruleset_ids = cast(list[str], d.pop("ruleset_ids")) - - structure_ids = cast(list[str], d.pop("structure_ids")) - - tool_ids = cast(list[str], d.pop("tool_ids")) - - updated_at = isoparse(d.pop("updated_at")) - - input_ = d.pop("input", UNSET) - - update_assistant_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - description=description, - knowledge_base_ids=knowledge_base_ids, - name=name, - organization_id=organization_id, - retriever_ids=retriever_ids, - ruleset_ids=ruleset_ids, - structure_ids=structure_ids, - tool_ids=tool_ids, - updated_at=updated_at, - input_=input_, - ) - - update_assistant_response_content.additional_properties = d - return update_assistant_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_request_content.py deleted file mode 100644 index 6feeebc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_request_content.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="UpdateBucketRequestContent") - - -@_attrs_define -class UpdateBucketRequestContent: - """ - Attributes: - name (Union[Unset, str]): - """ - - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - update_bucket_request_content = cls( - name=name, - ) - - update_bucket_request_content.additional_properties = d - return update_bucket_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_response_content.py deleted file mode 100644 index f3e74b6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_bucket_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="UpdateBucketResponseContent") - - -@_attrs_define -class UpdateBucketResponseContent: - """ - Attributes: - bucket_id (str): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - """ - - bucket_id: str - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - bucket_id = self.bucket_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "bucket_id": bucket_id, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - bucket_id = d.pop("bucket_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_bucket_response_content = cls( - bucket_id=bucket_id, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - updated_at=updated_at, - ) - - update_bucket_response_content.additional_properties = d - return update_bucket_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_request_content.py deleted file mode 100644 index 43aa5b9..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_request_content.py +++ /dev/null @@ -1,204 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - from ..models.data_connector_config_input_union_type_5 import DataConnectorConfigInputUnionType5 - - -T = TypeVar("T", bound="UpdateDataConnectorRequestContent") - - -@_attrs_define -class UpdateDataConnectorRequestContent: - """ - Attributes: - config (Union['DataConnectorConfigInputUnionType0', 'DataConnectorConfigInputUnionType1', - 'DataConnectorConfigInputUnionType2', 'DataConnectorConfigInputUnionType3', - 'DataConnectorConfigInputUnionType4', 'DataConnectorConfigInputUnionType5', Unset]): - description (Union[Unset, str]): - name (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - """ - - config: Union[ - "DataConnectorConfigInputUnionType0", - "DataConnectorConfigInputUnionType1", - "DataConnectorConfigInputUnionType2", - "DataConnectorConfigInputUnionType3", - "DataConnectorConfigInputUnionType4", - "DataConnectorConfigInputUnionType5", - Unset, - ] = UNSET - description: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - - config: Union[Unset, dict[str, Any]] - if isinstance(self.config, Unset): - config = UNSET - elif isinstance(self.config, DataConnectorConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigInputUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - description = self.description - - name = self.name - - schedule_expression = self.schedule_expression - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if config is not UNSET: - field_dict["config"] = config - if description is not UNSET: - field_dict["description"] = description - if name is not UNSET: - field_dict["name"] = name - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_input_union_type_0 import DataConnectorConfigInputUnionType0 - from ..models.data_connector_config_input_union_type_1 import DataConnectorConfigInputUnionType1 - from ..models.data_connector_config_input_union_type_2 import DataConnectorConfigInputUnionType2 - from ..models.data_connector_config_input_union_type_3 import DataConnectorConfigInputUnionType3 - from ..models.data_connector_config_input_union_type_4 import DataConnectorConfigInputUnionType4 - from ..models.data_connector_config_input_union_type_5 import DataConnectorConfigInputUnionType5 - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigInputUnionType0", - "DataConnectorConfigInputUnionType1", - "DataConnectorConfigInputUnionType2", - "DataConnectorConfigInputUnionType3", - "DataConnectorConfigInputUnionType4", - "DataConnectorConfigInputUnionType5", - Unset, - ]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_0 = ( - DataConnectorConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_1 = ( - DataConnectorConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_2 = ( - DataConnectorConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_3 = ( - DataConnectorConfigInputUnionType3.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_4 = ( - DataConnectorConfigInputUnionType4.from_dict(data) - ) - - return componentsschemas_data_connector_config_input_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_input_union_type_5 = DataConnectorConfigInputUnionType5.from_dict( - data - ) - - return componentsschemas_data_connector_config_input_union_type_5 - - config = _parse_config(d.pop("config", UNSET)) - - description = d.pop("description", UNSET) - - name = d.pop("name", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - update_data_connector_request_content = cls( - config=config, - description=description, - name=name, - schedule_expression=schedule_expression, - ) - - update_data_connector_request_content.additional_properties = d - return update_data_connector_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_response_content.py deleted file mode 100644 index fc7b191..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_data_connector_response_content.py +++ /dev/null @@ -1,266 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="UpdateDataConnectorResponseContent") - - -@_attrs_define -class UpdateDataConnectorResponseContent: - """ - Attributes: - config (Union['DataConnectorConfigUnionType0', 'DataConnectorConfigUnionType1', 'DataConnectorConfigUnionType2', - 'DataConnectorConfigUnionType3', 'DataConnectorConfigUnionType4', 'DataConnectorConfigUnionType5']): - created_at (datetime.datetime): - created_by (str): - data_connector_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - data_job_id (Union[Unset, str]): - description (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - """ - - config: Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ] - created_at: datetime.datetime - created_by: str - data_connector_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - data_job_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - - config: dict[str, Any] - if isinstance(self.config, DataConnectorConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType2): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType3): - config = self.config.to_dict() - elif isinstance(self.config, DataConnectorConfigUnionType4): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_id = self.data_connector_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - data_job_id = self.data_job_id - - description = self.description - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "data_connector_id": data_connector_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if data_job_id is not UNSET: - field_dict["data_job_id"] = data_job_id - if description is not UNSET: - field_dict["description"] = description - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_connector_config_union_type_0 import DataConnectorConfigUnionType0 - from ..models.data_connector_config_union_type_1 import DataConnectorConfigUnionType1 - from ..models.data_connector_config_union_type_2 import DataConnectorConfigUnionType2 - from ..models.data_connector_config_union_type_3 import DataConnectorConfigUnionType3 - from ..models.data_connector_config_union_type_4 import DataConnectorConfigUnionType4 - from ..models.data_connector_config_union_type_5 import DataConnectorConfigUnionType5 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "DataConnectorConfigUnionType0", - "DataConnectorConfigUnionType1", - "DataConnectorConfigUnionType2", - "DataConnectorConfigUnionType3", - "DataConnectorConfigUnionType4", - "DataConnectorConfigUnionType5", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_0 = DataConnectorConfigUnionType0.from_dict(data) - - return componentsschemas_data_connector_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_1 = DataConnectorConfigUnionType1.from_dict(data) - - return componentsschemas_data_connector_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_2 = DataConnectorConfigUnionType2.from_dict(data) - - return componentsschemas_data_connector_config_union_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_3 = DataConnectorConfigUnionType3.from_dict(data) - - return componentsschemas_data_connector_config_union_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_4 = DataConnectorConfigUnionType4.from_dict(data) - - return componentsschemas_data_connector_config_union_type_4 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_data_connector_config_union_type_5 = DataConnectorConfigUnionType5.from_dict(data) - - return componentsschemas_data_connector_config_union_type_5 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_id = d.pop("data_connector_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - data_job_id = d.pop("data_job_id", UNSET) - - description = d.pop("description", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - update_data_connector_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - data_connector_id=data_connector_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - data_job_id=data_job_id, - description=description, - schedule_expression=schedule_expression, - transforms=transforms, - ) - - update_data_connector_response_content.additional_properties = d - return update_data_connector_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_request_content.py deleted file mode 100644 index 626394b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_request_content.py +++ /dev/null @@ -1,154 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="UpdateFunctionRequestContent") - - -@_attrs_define -class UpdateFunctionRequestContent: - """ - Attributes: - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - function_config_file (Union[Unset, str]): - name (Union[Unset, str]): - """ - - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - function_config_file: 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]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_config_file = self.function_config_file - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_config_file = d.pop("function_config_file", UNSET) - - name = d.pop("name", UNSET) - - update_function_request_content = cls( - code=code, - description=description, - env_vars=env_vars, - function_config_file=function_config_file, - name=name, - ) - - update_function_request_content.additional_properties = d - return update_function_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_response_content.py deleted file mode 100644 index e058b00..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_function_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - -T = TypeVar("T", bound="UpdateFunctionResponseContent") - - -@_attrs_define -class UpdateFunctionResponseContent: - """ - Attributes: - code (Union['FunctionCodeType0', 'FunctionCodeType1', 'FunctionCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - function_id (str): - latest_deployment_id (str): - name (str): - organization_id (str): - updated_at (datetime.datetime): - function_config_file (Union[Unset, str]): - """ - - code: Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - function_id: str - latest_deployment_id: str - name: str - organization_id: str - updated_at: datetime.datetime - function_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - - code: dict[str, Any] - if isinstance(self.code, FunctionCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, FunctionCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - function_id = self.function_id - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - updated_at = self.updated_at.isoformat() - - function_config_file = self.function_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "function_id": function_id, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "updated_at": updated_at, - } - ) - if function_config_file is not UNSET: - field_dict["function_config_file"] = function_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.function_code_type_0 import FunctionCodeType0 - from ..models.function_code_type_1 import FunctionCodeType1 - from ..models.function_code_type_2 import FunctionCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["FunctionCodeType0", "FunctionCodeType1", "FunctionCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_0 = FunctionCodeType0.from_dict(data) - - return componentsschemas_function_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_1 = FunctionCodeType1.from_dict(data) - - return componentsschemas_function_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_function_code_type_2 = FunctionCodeType2.from_dict(data) - - return componentsschemas_function_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - function_id = d.pop("function_id") - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - updated_at = isoparse(d.pop("updated_at")) - - function_config_file = d.pop("function_config_file", UNSET) - - update_function_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - function_id=function_id, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - updated_at=updated_at, - function_config_file=function_config_file, - ) - - update_function_response_content.additional_properties = d - return update_function_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_request_content.py deleted file mode 100644 index 26d3dd6..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_request_content.py +++ /dev/null @@ -1,179 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.integration_type import IntegrationType -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - from ..models.integration_config_input_union_type_2 import IntegrationConfigInputUnionType2 - - -T = TypeVar("T", bound="UpdateIntegrationRequestContent") - - -@_attrs_define -class UpdateIntegrationRequestContent: - """ - Attributes: - assistant_ids (Union[Unset, list[str]]): - config (Union['IntegrationConfigInputUnionType0', 'IntegrationConfigInputUnionType1', - 'IntegrationConfigInputUnionType2', Unset]): - description (Union[Unset, str]): - name (Union[Unset, str]): - structure_ids (Union[Unset, list[str]]): - type_ (Union[Unset, IntegrationType]): - """ - - assistant_ids: Union[Unset, list[str]] = UNSET - config: Union[ - "IntegrationConfigInputUnionType0", - "IntegrationConfigInputUnionType1", - "IntegrationConfigInputUnionType2", - Unset, - ] = UNSET - description: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - structure_ids: Union[Unset, list[str]] = UNSET - type_: Union[Unset, IntegrationType] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - - assistant_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.assistant_ids, Unset): - assistant_ids = self.assistant_ids - - config: Union[Unset, dict[str, Any]] - if isinstance(self.config, Unset): - config = UNSET - elif isinstance(self.config, IntegrationConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigInputUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - description = self.description - - name = self.name - - structure_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.structure_ids, Unset): - structure_ids = self.structure_ids - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if assistant_ids is not UNSET: - field_dict["assistant_ids"] = assistant_ids - if config is not UNSET: - field_dict["config"] = config - if description is not UNSET: - field_dict["description"] = description - if name is not UNSET: - field_dict["name"] = name - if structure_ids is not UNSET: - field_dict["structure_ids"] = structure_ids - if type_ is not UNSET: - field_dict["type"] = type_ - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_input_union_type_0 import IntegrationConfigInputUnionType0 - from ..models.integration_config_input_union_type_1 import IntegrationConfigInputUnionType1 - from ..models.integration_config_input_union_type_2 import IntegrationConfigInputUnionType2 - - d = dict(src_dict) - assistant_ids = cast(list[str], d.pop("assistant_ids", UNSET)) - - def _parse_config( - data: object, - ) -> Union[ - "IntegrationConfigInputUnionType0", - "IntegrationConfigInputUnionType1", - "IntegrationConfigInputUnionType2", - Unset, - ]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_0 = IntegrationConfigInputUnionType0.from_dict( - data - ) - - return componentsschemas_integration_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_1 = IntegrationConfigInputUnionType1.from_dict( - data - ) - - return componentsschemas_integration_config_input_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_input_union_type_2 = IntegrationConfigInputUnionType2.from_dict(data) - - return componentsschemas_integration_config_input_union_type_2 - - config = _parse_config(d.pop("config", UNSET)) - - description = d.pop("description", UNSET) - - name = d.pop("name", UNSET) - - structure_ids = cast(list[str], d.pop("structure_ids", UNSET)) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, IntegrationType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = IntegrationType(_type_) - - update_integration_request_content = cls( - assistant_ids=assistant_ids, - config=config, - description=description, - name=name, - structure_ids=structure_ids, - type_=type_, - ) - - update_integration_request_content.additional_properties = d - return update_integration_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_response_content.py deleted file mode 100644 index 1c7f96c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_integration_response_content.py +++ /dev/null @@ -1,187 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.integration_type import IntegrationType - -if TYPE_CHECKING: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - -T = TypeVar("T", bound="UpdateIntegrationResponseContent") - - -@_attrs_define -class UpdateIntegrationResponseContent: - """ - Attributes: - assistant_ids (list[str]): - config (Union['IntegrationConfigUnionType0', 'IntegrationConfigUnionType1', 'IntegrationConfigUnionType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - integration_id (str): - name (str): - organization_id (str): - structure_ids (list[str]): - type_ (IntegrationType): - updated_at (datetime.datetime): - """ - - assistant_ids: list[str] - config: Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"] - created_at: datetime.datetime - created_by: str - description: str - integration_id: str - name: str - organization_id: str - structure_ids: list[str] - type_: IntegrationType - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - - assistant_ids = self.assistant_ids - - config: dict[str, Any] - if isinstance(self.config, IntegrationConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, IntegrationConfigUnionType1): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - integration_id = self.integration_id - - name = self.name - - organization_id = self.organization_id - - structure_ids = self.structure_ids - - type_ = self.type_.value - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_ids": assistant_ids, - "config": config, - "created_at": created_at, - "created_by": created_by, - "description": description, - "integration_id": integration_id, - "name": name, - "organization_id": organization_id, - "structure_ids": structure_ids, - "type": type_, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.integration_config_union_type_0 import IntegrationConfigUnionType0 - from ..models.integration_config_union_type_1 import IntegrationConfigUnionType1 - from ..models.integration_config_union_type_2 import IntegrationConfigUnionType2 - - d = dict(src_dict) - assistant_ids = cast(list[str], d.pop("assistant_ids")) - - def _parse_config( - data: object, - ) -> Union["IntegrationConfigUnionType0", "IntegrationConfigUnionType1", "IntegrationConfigUnionType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_0 = IntegrationConfigUnionType0.from_dict(data) - - return componentsschemas_integration_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_1 = IntegrationConfigUnionType1.from_dict(data) - - return componentsschemas_integration_config_union_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_integration_config_union_type_2 = IntegrationConfigUnionType2.from_dict(data) - - return componentsschemas_integration_config_union_type_2 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - integration_id = d.pop("integration_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_ids = cast(list[str], d.pop("structure_ids")) - - type_ = IntegrationType(d.pop("type")) - - updated_at = isoparse(d.pop("updated_at")) - - update_integration_response_content = cls( - assistant_ids=assistant_ids, - config=config, - created_at=created_at, - created_by=created_by, - description=description, - integration_id=integration_id, - name=name, - organization_id=organization_id, - structure_ids=structure_ids, - type_=type_, - updated_at=updated_at, - ) - - update_integration_response_content.additional_properties = d - return update_integration_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_request_content.py deleted file mode 100644 index ce10f6d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_request_content.py +++ /dev/null @@ -1,231 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="UpdateKnowledgeBaseRequestContent") - - -@_attrs_define -class UpdateKnowledgeBaseRequestContent: - """ - Attributes: - config (Union['KnowledgeBaseConfigInputUnionType0', 'KnowledgeBaseConfigInputUnionType1', - 'KnowledgeBaseConfigInputUnionType2', 'KnowledgeBaseConfigInputUnionType3']): - type_ (str): - asset_paths (Union[Unset, list[str]]): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - name (Union[Unset, str]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - config: Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ] - type_: str - asset_paths: Union[Unset, list[str]] = UNSET - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - name: Union[Unset, str] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigInputUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigInputUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigInputUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - type_ = self.type_ - - asset_paths: Union[Unset, list[str]] = UNSET - if not isinstance(self.asset_paths, Unset): - asset_paths = self.asset_paths - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - name = self.name - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "type": type_, - } - ) - if asset_paths is not UNSET: - field_dict["asset_paths"] = asset_paths - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if name is not UNSET: - field_dict["name"] = name - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_0 = ( - KnowledgeBaseConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_1 = ( - KnowledgeBaseConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_2 = ( - KnowledgeBaseConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_3 = KnowledgeBaseConfigInputUnionType3.from_dict( - data - ) - - return componentsschemas_knowledge_base_config_input_union_type_3 - - config = _parse_config(d.pop("config")) - - type_ = d.pop("type") - - asset_paths = cast(list[str], d.pop("asset_paths", UNSET)) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - name = d.pop("name", UNSET) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - update_knowledge_base_request_content = cls( - config=config, - type_=type_, - asset_paths=asset_paths, - description=description, - embedding_model=embedding_model, - name=name, - schedule_expression=schedule_expression, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - update_knowledge_base_request_content.additional_properties = d - return update_knowledge_base_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_response_content.py deleted file mode 100644 index 1e94395..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_knowledge_base_response_content.py +++ /dev/null @@ -1,260 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -from ..models.embedding_model import EmbeddingModel -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - -T = TypeVar("T", bound="UpdateKnowledgeBaseResponseContent") - - -@_attrs_define -class UpdateKnowledgeBaseResponseContent: - """ - Attributes: - asset_paths (list[str]): - config (Union['KnowledgeBaseConfigUnionType0', 'KnowledgeBaseConfigUnionType1', 'KnowledgeBaseConfigUnionType2', - 'KnowledgeBaseConfigUnionType3']): - created_at (datetime.datetime): - created_by (str): - knowledge_base_id (str): - name (str): - organization_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - embedding_model (Union[Unset, EmbeddingModel]): - schedule_expression (Union[Unset, str]): - transforms (Union[Unset, list['TransformDetail']]): - use_default_embedding_model (Union[Unset, bool]): - """ - - asset_paths: list[str] - config: Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ] - created_at: datetime.datetime - created_by: str - knowledge_base_id: str - name: str - organization_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - embedding_model: Union[Unset, EmbeddingModel] = UNSET - schedule_expression: Union[Unset, str] = UNSET - transforms: Union[Unset, list["TransformDetail"]] = UNSET - use_default_embedding_model: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - - asset_paths = self.asset_paths - - config: dict[str, Any] - if isinstance(self.config, KnowledgeBaseConfigUnionType0): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType1): - config = self.config.to_dict() - elif isinstance(self.config, KnowledgeBaseConfigUnionType2): - config = self.config.to_dict() - else: - config = self.config.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - knowledge_base_id = self.knowledge_base_id - - name = self.name - - organization_id = self.organization_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - embedding_model: Union[Unset, str] = UNSET - if not isinstance(self.embedding_model, Unset): - embedding_model = self.embedding_model.value - - schedule_expression = self.schedule_expression - - transforms: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.transforms, Unset): - transforms = [] - for transforms_item_data in self.transforms: - transforms_item = transforms_item_data.to_dict() - transforms.append(transforms_item) - - use_default_embedding_model = self.use_default_embedding_model - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "asset_paths": asset_paths, - "config": config, - "created_at": created_at, - "created_by": created_by, - "knowledge_base_id": knowledge_base_id, - "name": name, - "organization_id": organization_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - if embedding_model is not UNSET: - field_dict["embedding_model"] = embedding_model - if schedule_expression is not UNSET: - field_dict["schedule_expression"] = schedule_expression - if transforms is not UNSET: - field_dict["transforms"] = transforms - if use_default_embedding_model is not UNSET: - field_dict["use_default_embedding_model"] = use_default_embedding_model - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_union_type_0 import KnowledgeBaseConfigUnionType0 - from ..models.knowledge_base_config_union_type_1 import KnowledgeBaseConfigUnionType1 - from ..models.knowledge_base_config_union_type_2 import KnowledgeBaseConfigUnionType2 - from ..models.knowledge_base_config_union_type_3 import KnowledgeBaseConfigUnionType3 - from ..models.transform_detail import TransformDetail - - d = dict(src_dict) - asset_paths = cast(list[str], d.pop("asset_paths")) - - def _parse_config( - data: object, - ) -> Union[ - "KnowledgeBaseConfigUnionType0", - "KnowledgeBaseConfigUnionType1", - "KnowledgeBaseConfigUnionType2", - "KnowledgeBaseConfigUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_0 = KnowledgeBaseConfigUnionType0.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_1 = KnowledgeBaseConfigUnionType1.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_2 = KnowledgeBaseConfigUnionType2.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_union_type_3 = KnowledgeBaseConfigUnionType3.from_dict(data) - - return componentsschemas_knowledge_base_config_union_type_3 - - config = _parse_config(d.pop("config")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - knowledge_base_id = d.pop("knowledge_base_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - _embedding_model = d.pop("embedding_model", UNSET) - embedding_model: Union[Unset, EmbeddingModel] - if isinstance(_embedding_model, Unset): - embedding_model = UNSET - else: - embedding_model = EmbeddingModel(_embedding_model) - - schedule_expression = d.pop("schedule_expression", UNSET) - - transforms = [] - _transforms = d.pop("transforms", UNSET) - for transforms_item_data in _transforms or []: - transforms_item = TransformDetail.from_dict(transforms_item_data) - - transforms.append(transforms_item) - - use_default_embedding_model = d.pop("use_default_embedding_model", UNSET) - - update_knowledge_base_response_content = cls( - asset_paths=asset_paths, - config=config, - created_at=created_at, - created_by=created_by, - knowledge_base_id=knowledge_base_id, - name=name, - organization_id=organization_id, - type_=type_, - updated_at=updated_at, - description=description, - embedding_model=embedding_model, - schedule_expression=schedule_expression, - transforms=transforms, - use_default_embedding_model=use_default_embedding_model, - ) - - update_knowledge_base_response_content.additional_properties = d - return update_knowledge_base_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_request_content.py deleted file mode 100644 index 002f572..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_request_content.py +++ /dev/null @@ -1,174 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - - -T = TypeVar("T", bound="UpdateLibraryRequestContent") - - -@_attrs_define -class UpdateLibraryRequestContent: - """ - Attributes: - data_connector_ids (list[str]): - knowledge_base_configs (list[Union['KnowledgeBaseConfigInputUnionType0', 'KnowledgeBaseConfigInputUnionType1', - 'KnowledgeBaseConfigInputUnionType2', 'KnowledgeBaseConfigInputUnionType3']]): - name (str): - description (Union[Unset, str]): - """ - - data_connector_ids: list[str] - knowledge_base_configs: list[ - Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ] - ] - name: str - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - - data_connector_ids = self.data_connector_ids - - knowledge_base_configs = [] - for knowledge_base_configs_item_data in self.knowledge_base_configs: - knowledge_base_configs_item: dict[str, Any] - if isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType0): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - elif isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType1): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - elif isinstance(knowledge_base_configs_item_data, KnowledgeBaseConfigInputUnionType2): - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - else: - knowledge_base_configs_item = knowledge_base_configs_item_data.to_dict() - - knowledge_base_configs.append(knowledge_base_configs_item) - - name = self.name - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data_connector_ids": data_connector_ids, - "knowledge_base_configs": knowledge_base_configs, - "name": name, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.knowledge_base_config_input_union_type_0 import KnowledgeBaseConfigInputUnionType0 - from ..models.knowledge_base_config_input_union_type_1 import KnowledgeBaseConfigInputUnionType1 - from ..models.knowledge_base_config_input_union_type_2 import KnowledgeBaseConfigInputUnionType2 - from ..models.knowledge_base_config_input_union_type_3 import KnowledgeBaseConfigInputUnionType3 - - d = dict(src_dict) - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_configs = [] - _knowledge_base_configs = d.pop("knowledge_base_configs") - for knowledge_base_configs_item_data in _knowledge_base_configs: - - def _parse_knowledge_base_configs_item( - data: object, - ) -> Union[ - "KnowledgeBaseConfigInputUnionType0", - "KnowledgeBaseConfigInputUnionType1", - "KnowledgeBaseConfigInputUnionType2", - "KnowledgeBaseConfigInputUnionType3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_0 = ( - KnowledgeBaseConfigInputUnionType0.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_1 = ( - KnowledgeBaseConfigInputUnionType1.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_2 = ( - KnowledgeBaseConfigInputUnionType2.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_knowledge_base_config_input_union_type_3 = ( - KnowledgeBaseConfigInputUnionType3.from_dict(data) - ) - - return componentsschemas_knowledge_base_config_input_union_type_3 - - knowledge_base_configs_item = _parse_knowledge_base_configs_item(knowledge_base_configs_item_data) - - knowledge_base_configs.append(knowledge_base_configs_item) - - name = d.pop("name") - - description = d.pop("description", UNSET) - - update_library_request_content = cls( - data_connector_ids=data_connector_ids, - knowledge_base_configs=knowledge_base_configs, - name=name, - description=description, - ) - - update_library_request_content.additional_properties = d - return update_library_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_response_content.py deleted file mode 100644 index 354d40a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_library_response_content.py +++ /dev/null @@ -1,144 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="UpdateLibraryResponseContent") - - -@_attrs_define -class UpdateLibraryResponseContent: - """ - Attributes: - assistant_id (str): - created_at (datetime.datetime): - created_by (str): - data_connector_ids (list[str]): - knowledge_base_ids (list[str]): - library_id (str): - name (str): - organization_id (str): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - assistant_id: str - created_at: datetime.datetime - created_by: str - data_connector_ids: list[str] - knowledge_base_ids: list[str] - library_id: str - name: str - organization_id: str - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assistant_id = self.assistant_id - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - data_connector_ids = self.data_connector_ids - - knowledge_base_ids = self.knowledge_base_ids - - library_id = self.library_id - - name = self.name - - organization_id = self.organization_id - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assistant_id": assistant_id, - "created_at": created_at, - "created_by": created_by, - "data_connector_ids": data_connector_ids, - "knowledge_base_ids": knowledge_base_ids, - "library_id": library_id, - "name": name, - "organization_id": organization_id, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assistant_id = d.pop("assistant_id") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - data_connector_ids = cast(list[str], d.pop("data_connector_ids")) - - knowledge_base_ids = cast(list[str], d.pop("knowledge_base_ids")) - - library_id = d.pop("library_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - update_library_response_content = cls( - assistant_id=assistant_id, - created_at=created_at, - created_by=created_by, - data_connector_ids=data_connector_ids, - knowledge_base_ids=knowledge_base_ids, - library_id=library_id, - name=name, - organization_id=organization_id, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - update_library_response_content.additional_properties = d - return update_library_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_request_content.py deleted file mode 100644 index d26aee2..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_request_content.py +++ /dev/null @@ -1,90 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="UpdateMessageRequestContent") - - -@_attrs_define -class UpdateMessageRequestContent: - """ - Attributes: - input_ (Union[Unset, str]): - metadata (Union[Unset, Metadata]): - output (Union[Unset, str]): - """ - - input_: Union[Unset, str] = UNSET - metadata: Union[Unset, "Metadata"] = UNSET - output: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - input_ = self.input_ - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - output = self.output - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if input_ is not UNSET: - field_dict["input"] = input_ - if metadata is not UNSET: - field_dict["metadata"] = metadata - if output is not UNSET: - field_dict["output"] = output - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - input_ = d.pop("input", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - output = d.pop("output", UNSET) - - update_message_request_content = cls( - input_=input_, - metadata=metadata, - output=output, - ) - - update_message_request_content.additional_properties = d - return update_message_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_response_content.py deleted file mode 100644 index 07a2b48..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_message_response_content.py +++ /dev/null @@ -1,131 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="UpdateMessageResponseContent") - - -@_attrs_define -class UpdateMessageResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - index (float): - input_ (str): - message_id (str): - metadata (Metadata): - output (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - index: float - input_: str - message_id: str - metadata: "Metadata" - output: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - index = self.index - - input_ = self.input_ - - message_id = self.message_id - - metadata = self.metadata.to_dict() - - output = self.output - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "index": index, - "input": input_, - "message_id": message_id, - "metadata": metadata, - "output": output, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - index = d.pop("index") - - input_ = d.pop("input") - - message_id = d.pop("message_id") - - metadata = Metadata.from_dict(d.pop("metadata")) - - output = d.pop("output") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_message_response_content = cls( - created_at=created_at, - created_by=created_by, - index=index, - input_=input_, - message_id=message_id, - metadata=metadata, - output=output, - thread_id=thread_id, - updated_at=updated_at, - ) - - update_message_response_content.additional_properties = d - return update_message_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_organization_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_organization_request_content.py deleted file mode 100644 index 0964397..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_organization_request_content.py +++ /dev/null @@ -1,81 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.organization_model_config import OrganizationModelConfig - - -T = TypeVar("T", bound="UpdateOrganizationRequestContent") - - -@_attrs_define -class UpdateOrganizationRequestContent: - """ - Attributes: - model_config (Union[Unset, OrganizationModelConfig]): - name (Union[Unset, str]): - """ - - model_config: Union[Unset, "OrganizationModelConfig"] = UNSET - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - model_config: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.model_config, Unset): - model_config = self.model_config.to_dict() - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if model_config is not UNSET: - field_dict["model_config"] = model_config - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.organization_model_config import OrganizationModelConfig - - d = dict(src_dict) - _model_config = d.pop("model_config", UNSET) - model_config: Union[Unset, OrganizationModelConfig] - if isinstance(_model_config, Unset): - model_config = UNSET - else: - model_config = OrganizationModelConfig.from_dict(_model_config) - - name = d.pop("name", UNSET) - - update_organization_request_content = cls( - model_config=model_config, - name=name, - ) - - update_organization_request_content.additional_properties = d - return update_organization_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_request_content.py deleted file mode 100644 index d0d718d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_request_content.py +++ /dev/null @@ -1,87 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="UpdateRetrieverComponentRequestContent") - - -@_attrs_define -class UpdateRetrieverComponentRequestContent: - """ - Attributes: - config (Any): - type_ (str): - description (Union[Unset, str]): - name (Union[Unset, str]): - """ - - config: Any - type_: str - description: 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]: - config = self.config - - type_ = self.type_ - - description = self.description - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "type": type_, - } - ) - if description is not UNSET: - field_dict["description"] = description - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - type_ = d.pop("type") - - description = d.pop("description", UNSET) - - name = d.pop("name", UNSET) - - update_retriever_component_request_content = cls( - config=config, - type_=type_, - description=description, - name=name, - ) - - update_retriever_component_request_content.additional_properties = d - return update_retriever_component_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_response_content.py deleted file mode 100644 index a2e180e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_component_response_content.py +++ /dev/null @@ -1,128 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="UpdateRetrieverComponentResponseContent") - - -@_attrs_define -class UpdateRetrieverComponentResponseContent: - """ - Attributes: - config (Any): - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_component_id (str): - type_ (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - config: Any - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_component_id: str - type_: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - config = self.config - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_component_id = self.retriever_component_id - - type_ = self.type_ - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "config": config, - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_component_id": retriever_component_id, - "type": type_, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - config = d.pop("config") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_component_id = d.pop("retriever_component_id") - - type_ = d.pop("type") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - update_retriever_component_response_content = cls( - config=config, - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_component_id=retriever_component_id, - type_=type_, - updated_at=updated_at, - description=description, - ) - - update_retriever_component_response_content.additional_properties = d - return update_retriever_component_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_request_content.py deleted file mode 100644 index e1352be..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_request_content.py +++ /dev/null @@ -1,104 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.retriever_component_input import RetrieverComponentInput - - -T = TypeVar("T", bound="UpdateRetrieverRequestContent") - - -@_attrs_define -class UpdateRetrieverRequestContent: - """ - Attributes: - description (Union[Unset, str]): - name (Union[Unset, str]): - retriever_component_ids (Union[Unset, list[str]]): - retriever_components (Union[Unset, list['RetrieverComponentInput']]): - """ - - description: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - retriever_component_ids: Union[Unset, list[str]] = UNSET - retriever_components: Union[Unset, list["RetrieverComponentInput"]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - name = self.name - - retriever_component_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.retriever_component_ids, Unset): - retriever_component_ids = self.retriever_component_ids - - retriever_components: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.retriever_components, Unset): - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if description is not UNSET: - field_dict["description"] = description - if name is not UNSET: - field_dict["name"] = name - if retriever_component_ids is not UNSET: - field_dict["retriever_component_ids"] = retriever_component_ids - if retriever_components is not UNSET: - field_dict["retriever_components"] = retriever_components - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_input import RetrieverComponentInput - - d = dict(src_dict) - description = d.pop("description", UNSET) - - name = d.pop("name", UNSET) - - retriever_component_ids = cast(list[str], d.pop("retriever_component_ids", UNSET)) - - retriever_components = [] - _retriever_components = d.pop("retriever_components", UNSET) - for retriever_components_item_data in _retriever_components or []: - retriever_components_item = RetrieverComponentInput.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - update_retriever_request_content = cls( - description=description, - name=name, - retriever_component_ids=retriever_component_ids, - retriever_components=retriever_components, - ) - - update_retriever_request_content.additional_properties = d - return update_retriever_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_response_content.py deleted file mode 100644 index 69cf92e..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_retriever_response_content.py +++ /dev/null @@ -1,142 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.retriever_component_detail import RetrieverComponentDetail - - -T = TypeVar("T", bound="UpdateRetrieverResponseContent") - - -@_attrs_define -class UpdateRetrieverResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - name (str): - organization_id (str): - retriever_components (list['RetrieverComponentDetail']): - retriever_components_schema (Any): - retriever_id (str): - updated_at (datetime.datetime): - description (Union[Unset, str]): - """ - - created_at: datetime.datetime - created_by: str - name: str - organization_id: str - retriever_components: list["RetrieverComponentDetail"] - retriever_components_schema: Any - retriever_id: str - updated_at: datetime.datetime - description: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - name = self.name - - organization_id = self.organization_id - - retriever_components = [] - for retriever_components_item_data in self.retriever_components: - retriever_components_item = retriever_components_item_data.to_dict() - retriever_components.append(retriever_components_item) - - retriever_components_schema = self.retriever_components_schema - - retriever_id = self.retriever_id - - updated_at = self.updated_at.isoformat() - - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "name": name, - "organization_id": organization_id, - "retriever_components": retriever_components, - "retriever_components_schema": retriever_components_schema, - "retriever_id": retriever_id, - "updated_at": updated_at, - } - ) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.retriever_component_detail import RetrieverComponentDetail - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - retriever_components = [] - _retriever_components = d.pop("retriever_components") - for retriever_components_item_data in _retriever_components: - retriever_components_item = RetrieverComponentDetail.from_dict(retriever_components_item_data) - - retriever_components.append(retriever_components_item) - - retriever_components_schema = d.pop("retriever_components_schema") - - retriever_id = d.pop("retriever_id") - - updated_at = isoparse(d.pop("updated_at")) - - description = d.pop("description", UNSET) - - update_retriever_response_content = cls( - created_at=created_at, - created_by=created_by, - name=name, - organization_id=organization_id, - retriever_components=retriever_components, - retriever_components_schema=retriever_components_schema, - retriever_id=retriever_id, - updated_at=updated_at, - description=description, - ) - - update_retriever_response_content.additional_properties = d - return update_retriever_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_request_content.py deleted file mode 100644 index 8a2e72d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_request_content.py +++ /dev/null @@ -1,90 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="UpdateRuleRequestContent") - - -@_attrs_define -class UpdateRuleRequestContent: - """ - Attributes: - metadata (Union[Unset, Metadata]): - name (Union[Unset, str]): - rule (Union[Unset, str]): - """ - - metadata: Union[Unset, "Metadata"] = UNSET - name: Union[Unset, str] = UNSET - rule: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - name = self.name - - rule = self.rule - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - if rule is not UNSET: - field_dict["rule"] = rule - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - name = d.pop("name", UNSET) - - rule = d.pop("rule", UNSET) - - update_rule_request_content = cls( - metadata=metadata, - name=name, - rule=rule, - ) - - update_rule_request_content.additional_properties = d - return update_rule_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_response_content.py deleted file mode 100644 index a9401cc..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_rule_response_content.py +++ /dev/null @@ -1,123 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="UpdateRuleResponseContent") - - -@_attrs_define -class UpdateRuleResponseContent: - """ - Attributes: - created_at (datetime.datetime): - created_by (str): - metadata (Metadata): - name (str): - organization_id (str): - rule (str): - rule_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - created_by: str - metadata: "Metadata" - name: str - organization_id: str - rule: str - rule_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - created_by = self.created_by - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule = self.rule - - rule_id = self.rule_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "created_by": created_by, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule": rule, - "rule_id": rule_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule = d.pop("rule") - - rule_id = d.pop("rule_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_rule_response_content = cls( - created_at=created_at, - created_by=created_by, - metadata=metadata, - name=name, - organization_id=organization_id, - rule=rule, - rule_id=rule_id, - updated_at=updated_at, - ) - - update_rule_response_content.additional_properties = d - return update_rule_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_request_content.py deleted file mode 100644 index 57ebd90..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_request_content.py +++ /dev/null @@ -1,110 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.metadata import Metadata - - -T = TypeVar("T", bound="UpdateRulesetRequestContent") - - -@_attrs_define -class UpdateRulesetRequestContent: - """ - Attributes: - alias (Union[Unset, str]): - description (Union[Unset, str]): - metadata (Union[Unset, Metadata]): - name (Union[Unset, str]): - rule_ids (Union[Unset, list[str]]): - """ - - alias: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - metadata: Union[Unset, "Metadata"] = UNSET - name: Union[Unset, str] = UNSET - rule_ids: Union[Unset, list[str]] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - description = self.description - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - name = self.name - - rule_ids: Union[Unset, list[str]] = UNSET - if not isinstance(self.rule_ids, Unset): - rule_ids = self.rule_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if alias is not UNSET: - field_dict["alias"] = alias - if description is not UNSET: - field_dict["description"] = description - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - if rule_ids is not UNSET: - field_dict["rule_ids"] = rule_ids - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias", UNSET) - - description = d.pop("description", UNSET) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - name = d.pop("name", UNSET) - - rule_ids = cast(list[str], d.pop("rule_ids", UNSET)) - - update_ruleset_request_content = cls( - alias=alias, - description=description, - metadata=metadata, - name=name, - rule_ids=rule_ids, - ) - - update_ruleset_request_content.additional_properties = d - return update_ruleset_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_response_content.py deleted file mode 100644 index 196965d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_ruleset_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="UpdateRulesetResponseContent") - - -@_attrs_define -class UpdateRulesetResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - description (str): - metadata (Metadata): - name (str): - organization_id (str): - rule_ids (list[str]): - ruleset_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - description: str - metadata: "Metadata" - name: str - organization_id: str - rule_ids: list[str] - ruleset_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - rule_ids = self.rule_ids - - ruleset_id = self.ruleset_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "description": description, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "rule_ids": rule_ids, - "ruleset_id": ruleset_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - rule_ids = cast(list[str], d.pop("rule_ids")) - - ruleset_id = d.pop("ruleset_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_ruleset_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - description=description, - metadata=metadata, - name=name, - organization_id=organization_id, - rule_ids=rule_ids, - ruleset_id=ruleset_id, - updated_at=updated_at, - ) - - update_ruleset_response_content.additional_properties = d - return update_ruleset_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_request_content.py deleted file mode 100644 index e8fcf2a..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_request_content.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="UpdateSecretRequestContent") - - -@_attrs_define -class UpdateSecretRequestContent: - """ - Attributes: - name (Union[Unset, str]): - value (Union[Unset, str]): - """ - - name: 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]: - name = self.name - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if name is not UNSET: - field_dict["name"] = name - if value is not UNSET: - field_dict["value"] = value - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - name = d.pop("name", UNSET) - - value = d.pop("value", UNSET) - - update_secret_request_content = cls( - name=name, - value=value, - ) - - update_secret_request_content.additional_properties = d - return update_secret_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_response_content.py deleted file mode 100644 index a9c550f..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_secret_response_content.py +++ /dev/null @@ -1,101 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="UpdateSecretResponseContent") - - -@_attrs_define -class UpdateSecretResponseContent: - """ - Attributes: - created_at (datetime.datetime): - last_used (datetime.datetime): - name (str): - organization_id (str): - secret_id (str): - updated_at (datetime.datetime): - """ - - created_at: datetime.datetime - last_used: datetime.datetime - name: str - organization_id: str - secret_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - created_at = self.created_at.isoformat() - - last_used = self.last_used.isoformat() - - name = self.name - - organization_id = self.organization_id - - secret_id = self.secret_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "last_used": last_used, - "name": name, - "organization_id": organization_id, - "secret_id": secret_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - last_used = isoparse(d.pop("last_used")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - secret_id = d.pop("secret_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_secret_response_content = cls( - created_at=created_at, - last_used=last_used, - name=name, - organization_id=organization_id, - secret_id=secret_id, - updated_at=updated_at, - ) - - update_secret_response_content.additional_properties = d - return update_secret_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_request_content.py deleted file mode 100644 index 66ff45b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_request_content.py +++ /dev/null @@ -1,163 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="UpdateStructureRequestContent") - - -@_attrs_define -class UpdateStructureRequestContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - name (Union[Unset, str]): - structure_config_file (Union[Unset, str]): - webhook_enabled (Union[Unset, bool]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - name: Union[Unset, str] = UNSET - structure_config_file: Union[Unset, str] = UNSET - webhook_enabled: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - name = self.name - - structure_config_file = self.structure_config_file - - webhook_enabled = self.webhook_enabled - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if name is not UNSET: - field_dict["name"] = name - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - if webhook_enabled is not UNSET: - field_dict["webhook_enabled"] = webhook_enabled - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - name = d.pop("name", UNSET) - - structure_config_file = d.pop("structure_config_file", UNSET) - - webhook_enabled = d.pop("webhook_enabled", UNSET) - - update_structure_request_content = cls( - code=code, - description=description, - env_vars=env_vars, - name=name, - structure_config_file=structure_config_file, - webhook_enabled=webhook_enabled, - ) - - update_structure_request_content.additional_properties = d - return update_structure_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_response_content.py deleted file mode 100644 index 9034260..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_structure_response_content.py +++ /dev/null @@ -1,205 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - -T = TypeVar("T", bound="UpdateStructureResponseContent") - - -@_attrs_define -class UpdateStructureResponseContent: - """ - Attributes: - code (Union['StructureCodeType0', 'StructureCodeType1', 'StructureCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - structure_id (str): - updated_at (datetime.datetime): - webhook_enabled (bool): - structure_config_file (Union[Unset, str]): - """ - - code: Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - structure_id: str - updated_at: datetime.datetime - webhook_enabled: bool - structure_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - - code: dict[str, Any] - if isinstance(self.code, StructureCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, StructureCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - structure_id = self.structure_id - - updated_at = self.updated_at.isoformat() - - webhook_enabled = self.webhook_enabled - - structure_config_file = self.structure_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "structure_id": structure_id, - "updated_at": updated_at, - "webhook_enabled": webhook_enabled, - } - ) - if structure_config_file is not UNSET: - field_dict["structure_config_file"] = structure_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.structure_code_type_0 import StructureCodeType0 - from ..models.structure_code_type_1 import StructureCodeType1 - from ..models.structure_code_type_2 import StructureCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["StructureCodeType0", "StructureCodeType1", "StructureCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_0 = StructureCodeType0.from_dict(data) - - return componentsschemas_structure_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_1 = StructureCodeType1.from_dict(data) - - return componentsschemas_structure_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_structure_code_type_2 = StructureCodeType2.from_dict(data) - - return componentsschemas_structure_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - structure_id = d.pop("structure_id") - - updated_at = isoparse(d.pop("updated_at")) - - webhook_enabled = d.pop("webhook_enabled") - - structure_config_file = d.pop("structure_config_file", UNSET) - - update_structure_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - structure_id=structure_id, - updated_at=updated_at, - webhook_enabled=webhook_enabled, - structure_config_file=structure_config_file, - ) - - update_structure_response_content.additional_properties = d - return update_structure_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_request_content.py deleted file mode 100644 index a7331d3..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_request_content.py +++ /dev/null @@ -1,111 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.message_input import MessageInput - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="UpdateThreadRequestContent") - - -@_attrs_define -class UpdateThreadRequestContent: - """ - Attributes: - alias (Union[Unset, str]): - messages (Union[Unset, list['MessageInput']]): - metadata (Union[Unset, Metadata]): - name (Union[Unset, str]): - """ - - alias: Union[Unset, str] = UNSET - messages: Union[Unset, list["MessageInput"]] = UNSET - metadata: Union[Unset, "Metadata"] = UNSET - name: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - messages: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.messages, Unset): - messages = [] - for messages_item_data in self.messages: - messages_item = messages_item_data.to_dict() - messages.append(messages_item) - - metadata: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.metadata, Unset): - metadata = self.metadata.to_dict() - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if alias is not UNSET: - field_dict["alias"] = alias - if messages is not UNSET: - field_dict["messages"] = messages - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.message_input import MessageInput - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias", UNSET) - - messages = [] - _messages = d.pop("messages", UNSET) - for messages_item_data in _messages or []: - messages_item = MessageInput.from_dict(messages_item_data) - - messages.append(messages_item) - - _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, Metadata] - if isinstance(_metadata, Unset): - metadata = UNSET - else: - metadata = Metadata.from_dict(_metadata) - - name = d.pop("name", UNSET) - - update_thread_request_content = cls( - alias=alias, - messages=messages, - metadata=metadata, - name=name, - ) - - update_thread_request_content.additional_properties = d - return update_thread_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_response_content.py deleted file mode 100644 index 001f11b..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_thread_response_content.py +++ /dev/null @@ -1,139 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -if TYPE_CHECKING: - from ..models.metadata import Metadata - - -T = TypeVar("T", bound="UpdateThreadResponseContent") - - -@_attrs_define -class UpdateThreadResponseContent: - """ - Attributes: - alias (str): - created_at (datetime.datetime): - created_by (str): - message_count (float): - messages_length (float): - metadata (Metadata): - name (str): - organization_id (str): - thread_id (str): - updated_at (datetime.datetime): - """ - - alias: str - created_at: datetime.datetime - created_by: str - message_count: float - messages_length: float - metadata: "Metadata" - name: str - organization_id: str - thread_id: str - updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - alias = self.alias - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - message_count = self.message_count - - messages_length = self.messages_length - - metadata = self.metadata.to_dict() - - name = self.name - - organization_id = self.organization_id - - thread_id = self.thread_id - - updated_at = self.updated_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "alias": alias, - "created_at": created_at, - "created_by": created_by, - "message_count": message_count, - "messages_length": messages_length, - "metadata": metadata, - "name": name, - "organization_id": organization_id, - "thread_id": thread_id, - "updated_at": updated_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.metadata import Metadata - - d = dict(src_dict) - alias = d.pop("alias") - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - message_count = d.pop("message_count") - - messages_length = d.pop("messages_length") - - metadata = Metadata.from_dict(d.pop("metadata")) - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - thread_id = d.pop("thread_id") - - updated_at = isoparse(d.pop("updated_at")) - - update_thread_response_content = cls( - alias=alias, - created_at=created_at, - created_by=created_by, - message_count=message_count, - messages_length=messages_length, - metadata=metadata, - name=name, - organization_id=organization_id, - thread_id=thread_id, - updated_at=updated_at, - ) - - update_thread_response_content.additional_properties = d - return update_thread_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_request_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_request_content.py deleted file mode 100644 index da76a1d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_request_content.py +++ /dev/null @@ -1,154 +0,0 @@ -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="UpdateToolRequestContent") - - -@_attrs_define -class UpdateToolRequestContent: - """ - Attributes: - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2', Unset]): - description (Union[Unset, str]): - env_vars (Union[Unset, list['EnvVar']]): - name (Union[Unset, str]): - tool_config_file (Union[Unset, str]): - """ - - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2", Unset] = UNSET - description: Union[Unset, str] = UNSET - env_vars: Union[Unset, list["EnvVar"]] = UNSET - name: Union[Unset, str] = UNSET - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - code: Union[Unset, dict[str, Any]] - if isinstance(self.code, Unset): - code = UNSET - elif isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - description = self.description - - env_vars: Union[Unset, list[dict[str, Any]]] = UNSET - if not isinstance(self.env_vars, Unset): - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - name = self.name - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code is not UNSET: - field_dict["code"] = code - if description is not UNSET: - field_dict["description"] = description - if env_vars is not UNSET: - field_dict["env_vars"] = env_vars - if name is not UNSET: - field_dict["name"] = name - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2", Unset]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code", UNSET)) - - description = d.pop("description", UNSET) - - env_vars = [] - _env_vars = d.pop("env_vars", UNSET) - for env_vars_item_data in _env_vars or []: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - name = d.pop("name", UNSET) - - tool_config_file = d.pop("tool_config_file", UNSET) - - update_tool_request_content = cls( - code=code, - description=description, - env_vars=env_vars, - name=name, - tool_config_file=tool_config_file, - ) - - update_tool_request_content.additional_properties = d - return update_tool_request_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_response_content.py b/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_response_content.py deleted file mode 100644 index 2b59c75..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/update_tool_response_content.py +++ /dev/null @@ -1,197 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, 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 - -if TYPE_CHECKING: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - -T = TypeVar("T", bound="UpdateToolResponseContent") - - -@_attrs_define -class UpdateToolResponseContent: - """ - Attributes: - code (Union['ToolCodeType0', 'ToolCodeType1', 'ToolCodeType2']): - created_at (datetime.datetime): - created_by (str): - description (str): - env_vars (list['EnvVar']): - latest_deployment_id (str): - name (str): - organization_id (str): - tool_id (str): - updated_at (datetime.datetime): - tool_config_file (Union[Unset, str]): - """ - - code: Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"] - created_at: datetime.datetime - created_by: str - description: str - env_vars: list["EnvVar"] - latest_deployment_id: str - name: str - organization_id: str - tool_id: str - updated_at: datetime.datetime - tool_config_file: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - - code: dict[str, Any] - if isinstance(self.code, ToolCodeType0): - code = self.code.to_dict() - elif isinstance(self.code, ToolCodeType1): - code = self.code.to_dict() - else: - code = self.code.to_dict() - - created_at = self.created_at.isoformat() - - created_by = self.created_by - - description = self.description - - env_vars = [] - for env_vars_item_data in self.env_vars: - env_vars_item = env_vars_item_data.to_dict() - env_vars.append(env_vars_item) - - latest_deployment_id = self.latest_deployment_id - - name = self.name - - organization_id = self.organization_id - - tool_id = self.tool_id - - updated_at = self.updated_at.isoformat() - - tool_config_file = self.tool_config_file - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "created_at": created_at, - "created_by": created_by, - "description": description, - "env_vars": env_vars, - "latest_deployment_id": latest_deployment_id, - "name": name, - "organization_id": organization_id, - "tool_id": tool_id, - "updated_at": updated_at, - } - ) - if tool_config_file is not UNSET: - field_dict["tool_config_file"] = tool_config_file - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.env_var import EnvVar - from ..models.tool_code_type_0 import ToolCodeType0 - from ..models.tool_code_type_1 import ToolCodeType1 - from ..models.tool_code_type_2 import ToolCodeType2 - - d = dict(src_dict) - - def _parse_code(data: object) -> Union["ToolCodeType0", "ToolCodeType1", "ToolCodeType2"]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_0 = ToolCodeType0.from_dict(data) - - return componentsschemas_tool_code_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_1 = ToolCodeType1.from_dict(data) - - return componentsschemas_tool_code_type_1 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_tool_code_type_2 = ToolCodeType2.from_dict(data) - - return componentsschemas_tool_code_type_2 - - code = _parse_code(d.pop("code")) - - created_at = isoparse(d.pop("created_at")) - - created_by = d.pop("created_by") - - description = d.pop("description") - - env_vars = [] - _env_vars = d.pop("env_vars") - for env_vars_item_data in _env_vars: - env_vars_item = EnvVar.from_dict(env_vars_item_data) - - env_vars.append(env_vars_item) - - latest_deployment_id = d.pop("latest_deployment_id") - - name = d.pop("name") - - organization_id = d.pop("organization_id") - - tool_id = d.pop("tool_id") - - updated_at = isoparse(d.pop("updated_at")) - - tool_config_file = d.pop("tool_config_file", UNSET) - - update_tool_response_content = cls( - code=code, - created_at=created_at, - created_by=created_by, - description=description, - env_vars=env_vars, - latest_deployment_id=latest_deployment_id, - name=name, - organization_id=organization_id, - tool_id=tool_id, - updated_at=updated_at, - tool_config_file=tool_config_file, - ) - - update_tool_response_content.additional_properties = d - return update_tool_response_content - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/user_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/user_detail.py deleted file mode 100644 index 44c9bec..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/user_detail.py +++ /dev/null @@ -1,104 +0,0 @@ -import datetime -from collections.abc import Mapping -from typing import Any, 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="UserDetail") - - -@_attrs_define -class UserDetail: - """ - Attributes: - created_at (datetime.datetime): - email (str): - organizations (list[str]): - updated_at (datetime.datetime): - user_id (str): - name (Union[Unset, str]): - """ - - created_at: datetime.datetime - email: str - organizations: list[str] - updated_at: datetime.datetime - user_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]: - created_at = self.created_at.isoformat() - - email = self.email - - organizations = self.organizations - - updated_at = self.updated_at.isoformat() - - user_id = self.user_id - - name = self.name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "created_at": created_at, - "email": email, - "organizations": organizations, - "updated_at": updated_at, - "user_id": user_id, - } - ) - if name is not UNSET: - field_dict["name"] = name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - created_at = isoparse(d.pop("created_at")) - - email = d.pop("email") - - organizations = cast(list[str], d.pop("organizations")) - - updated_at = isoparse(d.pop("updated_at")) - - user_id = d.pop("user_id") - - name = d.pop("name", UNSET) - - user_detail = cls( - created_at=created_at, - email=email, - organizations=organizations, - updated_at=updated_at, - user_id=user_id, - name=name, - ) - - user_detail.additional_properties = d - return user_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_detail.py deleted file mode 100644 index 8f019b4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_detail.py +++ /dev/null @@ -1,67 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="WebhookDetail") - - -@_attrs_define -class WebhookDetail: - """ - Attributes: - disable_api_key_param (bool): - integration_endpoint (str): - """ - - disable_api_key_param: bool - integration_endpoint: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - disable_api_key_param = self.disable_api_key_param - - integration_endpoint = self.integration_endpoint - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "disable_api_key_param": disable_api_key_param, - "integration_endpoint": integration_endpoint, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - disable_api_key_param = d.pop("disable_api_key_param") - - integration_endpoint = d.pop("integration_endpoint") - - webhook_detail = cls( - disable_api_key_param=disable_api_key_param, - integration_endpoint=integration_endpoint, - ) - - webhook_detail.additional_properties = d - return webhook_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_input.py deleted file mode 100644 index f07337c..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/webhook_input.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, 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="WebhookInput") - - -@_attrs_define -class WebhookInput: - """ - Attributes: - disable_api_key_param (Union[Unset, bool]): - """ - - disable_api_key_param: Union[Unset, bool] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - disable_api_key_param = self.disable_api_key_param - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if disable_api_key_param is not UNSET: - field_dict["disable_api_key_param"] = disable_api_key_param - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - disable_api_key_param = d.pop("disable_api_key_param", UNSET) - - webhook_input = cls( - disable_api_key_param=disable_api_key_param, - ) - - webhook_input.additional_properties = d - return webhook_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_detail.py b/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_detail.py deleted file mode 100644 index 0a60ccf..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_detail.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="WebscraperDetail") - - -@_attrs_define -class WebscraperDetail: - """ - Attributes: - urls (list[str]): - """ - - urls: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - urls = self.urls - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "urls": urls, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - urls = cast(list[str], d.pop("urls")) - - webscraper_detail = cls( - urls=urls, - ) - - webscraper_detail.additional_properties = d - return webscraper_detail - - @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/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_input.py b/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_input.py deleted file mode 100644 index 3861c8d..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/models/webscraper_input.py +++ /dev/null @@ -1,59 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="WebscraperInput") - - -@_attrs_define -class WebscraperInput: - """ - Attributes: - urls (list[str]): - """ - - urls: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - urls = self.urls - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "urls": urls, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - urls = cast(list[str], d.pop("urls")) - - webscraper_input = cls( - urls=urls, - ) - - webscraper_input.additional_properties = d - return webscraper_input - - @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/griptape_cloud_client/generated/griptape_cloud_client/py.typed b/griptape_cloud_client/generated/griptape_cloud_client/py.typed deleted file mode 100644 index 1aad327..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561 \ No newline at end of file diff --git a/griptape_cloud_client/generated/griptape_cloud_client/types.py b/griptape_cloud_client/generated/griptape_cloud_client/types.py deleted file mode 100644 index 1b96ca4..0000000 --- a/griptape_cloud_client/generated/griptape_cloud_client/types.py +++ /dev/null @@ -1,54 +0,0 @@ -"""Contains some shared types for properties""" - -from collections.abc import Mapping, MutableMapping -from http import HTTPStatus -from typing import IO, BinaryIO, Generic, Literal, Optional, TypeVar, Union - -from attrs import define - - -class Unset: - def __bool__(self) -> Literal[False]: - return False - - -UNSET: Unset = Unset() - -# The types that `httpx.Client(files=)` can accept, copied from that library. -FileContent = Union[IO[bytes], bytes, str] -FileTypes = Union[ - # (filename, file (or bytes), content_type) - tuple[Optional[str], FileContent, Optional[str]], - # (filename, file (or bytes), content_type, headers) - tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], -] -RequestFiles = list[tuple[str, FileTypes]] - - -@define -class File: - """Contains information for file uploads""" - - payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None - - def to_tuple(self) -> FileTypes: - """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__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/griptape_cloud_client/generated/pyproject.toml b/griptape_cloud_client/generated/pyproject.toml deleted file mode 100644 index 57ec8b6..0000000 --- a/griptape_cloud_client/generated/pyproject.toml +++ /dev/null @@ -1,26 +0,0 @@ -[tool.poetry] -name = "griptape-cloud-client" -version = "2023-09-19" -description = "A client library for accessing Griptape Cloud" -authors = [] -readme = "README.md" -packages = [ - { include = "griptape_cloud_client" }, -] -include = ["CHANGELOG.md", "griptape_cloud_client/py.typed"] - -[tool.poetry.dependencies] -python = "^3.9" -httpx = ">=0.23.0,<0.29.0" -attrs = ">=22.2.0" -python-dateutil = "^2.8.0" - -[build-system] -requires = ["poetry-core>=2.0.0,<3.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.ruff] -line-length = 120 - -[tool.ruff.lint] -select = ["F", "I", "UP"] diff --git a/pyproject.toml b/pyproject.toml index 1432c4b..65ab830 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ ] [dependency-groups] -dev = ["mdformat>=0.7.22", "pyright>=1.1.396", "ruff>=0.11.0", "typos>=1.30.2", "openapi-python-client>=0.26.2"] +dev = ["mdformat>=0.7.22", "pyright>=1.1.396", "ruff>=0.11.0", "typos>=1.30.2", "openapi-python-client>=0.26.2", "python-dateutil>=2.8.0", "attrs>=22.2.0"] test = ["pytest>=8.3.5"] [tool.ruff] diff --git a/uv.lock b/uv.lock index 3965ec3..9c5d208 100644 --- a/uv.lock +++ b/uv.lock @@ -75,9 +75,11 @@ dependencies = [ [package.dev-dependencies] dev = [ + { name = "attrs" }, { name = "mdformat" }, { name = "openapi-python-client" }, { name = "pyright" }, + { name = "python-dateutil" }, { name = "ruff" }, { name = "typos" }, ] @@ -93,9 +95,11 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ + { name = "attrs", specifier = ">=22.2.0" }, { name = "mdformat", specifier = ">=0.7.22" }, { name = "openapi-python-client", specifier = ">=0.26.2" }, { name = "pyright", specifier = ">=1.1.396" }, + { name = "python-dateutil", specifier = ">=2.8.0" }, { name = "ruff", specifier = ">=0.11.0" }, { name = "typos", specifier = ">=1.30.2" }, ]