diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..37db73b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,47 @@ +name: Lint and Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint-and-test: + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install deps + run: | + python -m pip install --upgrade pip setuptools + pip install poetry + + - name: Test install + run: | + poetry install --all-extras + + - name: Lint (mypy) + run: | + poetry run mypy cirro_api_client + + - name: Run tests (pytest) + run: | + poetry run pytest + + - name: Build python package + run: | + poetry build diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e6ac4a7..42c8eba 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,12 +4,6 @@ on: release: types: - published - push: - branches: - - main - pull_request: - branches: - - main jobs: build-and-push-image: @@ -20,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v2 with: - python-version: "3.12" + python-version: 3.14 - name: Install deps run: | @@ -34,10 +28,6 @@ jobs: run: | poetry install --all-extras - - name: Pytest - run: | - poetry run pytest - - name: Build python package run: | poetry build diff --git a/README.md b/README.md index e09a360..f2b3cb3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This Python package is automatically generated by the [OpenAPI Python Client](ht ## Requirements. -Python 3.9+. +Python 3.10+. ## Installation & Usage ### pip install @@ -115,5 +115,5 @@ client.set_httpx_client(httpx.Client(base_url="https://api.cirro.bio", proxies=" Re-generate the API client by running: ```sh -openapi-python-client update --url https://dev.cirro.bio/openapi/cirro-data-latest.yml --config config.yml --custom-template-path=templates/ +openapi-python-client generate --overwrite --url http://localhost:8080/openapi/cirro-data-latest.yml --config config.yml --custom-template-path=templates/ ``` diff --git a/cirro_api_client/v1/api/audit/__init__.py b/cirro_api_client/v1/api/audit/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/audit/__init__.py +++ b/cirro_api_client/v1/api/audit/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/audit/get_event.py b/cirro_api_client/v1/api/audit/get_event.py index 4e633b9..92591a5 100644 --- a/cirro_api_client/v1/api/audit/get_event.py +++ b/cirro_api_client/v1/api/audit/get_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( audit_event_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/audit-events/{audit_event_id}", + "url": "/audit-events/{audit_event_id}".format( + audit_event_id=quote(str(audit_event_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AuditEvent]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> AuditEvent | None: + if response.status_code == 200: response_200 = AuditEvent.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( audit_event_id: str, *, client: Client, -) -> Optional[AuditEvent]: +) -> AuditEvent | None: """Get audit event Get audit event detailed information @@ -135,7 +138,7 @@ async def asyncio( audit_event_id: str, *, client: Client, -) -> Optional[AuditEvent]: +) -> AuditEvent | None: """Get audit event Get audit event detailed information diff --git a/cirro_api_client/v1/api/audit/list_events.py b/cirro_api_client/v1/api/audit/list_events.py index db53e7a..d6d3e87 100644 --- a/cirro_api_client/v1/api/audit/list_events.py +++ b/cirro_api_client/v1/api/audit/list_events.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -12,15 +12,15 @@ def _get_kwargs( *, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: str | Unset = UNSET, + entity_type: ListEventsEntityType | Unset = UNSET, + entity_id: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["username"] = username - json_entity_type: Union[Unset, str] = UNSET + json_entity_type: str | Unset = UNSET if not isinstance(entity_type, Unset): json_entity_type = entity_type.value @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/audit-events", "params": params, @@ -39,8 +39,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AuditEvent"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[AuditEvent] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -53,7 +53,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AuditEvent"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[AuditEvent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,18 +65,18 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Response[List["AuditEvent"]]: + username: str | Unset = UNSET, + entity_type: ListEventsEntityType | Unset = UNSET, + entity_id: str | Unset = UNSET, +) -> Response[list[AuditEvent]]: """List audit events Gets a list of audit events Args: - username (Union[Unset, str]): - entity_type (Union[Unset, ListEventsEntityType]): - entity_id (Union[Unset, str]): + username (str | Unset): + entity_type (ListEventsEntityType | Unset): + entity_id (str | Unset): client (Client): instance of the API client Raises: @@ -84,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AuditEvent']] + Response[list[AuditEvent]] """ kwargs = _get_kwargs( @@ -104,18 +104,18 @@ def sync_detailed( def sync( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Optional[List["AuditEvent"]]: + username: str | Unset = UNSET, + entity_type: ListEventsEntityType | Unset = UNSET, + entity_id: str | Unset = UNSET, +) -> list[AuditEvent] | None: """List audit events Gets a list of audit events Args: - username (Union[Unset, str]): - entity_type (Union[Unset, ListEventsEntityType]): - entity_id (Union[Unset, str]): + username (str | Unset): + entity_type (ListEventsEntityType | Unset): + entity_id (str | Unset): client (Client): instance of the API client Raises: @@ -123,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AuditEvent'] + list[AuditEvent] """ try: @@ -140,18 +140,18 @@ def sync( async def asyncio_detailed( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Response[List["AuditEvent"]]: + username: str | Unset = UNSET, + entity_type: ListEventsEntityType | Unset = UNSET, + entity_id: str | Unset = UNSET, +) -> Response[list[AuditEvent]]: """List audit events Gets a list of audit events Args: - username (Union[Unset, str]): - entity_type (Union[Unset, ListEventsEntityType]): - entity_id (Union[Unset, str]): + username (str | Unset): + entity_type (ListEventsEntityType | Unset): + entity_id (str | Unset): client (Client): instance of the API client Raises: @@ -159,7 +159,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AuditEvent']] + Response[list[AuditEvent]] """ kwargs = _get_kwargs( @@ -176,18 +176,18 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Optional[List["AuditEvent"]]: + username: str | Unset = UNSET, + entity_type: ListEventsEntityType | Unset = UNSET, + entity_id: str | Unset = UNSET, +) -> list[AuditEvent] | None: """List audit events Gets a list of audit events Args: - username (Union[Unset, str]): - entity_type (Union[Unset, ListEventsEntityType]): - entity_id (Union[Unset, str]): + username (str | Unset): + entity_type (ListEventsEntityType | Unset): + entity_id (str | Unset): client (Client): instance of the API client Raises: @@ -195,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AuditEvent'] + list[AuditEvent] """ try: diff --git a/cirro_api_client/v1/api/billing/__init__.py b/cirro_api_client/v1/api/billing/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/billing/__init__.py +++ b/cirro_api_client/v1/api/billing/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/billing/create_billing_account.py b/cirro_api_client/v1/api/billing/create_billing_account.py index a9f0d2d..6c11658 100644 --- a/cirro_api_client/v1/api/billing/create_billing_account.py +++ b/cirro_api_client/v1/api/billing/create_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: BillingAccountRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/billing", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: BillingAccountRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create billing account Creates a billing account @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: BillingAccountRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create billing account Creates a billing account diff --git a/cirro_api_client/v1/api/billing/delete_billing_account.py b/cirro_api_client/v1/api/billing/delete_billing_account.py index d8528ca..937595d 100644 --- a/cirro_api_client/v1/api/billing/delete_billing_account.py +++ b/cirro_api_client/v1/api/billing/delete_billing_account.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( billing_account_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/billing/{billing_account_id}", + "url": "/billing/{billing_account_id}".format( + billing_account_id=quote(str(billing_account_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/billing/get_billing_accounts.py b/cirro_api_client/v1/api/billing/get_billing_accounts.py index 017f074..cdc4320 100644 --- a/cirro_api_client/v1/api/billing/get_billing_accounts.py +++ b/cirro_api_client/v1/api/billing/get_billing_accounts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_archived: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/billing", "params": params, @@ -28,8 +28,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["BillingAccount"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[BillingAccount] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["BillingAccount"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[BillingAccount]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,14 +54,14 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["BillingAccount"]]: + include_archived: bool | Unset = False, +) -> Response[list[BillingAccount]]: """List billing accounts Gets a list of billing accounts the current user has access to Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -69,7 +69,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['BillingAccount']] + Response[list[BillingAccount]] """ kwargs = _get_kwargs( @@ -87,14 +87,14 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["BillingAccount"]]: + include_archived: bool | Unset = False, +) -> list[BillingAccount] | None: """List billing accounts Gets a list of billing accounts the current user has access to Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -102,7 +102,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['BillingAccount'] + list[BillingAccount] """ try: @@ -117,14 +117,14 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["BillingAccount"]]: + include_archived: bool | Unset = False, +) -> Response[list[BillingAccount]]: """List billing accounts Gets a list of billing accounts the current user has access to Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -132,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['BillingAccount']] + Response[list[BillingAccount]] """ kwargs = _get_kwargs( @@ -147,14 +147,14 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["BillingAccount"]]: + include_archived: bool | Unset = False, +) -> list[BillingAccount] | None: """List billing accounts Gets a list of billing accounts the current user has access to Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -162,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['BillingAccount'] + list[BillingAccount] """ try: diff --git a/cirro_api_client/v1/api/billing/update_billing_account.py b/cirro_api_client/v1/api/billing/update_billing_account.py index 34a840b..522eaff 100644 --- a/cirro_api_client/v1/api/billing/update_billing_account.py +++ b/cirro_api_client/v1/api/billing/update_billing_account.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( billing_account_id: str, *, body: BillingAccountRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/billing/{billing_account_id}", + "url": "/billing/{billing_account_id}".format( + billing_account_id=quote(str(billing_account_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/compute_environment/__init__.py b/cirro_api_client/v1/api/compute_environment/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/compute_environment/__init__.py +++ b/cirro_api_client/v1/api/compute_environment/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/compute_environment/create_agent.py b/cirro_api_client/v1/api/compute_environment/create_agent.py index d5e2bb4..d37b3b0 100644 --- a/cirro_api_client/v1/api/compute_environment/create_agent.py +++ b/cirro_api_client/v1/api/compute_environment/create_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: AgentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/agents", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: AgentInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create agent Create a new agent @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: AgentInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create agent Create a new agent diff --git a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py index b9f4451..a829400 100644 --- a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/compute-environments", + "url": "/projects/{project_id}/compute-environments".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create compute environment Create a new compute environment for a project @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create compute environment Create a new compute environment for a project diff --git a/cirro_api_client/v1/api/compute_environment/delete_agent.py b/cirro_api_client/v1/api/compute_environment/delete_agent.py index 585ccdb..0451b38 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_agent.py +++ b/cirro_api_client/v1/api/compute_environment/delete_agent.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( agent_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/agents/{agent_id}", + "url": "/agents/{agent_id}".format( + agent_id=quote(str(agent_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py index 5b61b09..0520efd 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, compute_environment_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", + "url": "/projects/{project_id}/compute-environments/{compute_environment_id}".format( + project_id=quote(str(project_id), safe=""), + compute_environment_id=quote(str(compute_environment_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/compute_environment/get_agents.py b/cirro_api_client/v1/api/compute_environment/get_agents.py index 5aedf87..52c2e1d 100644 --- a/cirro_api_client/v1/api/compute_environment/get_agents.py +++ b/cirro_api_client/v1/api/compute_environment/get_agents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/agents", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AgentDetail"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[AgentDetail] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AgentDetail"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[AgentDetail]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["AgentDetail"]]: +) -> Response[list[AgentDetail]]: """Get agents Get a list of agents @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AgentDetail']] + Response[list[AgentDetail]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["AgentDetail"]]: +) -> list[AgentDetail] | None: """Get agents Get a list of agents @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AgentDetail'] + list[AgentDetail] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["AgentDetail"]]: +) -> Response[list[AgentDetail]]: """Get agents Get a list of agents @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AgentDetail']] + Response[list[AgentDetail]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["AgentDetail"]]: +) -> list[AgentDetail] | None: """Get agents Get a list of agents @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AgentDetail'] + list[AgentDetail] """ try: diff --git a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py index 4d33476..5ef0991 100644 --- a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py +++ b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/compute-environments", + "url": "/projects/{project_id}/compute-environments".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ComputeEnvironmentConfiguration"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ComputeEnvironmentConfiguration] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ComputeEnvironmentConfiguration"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ComputeEnvironmentConfiguration]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["ComputeEnvironmentConfiguration"]]: +) -> Response[list[ComputeEnvironmentConfiguration]]: """Get compute environments Get a list of compute environments for a project @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ComputeEnvironmentConfiguration']] + Response[list[ComputeEnvironmentConfiguration]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["ComputeEnvironmentConfiguration"]]: +) -> list[ComputeEnvironmentConfiguration] | None: """Get compute environments Get a list of compute environments for a project @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ComputeEnvironmentConfiguration'] + list[ComputeEnvironmentConfiguration] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["ComputeEnvironmentConfiguration"]]: +) -> Response[list[ComputeEnvironmentConfiguration]]: """Get compute environments Get a list of compute environments for a project @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ComputeEnvironmentConfiguration']] + Response[list[ComputeEnvironmentConfiguration]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["ComputeEnvironmentConfiguration"]]: +) -> list[ComputeEnvironmentConfiguration] | None: """Get compute environments Get a list of compute environments for a project @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ComputeEnvironmentConfiguration'] + list[ComputeEnvironmentConfiguration] """ try: diff --git a/cirro_api_client/v1/api/compute_environment/update_agent.py b/cirro_api_client/v1/api/compute_environment/update_agent.py index d62743c..cee6b39 100644 --- a/cirro_api_client/v1/api/compute_environment/update_agent.py +++ b/cirro_api_client/v1/api/compute_environment/update_agent.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( agent_id: str, *, body: AgentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/agents/{agent_id}", + "url": "/agents/{agent_id}".format( + agent_id=quote(str(agent_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py index bf3210d..d17760d 100644 --- a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( compute_environment_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", + "url": "/projects/{project_id}/compute-environments/{compute_environment_id}".format( + project_id=quote(str(project_id), safe=""), + compute_environment_id=quote(str(compute_environment_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/dashboards/__init__.py b/cirro_api_client/v1/api/dashboards/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/dashboards/__init__.py +++ b/cirro_api_client/v1/api/dashboards/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/dashboards/create_dashboard.py b/cirro_api_client/v1/api/dashboards/create_dashboard.py index ac8cf16..2bafbbb 100644 --- a/cirro_api_client/v1/api/dashboards/create_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/create_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: DashboardRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/dashboards", + "url": "/projects/{project_id}/dashboards".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create dashboard Creates a dashboard @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create dashboard Creates a dashboard diff --git a/cirro_api_client/v1/api/dashboards/delete_dashboard.py b/cirro_api_client/v1/api/dashboards/delete_dashboard.py index d3bd31a..17d0b1c 100644 --- a/cirro_api_client/v1/api/dashboards/delete_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/delete_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/dashboards/{dashboard_id}", + "url": "/projects/{project_id}/dashboards/{dashboard_id}".format( + project_id=quote(str(project_id), safe=""), + dashboard_id=quote(str(dashboard_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: - if response.status_code == HTTPStatus.NO_CONTENT: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: + if response.status_code == 204: response_204 = Dashboard.from_dict(response.json()) return response_204 @@ -80,7 +84,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Delete dashboard Deletes a dashboard @@ -146,7 +150,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Delete dashboard Deletes a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboard.py b/cirro_api_client/v1/api/dashboards/get_dashboard.py index 5a8a586..e29e4ef 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/dashboards/{dashboard_id}", + "url": "/projects/{project_id}/dashboards/{dashboard_id}".format( + project_id=quote(str(project_id), safe=""), + dashboard_id=quote(str(dashboard_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: + if response.status_code == 200: response_200 = Dashboard.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Get dashboard Retrieves a dashboard @@ -146,7 +150,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Get dashboard Retrieves a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboards.py b/cirro_api_client/v1/api/dashboards/get_dashboards.py index c01b7a5..f33d788 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboards.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboards.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/dashboards", + "url": "/projects/{project_id}/dashboards".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Dashboard"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Dashboard] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Dashboard"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Dashboard]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Dashboard"]]: +) -> Response[list[Dashboard]]: """List dashboards Retrieves a list of dashboards for a given project @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Dashboard']] + Response[list[Dashboard]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Dashboard"]]: +) -> list[Dashboard] | None: """List dashboards Retrieves a list of dashboards for a given project @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Dashboard'] + list[Dashboard] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Dashboard"]]: +) -> Response[list[Dashboard]]: """List dashboards Retrieves a list of dashboards for a given project @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Dashboard']] + Response[list[Dashboard]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Dashboard"]]: +) -> list[Dashboard] | None: """List dashboards Retrieves a list of dashboards for a given project @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Dashboard'] + list[Dashboard] """ try: diff --git a/cirro_api_client/v1/api/dashboards/update_dashboard.py b/cirro_api_client/v1/api/dashboards/update_dashboard.py index 08980c9..6757973 100644 --- a/cirro_api_client/v1/api/dashboards/update_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/update_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -15,25 +16,27 @@ def _get_kwargs( dashboard_id: str, *, body: DashboardRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/dashboards/{dashboard_id}", + "url": "/projects/{project_id}/dashboards/{dashboard_id}".format( + project_id=quote(str(project_id), safe=""), + dashboard_id=quote(str(dashboard_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: + if response.status_code == 200: response_200 = Dashboard.from_dict(response.json()) return response_200 @@ -95,7 +98,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Update dashboard Updates a dashboard @@ -167,7 +170,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Update dashboard Updates a dashboard diff --git a/cirro_api_client/v1/api/datasets/__init__.py b/cirro_api_client/v1/api/datasets/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/datasets/__init__.py +++ b/cirro_api_client/v1/api/datasets/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/datasets/delete_dataset.py b/cirro_api_client/v1/api/datasets/delete_dataset.py index 3e2db39..778c8f0 100644 --- a/cirro_api_client/v1/api/datasets/delete_dataset.py +++ b/cirro_api_client/v1/api/datasets/delete_dataset.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/datasets/{dataset_id}", + "url": "/projects/{project_id}/datasets/{dataset_id}".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/datasets/get_dataset.py b/cirro_api_client/v1/api/datasets/get_dataset.py index 8b23540..9486543 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset.py +++ b/cirro_api_client/v1/api/datasets/get_dataset.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/datasets/{dataset_id}", + "url": "/projects/{project_id}/datasets/{dataset_id}".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: + if response.status_code == 200: response_200 = DatasetDetail.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Get dataset Gets detailed information about a dataset @@ -146,7 +150,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Get dataset Gets detailed information about a dataset diff --git a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py index 9594286..b736c31 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py +++ b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -13,10 +14,10 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + file_offset: int | Unset = 0, + file_limit: int | Unset = 20000, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["fileOffset"] = file_offset @@ -24,17 +25,20 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/datasets/{dataset_id}/files", + "url": "/projects/{project_id}/datasets/{dataset_id}/files".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetAssetsManifest]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetAssetsManifest | None: + if response.status_code == 200: response_200 = DatasetAssetsManifest.from_dict(response.json()) return response_200 @@ -56,8 +60,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, + file_offset: int | Unset = 0, + file_limit: int | Unset = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -66,8 +70,8 @@ def sync_detailed( Args: project_id (str): dataset_id (str): - file_offset (Union[Unset, int]): Default: 0. - file_limit (Union[Unset, int]): Default: 20000. + file_offset (int | Unset): Default: 0. + file_limit (int | Unset): Default: 20000. client (Client): instance of the API client Raises: @@ -98,9 +102,9 @@ def sync( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Optional[DatasetAssetsManifest]: + file_offset: int | Unset = 0, + file_limit: int | Unset = 20000, +) -> DatasetAssetsManifest | None: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset @@ -108,8 +112,8 @@ def sync( Args: project_id (str): dataset_id (str): - file_offset (Union[Unset, int]): Default: 0. - file_limit (Union[Unset, int]): Default: 20000. + file_offset (int | Unset): Default: 0. + file_limit (int | Unset): Default: 20000. client (Client): instance of the API client Raises: @@ -137,8 +141,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, + file_offset: int | Unset = 0, + file_limit: int | Unset = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -147,8 +151,8 @@ async def asyncio_detailed( Args: project_id (str): dataset_id (str): - file_offset (Union[Unset, int]): Default: 0. - file_limit (Union[Unset, int]): Default: 20000. + file_offset (int | Unset): Default: 0. + file_limit (int | Unset): Default: 20000. client (Client): instance of the API client Raises: @@ -176,9 +180,9 @@ async def asyncio( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Optional[DatasetAssetsManifest]: + file_offset: int | Unset = 0, + file_limit: int | Unset = 20000, +) -> DatasetAssetsManifest | None: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset @@ -186,8 +190,8 @@ async def asyncio( Args: project_id (str): dataset_id (str): - file_offset (Union[Unset, int]): Default: 0. - file_limit (Union[Unset, int]): Default: 20000. + file_offset (int | Unset): Default: 0. + file_limit (int | Unset): Default: 20000. client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/datasets/get_datasets.py b/cirro_api_client/v1/api/datasets/get_datasets.py index ebd90a5..9fce64b 100644 --- a/cirro_api_client/v1/api/datasets/get_datasets.py +++ b/cirro_api_client/v1/api/datasets/get_datasets.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,10 @@ def _get_kwargs( project_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -23,17 +24,19 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/datasets", + "url": "/projects/{project_id}/datasets".format( + project_id=quote(str(project_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: + if response.status_code == 200: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) return response_200 @@ -54,8 +57,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -63,8 +66,8 @@ def sync_detailed( Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -93,17 +96,17 @@ def sync( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseDatasetListDto | None: """List datasets Retrieves a list of datasets for a given project Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -129,8 +132,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -138,8 +141,8 @@ async def asyncio_detailed( Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -165,17 +168,17 @@ async def asyncio( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseDatasetListDto | None: """List datasets Retrieves a list of datasets for a given project Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/datasets/get_sample_sheets.py b/cirro_api_client/v1/api/datasets/get_sample_sheets.py index db26635..ef6f864 100644 --- a/cirro_api_client/v1/api/datasets/get_sample_sheets.py +++ b/cirro_api_client/v1/api/datasets/get_sample_sheets.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/datasets/{dataset_id}/samplesheet", + "url": "/projects/{project_id}/datasets/{dataset_id}/samplesheet".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SampleSheets]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> SampleSheets | None: + if response.status_code == 200: response_200 = SampleSheets.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[SampleSheets]: +) -> SampleSheets | None: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. @@ -146,7 +150,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[SampleSheets]: +) -> SampleSheets | None: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. diff --git a/cirro_api_client/v1/api/datasets/import_public_dataset.py b/cirro_api_client/v1/api/datasets/import_public_dataset.py index 0807c70..9670c83 100644 --- a/cirro_api_client/v1/api/datasets/import_public_dataset.py +++ b/cirro_api_client/v1/api/datasets/import_public_dataset.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: ImportDataRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/datasets/import", + "url": "/projects/{project_id}/datasets/import".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ImportDataRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Import public dataset Download data from public repositories @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ImportDataRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Import public dataset Download data from public repositories diff --git a/cirro_api_client/v1/api/datasets/ingest_samples.py b/cirro_api_client/v1/api/datasets/ingest_samples.py index 69ccb84..3914820 100644 --- a/cirro_api_client/v1/api/datasets/ingest_samples.py +++ b/cirro_api_client/v1/api/datasets/ingest_samples.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/datasets/{dataset_id}/ingest-samples", + "url": "/projects/{project_id}/datasets/{dataset_id}/ingest-samples".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/datasets/regenerate_manifest.py b/cirro_api_client/v1/api/datasets/regenerate_manifest.py index 04ef172..811ee15 100644 --- a/cirro_api_client/v1/api/datasets/regenerate_manifest.py +++ b/cirro_api_client/v1/api/datasets/regenerate_manifest.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/datasets/{dataset_id}/regenerate-manifest", + "url": "/projects/{project_id}/datasets/{dataset_id}/regenerate-manifest".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/datasets/rerun_transform.py b/cirro_api_client/v1/api/datasets/rerun_transform.py index a86bbec..53d8f5e 100644 --- a/cirro_api_client/v1/api/datasets/rerun_transform.py +++ b/cirro_api_client/v1/api/datasets/rerun_transform.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/datasets/{dataset_id}/rerun-transform", + "url": "/projects/{project_id}/datasets/{dataset_id}/rerun-transform".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/datasets/update_dataset.py b/cirro_api_client/v1/api/datasets/update_dataset.py index 7417218..6798058 100644 --- a/cirro_api_client/v1/api/datasets/update_dataset.py +++ b/cirro_api_client/v1/api/datasets/update_dataset.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -15,25 +16,27 @@ def _get_kwargs( dataset_id: str, *, body: UpdateDatasetRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/datasets/{dataset_id}", + "url": "/projects/{project_id}/datasets/{dataset_id}".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: + if response.status_code == 200: response_200 = DatasetDetail.from_dict(response.json()) return response_200 @@ -95,7 +98,7 @@ def sync( *, client: Client, body: UpdateDatasetRequest, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Update dataset Update info on a dataset @@ -167,7 +170,7 @@ async def asyncio( *, client: Client, body: UpdateDatasetRequest, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Update dataset Update info on a dataset diff --git a/cirro_api_client/v1/api/datasets/upload_dataset.py b/cirro_api_client/v1/api/datasets/upload_dataset.py index c25e884..7513bfc 100644 --- a/cirro_api_client/v1/api/datasets/upload_dataset.py +++ b/cirro_api_client/v1/api/datasets/upload_dataset.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: UploadDatasetRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/datasets/upload", + "url": "/projects/{project_id}/datasets/upload".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UploadDatasetCreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> UploadDatasetCreateResponse | None: + if response.status_code == 201: response_201 = UploadDatasetCreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: UploadDatasetRequest, -) -> Optional[UploadDatasetCreateResponse]: +) -> UploadDatasetCreateResponse | None: """Upload private dataset Registers a dataset in the system that you upload files into @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: UploadDatasetRequest, -) -> Optional[UploadDatasetCreateResponse]: +) -> UploadDatasetCreateResponse | None: """Upload private dataset Registers a dataset in the system that you upload files into diff --git a/cirro_api_client/v1/api/execution/__init__.py b/cirro_api_client/v1/api/execution/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/execution/__init__.py +++ b/cirro_api_client/v1/api/execution/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/execution/calculate_cost.py b/cirro_api_client/v1/api/execution/calculate_cost.py index f5baf82..6e553a0 100644 --- a/cirro_api_client/v1/api/execution/calculate_cost.py +++ b/cirro_api_client/v1/api/execution/calculate_cost.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/execution/{dataset_id}/cost", + "url": "/projects/{project_id}/execution/{dataset_id}/cost".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CostResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> CostResponse | None: + if response.status_code == 200: response_200 = CostResponse.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[CostResponse]: +) -> CostResponse | None: """Calculate cost Calculate cost of an execution run @@ -146,7 +150,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[CostResponse]: +) -> CostResponse | None: """Calculate cost Calculate cost of an execution run diff --git a/cirro_api_client/v1/api/execution/get_execution_logs.py b/cirro_api_client/v1/api/execution/get_execution_logs.py index c282af8..962924b 100644 --- a/cirro_api_client/v1/api/execution/get_execution_logs.py +++ b/cirro_api_client/v1/api/execution/get_execution_logs.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,28 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/execution/{dataset_id}/logs", + "url": "/projects/{project_id}/execution/{dataset_id}/logs".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: + if response.status_code == 200: response_200 = GetExecutionLogsResponse.from_dict(response.json()) return response_200 @@ -53,7 +57,7 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: bool | Unset = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -62,7 +66,7 @@ def sync_detailed( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -92,8 +96,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: bool | Unset = False, +) -> GetExecutionLogsResponse | None: """Get execution logs Gets live logs from main execution task @@ -101,7 +105,7 @@ def sync( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -128,7 +132,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: bool | Unset = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -137,7 +141,7 @@ async def asyncio_detailed( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -164,8 +168,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: bool | Unset = False, +) -> GetExecutionLogsResponse | None: """Get execution logs Gets live logs from main execution task @@ -173,7 +177,7 @@ async def asyncio( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/execution/get_project_summary.py b/cirro_api_client/v1/api/execution/get_project_summary.py index 10af0aa..500e382 100644 --- a/cirro_api_client/v1/api/execution/get_project_summary.py +++ b/cirro_api_client/v1/api/execution/get_project_summary.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -12,25 +13,27 @@ def _get_kwargs( project_id: str, *, - number_of_days: Union[Unset, int] = 1, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + number_of_days: int | Unset = 1, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["numberOfDays"] = number_of_days params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/execution", + "url": "/projects/{project_id}/execution".format( + project_id=quote(str(project_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetProjectSummaryResponse200]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GetProjectSummaryResponse200 | None: + if response.status_code == 200: response_200 = GetProjectSummaryResponse200.from_dict(response.json()) return response_200 @@ -51,7 +54,7 @@ def sync_detailed( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, + number_of_days: int | Unset = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -59,7 +62,7 @@ def sync_detailed( Args: project_id (str): - number_of_days (Union[Unset, int]): Default: 1. + number_of_days (int | Unset): Default: 1. client (Client): instance of the API client Raises: @@ -87,15 +90,15 @@ def sync( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, -) -> Optional[GetProjectSummaryResponse200]: + number_of_days: int | Unset = 1, +) -> GetProjectSummaryResponse200 | None: """Get execution summary Gets an overview of the executions currently running in the project Args: project_id (str): - number_of_days (Union[Unset, int]): Default: 1. + number_of_days (int | Unset): Default: 1. client (Client): instance of the API client Raises: @@ -120,7 +123,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, + number_of_days: int | Unset = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -128,7 +131,7 @@ async def asyncio_detailed( Args: project_id (str): - number_of_days (Union[Unset, int]): Default: 1. + number_of_days (int | Unset): Default: 1. client (Client): instance of the API client Raises: @@ -153,15 +156,15 @@ async def asyncio( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, -) -> Optional[GetProjectSummaryResponse200]: + number_of_days: int | Unset = 1, +) -> GetProjectSummaryResponse200 | None: """Get execution summary Gets an overview of the executions currently running in the project Args: project_id (str): - number_of_days (Union[Unset, int]): Default: 1. + number_of_days (int | Unset): Default: 1. client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/execution/get_task_logs.py b/cirro_api_client/v1/api/execution/get_task_logs.py index 802352f..713f841 100644 --- a/cirro_api_client/v1/api/execution/get_task_logs.py +++ b/cirro_api_client/v1/api/execution/get_task_logs.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,29 @@ def _get_kwargs( dataset_id: str, task_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/execution/{dataset_id}/tasks/{task_id}/logs", + "url": "/projects/{project_id}/execution/{dataset_id}/tasks/{task_id}/logs".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + task_id=quote(str(task_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: + if response.status_code == 200: response_200 = GetExecutionLogsResponse.from_dict(response.json()) return response_200 @@ -55,7 +60,7 @@ def sync_detailed( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: bool | Unset = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -65,7 +70,7 @@ def sync_detailed( project_id (str): dataset_id (str): task_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -97,8 +102,8 @@ def sync( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: bool | Unset = False, +) -> GetExecutionLogsResponse | None: """Get task logs Gets the log output from an individual task @@ -107,7 +112,7 @@ def sync( project_id (str): dataset_id (str): task_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -136,7 +141,7 @@ async def asyncio_detailed( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: bool | Unset = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -146,7 +151,7 @@ async def asyncio_detailed( project_id (str): dataset_id (str): task_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -175,8 +180,8 @@ async def asyncio( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: bool | Unset = False, +) -> GetExecutionLogsResponse | None: """Get task logs Gets the log output from an individual task @@ -185,7 +190,7 @@ async def asyncio( project_id (str): dataset_id (str): task_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py index 7f07821..aa751d6 100644 --- a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py +++ b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,28 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/execution/{dataset_id}/tasks", + "url": "/projects/{project_id}/execution/{dataset_id}/tasks".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Task"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Task] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -44,7 +48,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Task"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Task]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,8 +62,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Response[List["Task"]]: + force_live: bool | Unset = False, +) -> Response[list[Task]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -67,7 +71,7 @@ def sync_detailed( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -75,7 +79,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Task']] + Response[list[Task]] """ kwargs = _get_kwargs( @@ -97,8 +101,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[List["Task"]]: + force_live: bool | Unset = False, +) -> list[Task] | None: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -106,7 +110,7 @@ def sync( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -114,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Task'] + list[Task] """ try: @@ -133,8 +137,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Response[List["Task"]]: + force_live: bool | Unset = False, +) -> Response[list[Task]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -142,7 +146,7 @@ async def asyncio_detailed( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -150,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Task']] + Response[list[Task]] """ kwargs = _get_kwargs( @@ -169,8 +173,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[List["Task"]]: + force_live: bool | Unset = False, +) -> list[Task] | None: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -178,7 +182,7 @@ async def asyncio( Args: project_id (str): dataset_id (str): - force_live (Union[Unset, bool]): Default: False. + force_live (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -186,7 +190,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Task'] + list[Task] """ try: diff --git a/cirro_api_client/v1/api/execution/run_analysis.py b/cirro_api_client/v1/api/execution/run_analysis.py index d0f7fd6..5103409 100644 --- a/cirro_api_client/v1/api/execution/run_analysis.py +++ b/cirro_api_client/v1/api/execution/run_analysis.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: RunAnalysisRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/execution", + "url": "/projects/{project_id}/execution".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 200: response_200 = CreateResponse.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: RunAnalysisRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Run analysis Run analysis @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: RunAnalysisRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Run analysis Run analysis diff --git a/cirro_api_client/v1/api/execution/stop_analysis.py b/cirro_api_client/v1/api/execution/stop_analysis.py index 56542b7..0dac160 100644 --- a/cirro_api_client/v1/api/execution/stop_analysis.py +++ b/cirro_api_client/v1/api/execution/stop_analysis.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/execution/{dataset_id}/stop", + "url": "/projects/{project_id}/execution/{dataset_id}/stop".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[StopExecutionResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> StopExecutionResponse | None: + if response.status_code == 200: response_200 = StopExecutionResponse.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[StopExecutionResponse]: +) -> StopExecutionResponse | None: """Stop execution Terminates all analysis jobs related to this execution @@ -146,7 +150,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[StopExecutionResponse]: +) -> StopExecutionResponse | None: """Stop execution Terminates all analysis jobs related to this execution diff --git a/cirro_api_client/v1/api/feed/__init__.py b/cirro_api_client/v1/api/feed/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/feed/__init__.py +++ b/cirro_api_client/v1/api/feed/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/feed/create_discussion.py b/cirro_api_client/v1/api/feed/create_discussion.py index bfd2df6..3c6de71 100644 --- a/cirro_api_client/v1/api/feed/create_discussion.py +++ b/cirro_api_client/v1/api/feed/create_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: DiscussionInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/discussions", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: + if response.status_code == 200: response_200 = Discussion.from_dict(response.json()) return response_200 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: DiscussionInput, -) -> Optional[Discussion]: +) -> Discussion | None: """Create a discussion Creates a new discussion for an entity @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: DiscussionInput, -) -> Optional[Discussion]: +) -> Discussion | None: """Create a discussion Creates a new discussion for an entity diff --git a/cirro_api_client/v1/api/feed/delete_discussion.py b/cirro_api_client/v1/api/feed/delete_discussion.py index 3d05435..8e9df65 100644 --- a/cirro_api_client/v1/api/feed/delete_discussion.py +++ b/cirro_api_client/v1/api/feed/delete_discussion.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( discussion_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/discussions/{discussion_id}", + "url": "/discussions/{discussion_id}".format( + discussion_id=quote(str(discussion_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/feed/delete_message.py b/cirro_api_client/v1/api/feed/delete_message.py index 43b9111..25776ca 100644 --- a/cirro_api_client/v1/api/feed/delete_message.py +++ b/cirro_api_client/v1/api/feed/delete_message.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( discussion_id: str, message_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/discussions/{discussion_id}/messages/{message_id}", + "url": "/discussions/{discussion_id}/messages/{message_id}".format( + discussion_id=quote(str(discussion_id), safe=""), + message_id=quote(str(message_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/feed/get_discussion.py b/cirro_api_client/v1/api/feed/get_discussion.py index b88f956..6d59de4 100644 --- a/cirro_api_client/v1/api/feed/get_discussion.py +++ b/cirro_api_client/v1/api/feed/get_discussion.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( discussion_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/discussions/{discussion_id}", + "url": "/discussions/{discussion_id}".format( + discussion_id=quote(str(discussion_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: + if response.status_code == 200: response_200 = Discussion.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( discussion_id: str, *, client: Client, -) -> Optional[Discussion]: +) -> Discussion | None: """Get a discussion Retrieves a discussion by its ID @@ -135,7 +138,7 @@ async def asyncio( discussion_id: str, *, client: Client, -) -> Optional[Discussion]: +) -> Discussion | None: """Get a discussion Retrieves a discussion by its ID diff --git a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py index f38afa5..e889954 100644 --- a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py +++ b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -15,18 +15,18 @@ def _get_kwargs( *, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + order: None | SortOrder | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} json_entity_type = entity_type.value params["entityType"] = json_entity_type params["entityId"] = entity_id - json_next_token: Union[None, Unset, str] + json_next_token: None | str | Unset if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -35,7 +35,7 @@ def _get_kwargs( params["limit"] = limit - json_order: Union[None, Unset, str] + json_order: None | str | Unset if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -46,7 +46,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/discussions", "params": params, @@ -55,8 +55,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDiscussion]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDiscussion | None: + if response.status_code == 200: response_200 = PaginatedResponseDiscussion.from_dict(response.json()) return response_200 @@ -78,9 +78,9 @@ def sync_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -89,9 +89,9 @@ def sync_detailed( Args: entity_type (EntityType): entity_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -123,10 +123,10 @@ def sync( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseDiscussion]: + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseDiscussion | None: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID @@ -134,9 +134,9 @@ def sync( Args: entity_type (EntityType): entity_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -165,9 +165,9 @@ async def asyncio_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -176,9 +176,9 @@ async def asyncio_detailed( Args: entity_type (EntityType): entity_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -207,10 +207,10 @@ async def asyncio( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseDiscussion]: + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseDiscussion | None: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID @@ -218,9 +218,9 @@ async def asyncio( Args: entity_type (EntityType): entity_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py index 19be2ed..8541826 100644 --- a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py +++ b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -13,14 +14,14 @@ def _get_kwargs( discussion_id: str, *, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} - - json_next_token: Union[None, Unset, str] + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + thread_id: None | str | Unset = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + json_next_token: None | str | Unset if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -29,14 +30,14 @@ def _get_kwargs( params["limit"] = limit - json_thread_id: Union[None, Unset, str] + json_thread_id: None | str | Unset if isinstance(thread_id, Unset): json_thread_id = UNSET else: json_thread_id = thread_id params["threadId"] = json_thread_id - json_order: Union[None, Unset, str] + json_order: None | str | Unset if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -47,17 +48,19 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/discussions/{discussion_id}/messages", + "url": "/discussions/{discussion_id}/messages".format( + discussion_id=quote(str(discussion_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseMessage]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseMessage | None: + if response.status_code == 200: response_200 = PaginatedResponseMessage.from_dict(response.json()) return response_200 @@ -78,10 +81,10 @@ def sync_detailed( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + thread_id: None | str | Unset = UNSET, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -89,10 +92,10 @@ def sync_detailed( Args: discussion_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - thread_id (Union[None, Unset, str]): - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + thread_id (None | str | Unset): + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -123,21 +126,21 @@ def sync( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseMessage]: + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + thread_id: None | str | Unset = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseMessage | None: """Get messages for a discussion Retrieves all messages associated with a specific discussion Args: discussion_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - thread_id (Union[None, Unset, str]): - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + thread_id (None | str | Unset): + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -165,10 +168,10 @@ async def asyncio_detailed( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + thread_id: None | str | Unset = UNSET, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -176,10 +179,10 @@ async def asyncio_detailed( Args: discussion_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - thread_id (Union[None, Unset, str]): - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + thread_id (None | str | Unset): + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: @@ -207,21 +210,21 @@ async def asyncio( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseMessage]: + next_token: None | str | Unset = UNSET, + limit: int | Unset = 5000, + thread_id: None | str | Unset = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseMessage | None: """Get messages for a discussion Retrieves all messages associated with a specific discussion Args: discussion_id (str): - next_token (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - thread_id (Union[None, Unset, str]): - order (Union[None, SortOrder, Unset]): + next_token (None | str | Unset): + limit (int | Unset): Default: 5000. + thread_id (None | str | Unset): + order (None | SortOrder | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/feed/post_message.py b/cirro_api_client/v1/api/feed/post_message.py index a876441..4263b9b 100644 --- a/cirro_api_client/v1/api/feed/post_message.py +++ b/cirro_api_client/v1/api/feed/post_message.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( discussion_id: str, *, body: MessageInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/discussions/{discussion_id}/messages", + "url": "/discussions/{discussion_id}/messages".format( + discussion_id=quote(str(discussion_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/feed/update_discussion.py b/cirro_api_client/v1/api/feed/update_discussion.py index b45f636..10a0f5f 100644 --- a/cirro_api_client/v1/api/feed/update_discussion.py +++ b/cirro_api_client/v1/api/feed/update_discussion.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( discussion_id: str, *, body: DiscussionInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/discussions/{discussion_id}", + "url": "/discussions/{discussion_id}".format( + discussion_id=quote(str(discussion_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/feed/update_message.py b/cirro_api_client/v1/api/feed/update_message.py index 1553b47..07408d0 100644 --- a/cirro_api_client/v1/api/feed/update_message.py +++ b/cirro_api_client/v1/api/feed/update_message.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( message_id: str, *, body: MessageInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/discussions/{discussion_id}/messages/{message_id}", + "url": "/discussions/{discussion_id}/messages/{message_id}".format( + discussion_id=quote(str(discussion_id), safe=""), + message_id=quote(str(message_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/file/__init__.py b/cirro_api_client/v1/api/file/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/file/__init__.py +++ b/cirro_api_client/v1/api/file/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py index d639ff0..2df1843 100644 --- a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( requirement_id: str, *, body: GovernanceFileAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/governance/requirements/{requirement_id}/s3-token", + "url": "/governance/requirements/{requirement_id}/s3-token".format( + requirement_id=quote(str(requirement_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: + if response.status_code == 200: response_200 = AWSCredentials.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: GovernanceFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create governance file access token Generates credentials used for connecting via S3 @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: GovernanceFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create governance file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_file_access_token.py b/cirro_api_client/v1/api/file/generate_project_file_access_token.py index 3d6ecf9..441580c 100644 --- a/cirro_api_client/v1/api/file/generate_project_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_project_file_access_token.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: ProjectFileAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/s3-token", + "url": "/projects/{project_id}/s3-token".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: + if response.status_code == 200: response_200 = AWSCredentials.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ProjectFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create project file access token Generates credentials used for connecting via S3 @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ProjectFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create project file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_sftp_token.py b/cirro_api_client/v1/api/file/generate_project_sftp_token.py index 6109aef..85d4916 100644 --- a/cirro_api_client/v1/api/file/generate_project_sftp_token.py +++ b/cirro_api_client/v1/api/file/generate_project_sftp_token.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: GenerateSftpCredentialsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/sftp-token", + "url": "/projects/{project_id}/sftp-token".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SftpCredentials]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> SftpCredentials | None: + if response.status_code == 200: response_200 = SftpCredentials.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> Optional[SftpCredentials]: +) -> SftpCredentials | None: """Create project SFTP Token Generates credentials used for connecting via SFTP @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> Optional[SftpCredentials]: +) -> SftpCredentials | None: """Create project SFTP Token Generates credentials used for connecting via SFTP diff --git a/cirro_api_client/v1/api/governance/__init__.py b/cirro_api_client/v1/api/governance/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/governance/__init__.py +++ b/cirro_api_client/v1/api/governance/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/governance/create_classification.py b/cirro_api_client/v1/api/governance/create_classification.py index 4c76fb3..80ea0f2 100644 --- a/cirro_api_client/v1/api/governance/create_classification.py +++ b/cirro_api_client/v1/api/governance/create_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: ClassificationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/classifications", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: + if response.status_code == 201: response_201 = GovernanceClassification.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Create classification Creates a classification @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Create classification Creates a classification diff --git a/cirro_api_client/v1/api/governance/create_contact.py b/cirro_api_client/v1/api/governance/create_contact.py index a0b2aa9..54d27af 100644 --- a/cirro_api_client/v1/api/governance/create_contact.py +++ b/cirro_api_client/v1/api/governance/create_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: ContactInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/contacts", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: + if response.status_code == 201: response_201 = GovernanceContact.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Create contact Creates a contact @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Create contact Creates a contact diff --git a/cirro_api_client/v1/api/governance/create_requirement.py b/cirro_api_client/v1/api/governance/create_requirement.py index c70a7af..1324e6e 100644 --- a/cirro_api_client/v1/api/governance/create_requirement.py +++ b/cirro_api_client/v1/api/governance/create_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: RequirementInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/requirements", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: + if response.status_code == 201: response_201 = GovernanceRequirement.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Create requirement Creates a requirement @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Create requirement Creates a requirement diff --git a/cirro_api_client/v1/api/governance/delete_classification.py b/cirro_api_client/v1/api/governance/delete_classification.py index 288a218..dd540a3 100644 --- a/cirro_api_client/v1/api/governance/delete_classification.py +++ b/cirro_api_client/v1/api/governance/delete_classification.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( classification_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/governance/classifications/{classification_id}", + "url": "/governance/classifications/{classification_id}".format( + classification_id=quote(str(classification_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/governance/delete_contact.py b/cirro_api_client/v1/api/governance/delete_contact.py index 1edbb37..f6053ed 100644 --- a/cirro_api_client/v1/api/governance/delete_contact.py +++ b/cirro_api_client/v1/api/governance/delete_contact.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( contact_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/governance/contacts/{contact_id}", + "url": "/governance/contacts/{contact_id}".format( + contact_id=quote(str(contact_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/governance/delete_requirement.py b/cirro_api_client/v1/api/governance/delete_requirement.py index f9d607c..c0c5d1a 100644 --- a/cirro_api_client/v1/api/governance/delete_requirement.py +++ b/cirro_api_client/v1/api/governance/delete_requirement.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( requirement_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/governance/requirements/{requirement_id}", + "url": "/governance/requirements/{requirement_id}".format( + requirement_id=quote(str(requirement_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/governance/fulfill_requirement.py b/cirro_api_client/v1/api/governance/fulfill_requirement.py index 84b708e..7a0f631 100644 --- a/cirro_api_client/v1/api/governance/fulfill_requirement.py +++ b/cirro_api_client/v1/api/governance/fulfill_requirement.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -15,25 +16,27 @@ def _get_kwargs( requirement_id: str, *, body: RequirementFulfillmentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/governance/projects/{project_id}/requirements/{requirement_id}:fulfill", + "url": "/governance/projects/{project_id}/requirements/{requirement_id}:fulfill".format( + project_id=quote(str(project_id), safe=""), + requirement_id=quote(str(requirement_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FulfillmentResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> FulfillmentResponse | None: + if response.status_code == 200: response_200 = FulfillmentResponse.from_dict(response.json()) return response_200 @@ -95,7 +98,7 @@ def sync( *, client: Client, body: RequirementFulfillmentInput, -) -> Optional[FulfillmentResponse]: +) -> FulfillmentResponse | None: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement @@ -167,7 +170,7 @@ async def asyncio( *, client: Client, body: RequirementFulfillmentInput, -) -> Optional[FulfillmentResponse]: +) -> FulfillmentResponse | None: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_classification.py b/cirro_api_client/v1/api/governance/get_classification.py index 5a0ee2b..f4d9842 100644 --- a/cirro_api_client/v1/api/governance/get_classification.py +++ b/cirro_api_client/v1/api/governance/get_classification.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( classification_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/governance/classifications/{classification_id}", + "url": "/governance/classifications/{classification_id}".format( + classification_id=quote(str(classification_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: + if response.status_code == 200: response_200 = GovernanceClassification.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( classification_id: str, *, client: Client, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Get a classification Retrieve a data classification @@ -135,7 +138,7 @@ async def asyncio( classification_id: str, *, client: Client, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Get a classification Retrieve a data classification diff --git a/cirro_api_client/v1/api/governance/get_classifications.py b/cirro_api_client/v1/api/governance/get_classifications.py index 4e1299b..cb6639b 100644 --- a/cirro_api_client/v1/api/governance/get_classifications.py +++ b/cirro_api_client/v1/api/governance/get_classifications.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/classifications", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceClassification"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[GovernanceClassification] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceClassification"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[GovernanceClassification]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["GovernanceClassification"]]: +) -> Response[list[GovernanceClassification]]: """Get classifications Retrieve a list of data classifications @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceClassification']] + Response[list[GovernanceClassification]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["GovernanceClassification"]]: +) -> list[GovernanceClassification] | None: """Get classifications Retrieve a list of data classifications @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceClassification'] + list[GovernanceClassification] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["GovernanceClassification"]]: +) -> Response[list[GovernanceClassification]]: """Get classifications Retrieve a list of data classifications @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceClassification']] + Response[list[GovernanceClassification]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["GovernanceClassification"]]: +) -> list[GovernanceClassification] | None: """Get classifications Retrieve a list of data classifications @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceClassification'] + list[GovernanceClassification] """ try: diff --git a/cirro_api_client/v1/api/governance/get_contact.py b/cirro_api_client/v1/api/governance/get_contact.py index fb1ed4a..42055a2 100644 --- a/cirro_api_client/v1/api/governance/get_contact.py +++ b/cirro_api_client/v1/api/governance/get_contact.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( contact_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/governance/contacts/{contact_id}", + "url": "/governance/contacts/{contact_id}".format( + contact_id=quote(str(contact_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: + if response.status_code == 200: response_200 = GovernanceContact.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( contact_id: str, *, client: Client, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Get a contact Retrieve a governance contact @@ -135,7 +138,7 @@ async def asyncio( contact_id: str, *, client: Client, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Get a contact Retrieve a governance contact diff --git a/cirro_api_client/v1/api/governance/get_contacts.py b/cirro_api_client/v1/api/governance/get_contacts.py index ea6c3ee..0a7c6a0 100644 --- a/cirro_api_client/v1/api/governance/get_contacts.py +++ b/cirro_api_client/v1/api/governance/get_contacts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/contacts", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceContact"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[GovernanceContact] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceContact"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[GovernanceContact]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["GovernanceContact"]]: +) -> Response[list[GovernanceContact]]: """Get contacts Retrieve a list of governance contacts @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceContact']] + Response[list[GovernanceContact]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["GovernanceContact"]]: +) -> list[GovernanceContact] | None: """Get contacts Retrieve a list of governance contacts @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceContact'] + list[GovernanceContact] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["GovernanceContact"]]: +) -> Response[list[GovernanceContact]]: """Get contacts Retrieve a list of governance contacts @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceContact']] + Response[list[GovernanceContact]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["GovernanceContact"]]: +) -> list[GovernanceContact] | None: """Get contacts Retrieve a list of governance contacts @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceContact'] + list[GovernanceContact] """ try: diff --git a/cirro_api_client/v1/api/governance/get_requirement.py b/cirro_api_client/v1/api/governance/get_requirement.py index 961348f..4262186 100644 --- a/cirro_api_client/v1/api/governance/get_requirement.py +++ b/cirro_api_client/v1/api/governance/get_requirement.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( requirement_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/governance/requirements/{requirement_id}", + "url": "/governance/requirements/{requirement_id}".format( + requirement_id=quote(str(requirement_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: + if response.status_code == 200: response_200 = GovernanceRequirement.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( requirement_id: str, *, client: Client, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Get a requirement Retrieve a governance requirement @@ -135,7 +138,7 @@ async def asyncio( requirement_id: str, *, client: Client, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Get a requirement Retrieve a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_requirements.py b/cirro_api_client/v1/api/governance/get_requirements.py index 162e6cf..b520036 100644 --- a/cirro_api_client/v1/api/governance/get_requirements.py +++ b/cirro_api_client/v1/api/governance/get_requirements.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - project_id: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + project_id: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["projectId"] = project_id params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/requirements", "params": params, @@ -28,8 +28,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceRequirement"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[GovernanceRequirement] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[GovernanceRequirement]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,14 +54,14 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Response[List["GovernanceRequirement"]]: + project_id: str | Unset = UNSET, +) -> Response[list[GovernanceRequirement]]: """Get requirements Retrieve a list of governance requirements Args: - project_id (Union[Unset, str]): + project_id (str | Unset): client (Client): instance of the API client Raises: @@ -69,7 +69,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceRequirement']] + Response[list[GovernanceRequirement]] """ kwargs = _get_kwargs( @@ -87,14 +87,14 @@ def sync_detailed( def sync( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Optional[List["GovernanceRequirement"]]: + project_id: str | Unset = UNSET, +) -> list[GovernanceRequirement] | None: """Get requirements Retrieve a list of governance requirements Args: - project_id (Union[Unset, str]): + project_id (str | Unset): client (Client): instance of the API client Raises: @@ -102,7 +102,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceRequirement'] + list[GovernanceRequirement] """ try: @@ -117,14 +117,14 @@ def sync( async def asyncio_detailed( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Response[List["GovernanceRequirement"]]: + project_id: str | Unset = UNSET, +) -> Response[list[GovernanceRequirement]]: """Get requirements Retrieve a list of governance requirements Args: - project_id (Union[Unset, str]): + project_id (str | Unset): client (Client): instance of the API client Raises: @@ -132,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['GovernanceRequirement']] + Response[list[GovernanceRequirement]] """ kwargs = _get_kwargs( @@ -147,14 +147,14 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Optional[List["GovernanceRequirement"]]: + project_id: str | Unset = UNSET, +) -> list[GovernanceRequirement] | None: """Get requirements Retrieve a list of governance requirements Args: - project_id (Union[Unset, str]): + project_id (str | Unset): client (Client): instance of the API client Raises: @@ -162,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['GovernanceRequirement'] + list[GovernanceRequirement] """ try: diff --git a/cirro_api_client/v1/api/governance/get_requirements_by_project.py b/cirro_api_client/v1/api/governance/get_requirements_by_project.py index 3a9f0e4..2a42144 100644 --- a/cirro_api_client/v1/api/governance/get_requirements_by_project.py +++ b/cirro_api_client/v1/api/governance/get_requirements_by_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -12,25 +13,27 @@ def _get_kwargs( project_id: str, *, - username: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["username"] = username params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/governance/projects/{project_id}/requirements", + "url": "/governance/projects/{project_id}/requirements".format( + project_id=quote(str(project_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectRequirement"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ProjectRequirement] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -43,7 +46,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ProjectRequirement]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,15 +59,15 @@ def sync_detailed( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Response[List["ProjectRequirement"]]: + username: str | Unset = UNSET, +) -> Response[list[ProjectRequirement]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user Args: project_id (str): - username (Union[Unset, str]): + username (str | Unset): client (Client): instance of the API client Raises: @@ -72,7 +75,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectRequirement']] + Response[list[ProjectRequirement]] """ kwargs = _get_kwargs( @@ -92,15 +95,15 @@ def sync( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Optional[List["ProjectRequirement"]]: + username: str | Unset = UNSET, +) -> list[ProjectRequirement] | None: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user Args: project_id (str): - username (Union[Unset, str]): + username (str | Unset): client (Client): instance of the API client Raises: @@ -108,7 +111,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectRequirement'] + list[ProjectRequirement] """ try: @@ -125,15 +128,15 @@ async def asyncio_detailed( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Response[List["ProjectRequirement"]]: + username: str | Unset = UNSET, +) -> Response[list[ProjectRequirement]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user Args: project_id (str): - username (Union[Unset, str]): + username (str | Unset): client (Client): instance of the API client Raises: @@ -141,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectRequirement']] + Response[list[ProjectRequirement]] """ kwargs = _get_kwargs( @@ -158,15 +161,15 @@ async def asyncio( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Optional[List["ProjectRequirement"]]: + username: str | Unset = UNSET, +) -> list[ProjectRequirement] | None: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user Args: project_id (str): - username (Union[Unset, str]): + username (str | Unset): client (Client): instance of the API client Raises: @@ -174,7 +177,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectRequirement'] + list[ProjectRequirement] """ try: diff --git a/cirro_api_client/v1/api/governance/update_classification.py b/cirro_api_client/v1/api/governance/update_classification.py index fdcb2e7..b6f149e 100644 --- a/cirro_api_client/v1/api/governance/update_classification.py +++ b/cirro_api_client/v1/api/governance/update_classification.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( classification_id: str, *, body: ClassificationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/governance/classifications/{classification_id}", + "url": "/governance/classifications/{classification_id}".format( + classification_id=quote(str(classification_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: + if response.status_code == 200: response_200 = GovernanceClassification.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Update classification Updates a classification @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Update classification Updates a classification diff --git a/cirro_api_client/v1/api/governance/update_contact.py b/cirro_api_client/v1/api/governance/update_contact.py index 2f704f1..1591a4b 100644 --- a/cirro_api_client/v1/api/governance/update_contact.py +++ b/cirro_api_client/v1/api/governance/update_contact.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( contact_id: str, *, body: ContactInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/governance/contacts/{contact_id}", + "url": "/governance/contacts/{contact_id}".format( + contact_id=quote(str(contact_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: + if response.status_code == 200: response_200 = GovernanceContact.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Update contact Updates a contact @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Update contact Updates a contact diff --git a/cirro_api_client/v1/api/governance/update_requirement.py b/cirro_api_client/v1/api/governance/update_requirement.py index 25598be..5afe0b3 100644 --- a/cirro_api_client/v1/api/governance/update_requirement.py +++ b/cirro_api_client/v1/api/governance/update_requirement.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( requirement_id: str, *, body: RequirementInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/governance/requirements/{requirement_id}", + "url": "/governance/requirements/{requirement_id}".format( + requirement_id=quote(str(requirement_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: + if response.status_code == 200: response_200 = GovernanceRequirement.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Update requirement Updates a requirement @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Update requirement Updates a requirement diff --git a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py index 6022409..d379331 100644 --- a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py +++ b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( project_id: str, *, body: GovernanceFileInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/governance/requirements/{requirement_id}/projects/{project_id}", + "url": "/governance/requirements/{requirement_id}/projects/{project_id}".format( + requirement_id=quote(str(requirement_id), safe=""), + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/metadata/__init__.py b/cirro_api_client/v1/api/metadata/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/metadata/__init__.py +++ b/cirro_api_client/v1/api/metadata/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/metadata/get_dataset_samples.py b/cirro_api_client/v1/api/metadata/get_dataset_samples.py index bd4d0bb..b073f88 100644 --- a/cirro_api_client/v1/api/metadata/get_dataset_samples.py +++ b/cirro_api_client/v1/api/metadata/get_dataset_samples.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/datasets/{dataset_id}/samples", + "url": "/projects/{project_id}/datasets/{dataset_id}/samples".format( + project_id=quote(str(project_id), safe=""), + dataset_id=quote(str(dataset_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Sample"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Sample] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -35,7 +39,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Sample"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Sample]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +53,7 @@ def sync_detailed( dataset_id: str, *, client: Client, -) -> Response[List["Sample"]]: +) -> Response[list[Sample]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -64,7 +68,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Sample']] + Response[list[Sample]] """ kwargs = _get_kwargs( @@ -85,7 +89,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[List["Sample"]]: +) -> list[Sample] | None: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -100,7 +104,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Sample'] + list[Sample] """ try: @@ -118,7 +122,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, -) -> Response[List["Sample"]]: +) -> Response[list[Sample]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -133,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Sample']] + Response[list[Sample]] """ kwargs = _get_kwargs( @@ -151,7 +155,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[List["Sample"]]: +) -> list[Sample] | None: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -166,7 +170,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Sample'] + list[Sample] """ try: diff --git a/cirro_api_client/v1/api/metadata/get_project_samples.py b/cirro_api_client/v1/api/metadata/get_project_samples.py index 39445d4..3d79ffc 100644 --- a/cirro_api_client/v1/api/metadata/get_project_samples.py +++ b/cirro_api_client/v1/api/metadata/get_project_samples.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,10 @@ def _get_kwargs( project_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -23,17 +24,19 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/samples", + "url": "/projects/{project_id}/samples".format( + project_id=quote(str(project_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseSampleDto]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseSampleDto | None: + if response.status_code == 200: response_200 = PaginatedResponseSampleDto.from_dict(response.json()) return response_200 @@ -54,8 +57,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -63,8 +66,8 @@ def sync_detailed( Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -93,17 +96,17 @@ def sync( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseSampleDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseSampleDto | None: """Get project samples Retrieves a list of samples associated with a project along with their metadata Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -129,8 +132,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -138,8 +141,8 @@ async def asyncio_detailed( Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -165,17 +168,17 @@ async def asyncio( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseSampleDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseSampleDto | None: """Get project samples Retrieves a list of samples associated with a project along with their metadata Args: project_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/metadata/get_project_schema.py b/cirro_api_client/v1/api/metadata/get_project_schema.py index 33f1341..314e619 100644 --- a/cirro_api_client/v1/api/metadata/get_project_schema.py +++ b/cirro_api_client/v1/api/metadata/get_project_schema.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/schema", + "url": "/projects/{project_id}/schema".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: + if response.status_code == 200: response_200 = FormSchema.from_dict(response.json()) return response_200 @@ -73,7 +76,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get project metadata schema Args: @@ -129,7 +132,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get project metadata schema Args: diff --git a/cirro_api_client/v1/api/metadata/get_sample_by_id.py b/cirro_api_client/v1/api/metadata/get_sample_by_id.py index fc26e9f..9838915 100644 --- a/cirro_api_client/v1/api/metadata/get_sample_by_id.py +++ b/cirro_api_client/v1/api/metadata/get_sample_by_id.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, sample_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/samples/{sample_id}", + "url": "/projects/{project_id}/samples/{sample_id}".format( + project_id=quote(str(project_id), safe=""), + sample_id=quote(str(sample_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: + if response.status_code == 200: response_200 = Sample.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( sample_id: str, *, client: Client, -) -> Optional[Sample]: +) -> Sample | None: """Get sample by ID Retrieves a sample by its ID along with its metadata @@ -146,7 +150,7 @@ async def asyncio( sample_id: str, *, client: Client, -) -> Optional[Sample]: +) -> Sample | None: """Get sample by ID Retrieves a sample by its ID along with its metadata diff --git a/cirro_api_client/v1/api/metadata/update_project_schema.py b/cirro_api_client/v1/api/metadata/update_project_schema.py index 90ede66..3a607c7 100644 --- a/cirro_api_client/v1/api/metadata/update_project_schema.py +++ b/cirro_api_client/v1/api/metadata/update_project_schema.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( project_id: str, *, body: FormSchema, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/schema", + "url": "/projects/{project_id}/schema".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/metadata/update_sample.py b/cirro_api_client/v1/api/metadata/update_sample.py index a6ead4d..571bef1 100644 --- a/cirro_api_client/v1/api/metadata/update_sample.py +++ b/cirro_api_client/v1/api/metadata/update_sample.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -15,25 +16,27 @@ def _get_kwargs( sample_id: str, *, body: SampleRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/samples/{sample_id}", + "url": "/projects/{project_id}/samples/{sample_id}".format( + project_id=quote(str(project_id), safe=""), + sample_id=quote(str(sample_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: + if response.status_code == 200: response_200 = Sample.from_dict(response.json()) return response_200 @@ -95,7 +98,7 @@ def sync( *, client: Client, body: SampleRequest, -) -> Optional[Sample]: +) -> Sample | None: """Update sample Updates metadata on a sample @@ -167,7 +170,7 @@ async def asyncio( *, client: Client, body: SampleRequest, -) -> Optional[Sample]: +) -> Sample | None: """Update sample Updates metadata on a sample diff --git a/cirro_api_client/v1/api/metrics/__init__.py b/cirro_api_client/v1/api/metrics/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/metrics/__init__.py +++ b/cirro_api_client/v1/api/metrics/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/metrics/get_all_metrics.py b/cirro_api_client/v1/api/metrics/get_all_metrics.py index 3eef6ed..982f4c5 100644 --- a/cirro_api_client/v1/api/metrics/get_all_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_all_metrics.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/metrics", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectMetrics"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ProjectMetrics] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectMetrics"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ProjectMetrics]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ProjectMetrics"]]: +) -> Response[list[ProjectMetrics]]: """Get all project metrics Retrieves metrics for all projects. @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectMetrics']] + Response[list[ProjectMetrics]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ProjectMetrics"]]: +) -> list[ProjectMetrics] | None: """Get all project metrics Retrieves metrics for all projects. @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectMetrics'] + list[ProjectMetrics] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ProjectMetrics"]]: +) -> Response[list[ProjectMetrics]]: """Get all project metrics Retrieves metrics for all projects. @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectMetrics']] + Response[list[ProjectMetrics]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ProjectMetrics"]]: +) -> list[ProjectMetrics] | None: """Get all project metrics Retrieves metrics for all projects. @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectMetrics'] + list[ProjectMetrics] """ try: diff --git a/cirro_api_client/v1/api/metrics/get_project_metrics.py b/cirro_api_client/v1/api/metrics/get_project_metrics.py index cc15a35..30de0a4 100644 --- a/cirro_api_client/v1/api/metrics/get_project_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_project_metrics.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/metrics", + "url": "/projects/{project_id}/metrics".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectMetrics]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectMetrics | None: + if response.status_code == 200: response_200 = ProjectMetrics.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[ProjectMetrics]: +) -> ProjectMetrics | None: """Get project metrics Retrieves metrics about a project. @@ -135,7 +138,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[ProjectMetrics]: +) -> ProjectMetrics | None: """Get project metrics Retrieves metrics about a project. diff --git a/cirro_api_client/v1/api/notebooks/__init__.py b/cirro_api_client/v1/api/notebooks/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/notebooks/__init__.py +++ b/cirro_api_client/v1/api/notebooks/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py index 4901f88..f34d3a0 100644 --- a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: CreateNotebookInstanceRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/notebook-instances", + "url": "/projects/{project_id}/notebook-instances".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: CreateNotebookInstanceRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create notebook instance Creates a notebook instance within the project @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: CreateNotebookInstanceRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create notebook instance Creates a notebook instance within the project diff --git a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py index b0f82cb..3744161 100644 --- a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}", + "url": "/projects/{project_id}/notebook-instances/{notebook_instance_id}".format( + project_id=quote(str(project_id), safe=""), + notebook_instance_id=quote(str(notebook_instance_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py index 61c7c54..8d7633e 100644 --- a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py +++ b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:generate-url", + "url": "/projects/{project_id}/notebook-instances/{notebook_instance_id}:generate-url".format( + project_id=quote(str(project_id), safe=""), + notebook_instance_id=quote(str(notebook_instance_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OpenNotebookInstanceResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> OpenNotebookInstanceResponse | None: + if response.status_code == 200: response_200 = OpenNotebookInstanceResponse.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> Optional[OpenNotebookInstanceResponse]: +) -> OpenNotebookInstanceResponse | None: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser @@ -146,7 +150,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> Optional[OpenNotebookInstanceResponse]: +) -> OpenNotebookInstanceResponse | None: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py index fe4cce1..a1300b7 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:status", + "url": "/projects/{project_id}/notebook-instances/{notebook_instance_id}:status".format( + project_id=quote(str(project_id), safe=""), + notebook_instance_id=quote(str(notebook_instance_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[NotebookInstanceStatusResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> NotebookInstanceStatusResponse | None: + if response.status_code == 200: response_200 = NotebookInstanceStatusResponse.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> Optional[NotebookInstanceStatusResponse]: +) -> NotebookInstanceStatusResponse | None: """Get notebook instance status Retrieves the status of the instance @@ -146,7 +150,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> Optional[NotebookInstanceStatusResponse]: +) -> NotebookInstanceStatusResponse | None: """Get notebook instance status Retrieves the status of the instance diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py index ccaa23e..39b7e9d 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/notebook-instances", + "url": "/projects/{project_id}/notebook-instances".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["NotebookInstance"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[NotebookInstance] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["NotebookInstance"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[NotebookInstance]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["NotebookInstance"]]: +) -> Response[list[NotebookInstance]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['NotebookInstance']] + Response[list[NotebookInstance]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["NotebookInstance"]]: +) -> list[NotebookInstance] | None: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['NotebookInstance'] + list[NotebookInstance] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["NotebookInstance"]]: +) -> Response[list[NotebookInstance]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['NotebookInstance']] + Response[list[NotebookInstance]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["NotebookInstance"]]: +) -> list[NotebookInstance] | None: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['NotebookInstance'] + list[NotebookInstance] """ try: diff --git a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py index 95ab1d4..04412fb 100644 --- a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:stop", + "url": "/projects/{project_id}/notebook-instances/{notebook_instance_id}:stop".format( + project_id=quote(str(project_id), safe=""), + notebook_instance_id=quote(str(notebook_instance_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/processes/__init__.py b/cirro_api_client/v1/api/processes/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/processes/__init__.py +++ b/cirro_api_client/v1/api/processes/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/processes/archive_custom_process.py b/cirro_api_client/v1/api/processes/archive_custom_process.py index 3056c40..f0b8fad 100644 --- a/cirro_api_client/v1/api/processes/archive_custom_process.py +++ b/cirro_api_client/v1/api/processes/archive_custom_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/processes/{process_id}", + "url": "/processes/{process_id}".format( + process_id=quote(str(process_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py index 4d6f63f..858e3ab 100644 --- a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py +++ b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( process_id: str, *, body: CalculatePipelineCostRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/processes/{process_id}/cost", + "url": "/processes/{process_id}/cost".format( + process_id=quote(str(process_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PipelineCost]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PipelineCost | None: + if response.status_code == 200: response_200 = PipelineCost.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: CalculatePipelineCostRequest, -) -> Optional[PipelineCost]: +) -> PipelineCost | None: """Calculate pipeline cost Retrieves the cost of running the pipeline @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: CalculatePipelineCostRequest, -) -> Optional[PipelineCost]: +) -> PipelineCost | None: """Calculate pipeline cost Retrieves the cost of running the pipeline diff --git a/cirro_api_client/v1/api/processes/create_custom_process.py b/cirro_api_client/v1/api/processes/create_custom_process.py index f0e4ad2..3f401e2 100644 --- a/cirro_api_client/v1/api/processes/create_custom_process.py +++ b/cirro_api_client/v1/api/processes/create_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -15,17 +15,16 @@ def _get_kwargs( *, body: CustomProcessInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/processes", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers @@ -34,26 +33,28 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: - if response.status_code == HTTPStatus.BAD_REQUEST: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: + if response.status_code == 201: + response_201 = CreateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: response_400 = PortalErrorResponse.from_dict(response.json()) return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: + + if response.status_code == 401: response_401 = ErrorMessage.from_dict(response.json()) return response_401 - if response.status_code == HTTPStatus.CREATED: - response_201 = CreateResponse.from_dict(response.json()) - - return response_201 errors.handle_error_response(response, client.raise_on_unexpected_status) def _build_response( *, client: Client, response: httpx.Response -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +67,7 @@ def sync_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -80,7 +81,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]] + Response[CreateResponse | ErrorMessage | PortalErrorResponse] """ kwargs = _get_kwargs( @@ -99,7 +100,7 @@ def sync( *, client: Client, body: CustomProcessInput, -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -113,7 +114,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CreateResponse, ErrorMessage, PortalErrorResponse] + CreateResponse | ErrorMessage | PortalErrorResponse """ try: @@ -129,7 +130,7 @@ async def asyncio_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -143,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]] + Response[CreateResponse | ErrorMessage | PortalErrorResponse] """ kwargs = _get_kwargs( @@ -159,7 +160,7 @@ async def asyncio( *, client: Client, body: CustomProcessInput, -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -173,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CreateResponse, ErrorMessage, PortalErrorResponse] + CreateResponse | ErrorMessage | PortalErrorResponse """ try: diff --git a/cirro_api_client/v1/api/processes/get_process.py b/cirro_api_client/v1/api/processes/get_process.py index 476b368..650964c 100644 --- a/cirro_api_client/v1/api/processes/get_process.py +++ b/cirro_api_client/v1/api/processes/get_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/processes/{process_id}", + "url": "/processes/{process_id}".format( + process_id=quote(str(process_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProcessDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ProcessDetail | None: + if response.status_code == 200: response_200 = ProcessDetail.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[ProcessDetail]: +) -> ProcessDetail | None: """Get process Retrieves detailed information on a process @@ -135,7 +138,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[ProcessDetail]: +) -> ProcessDetail | None: """Get process Retrieves detailed information on a process diff --git a/cirro_api_client/v1/api/processes/get_process_parameters.py b/cirro_api_client/v1/api/processes/get_process_parameters.py index 845473d..996ee9e 100644 --- a/cirro_api_client/v1/api/processes/get_process_parameters.py +++ b/cirro_api_client/v1/api/processes/get_process_parameters.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/processes/{process_id}/parameters", + "url": "/processes/{process_id}/parameters".format( + process_id=quote(str(process_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: + if response.status_code == 200: response_200 = FormSchema.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get process parameters Retrieves the input parameters for a process @@ -135,7 +138,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get process parameters Retrieves the input parameters for a process diff --git a/cirro_api_client/v1/api/processes/get_processes.py b/cirro_api_client/v1/api/processes/get_processes.py index 6eba6f9..c4cf3c0 100644 --- a/cirro_api_client/v1/api/processes/get_processes.py +++ b/cirro_api_client/v1/api/processes/get_processes.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_archived: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/processes", "params": params, @@ -28,8 +28,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Process"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Process] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Process"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Process]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,14 +54,14 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["Process"]]: + include_archived: bool | Unset = False, +) -> Response[list[Process]]: """List processes Retrieves a list of available processes Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -69,7 +69,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Process']] + Response[list[Process]] """ kwargs = _get_kwargs( @@ -87,14 +87,14 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["Process"]]: + include_archived: bool | Unset = False, +) -> list[Process] | None: """List processes Retrieves a list of available processes Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -102,7 +102,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Process'] + list[Process] """ try: @@ -117,14 +117,14 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["Process"]]: + include_archived: bool | Unset = False, +) -> Response[list[Process]]: """List processes Retrieves a list of available processes Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -132,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Process']] + Response[list[Process]] """ kwargs = _get_kwargs( @@ -147,14 +147,14 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["Process"]]: + include_archived: bool | Unset = False, +) -> list[Process] | None: """List processes Retrieves a list of available processes Args: - include_archived (Union[Unset, bool]): Default: False. + include_archived (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -162,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Process'] + list[Process] """ try: diff --git a/cirro_api_client/v1/api/processes/sync_custom_process.py b/cirro_api_client/v1/api/processes/sync_custom_process.py index 904daba..c9a8f4b 100644 --- a/cirro_api_client/v1/api/processes/sync_custom_process.py +++ b/cirro_api_client/v1/api/processes/sync_custom_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/processes/{process_id}:sync", + "url": "/processes/{process_id}:sync".format( + process_id=quote(str(process_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CustomPipelineSettings]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> CustomPipelineSettings | None: + if response.status_code == 200: response_200 = CustomPipelineSettings.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[CustomPipelineSettings]: +) -> CustomPipelineSettings | None: """Sync custom process Updates the process definition from the repository @@ -135,7 +138,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[CustomPipelineSettings]: +) -> CustomPipelineSettings | None: """Sync custom process Updates the process definition from the repository diff --git a/cirro_api_client/v1/api/processes/update_custom_process.py b/cirro_api_client/v1/api/processes/update_custom_process.py index 8de47b3..c2d4b79 100644 --- a/cirro_api_client/v1/api/processes/update_custom_process.py +++ b/cirro_api_client/v1/api/processes/update_custom_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( process_id: str, *, body: CustomProcessInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/processes/{process_id}", + "url": "/processes/{process_id}".format( + process_id=quote(str(process_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py index e7b213d..aa1e7b7 100644 --- a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py +++ b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( process_id: str, *, body: ValidateFileNamePatternsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/processes/{process_id}/validate-files:test", + "url": "/processes/{process_id}/validate-files:test".format( + process_id=quote(str(process_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["FileNameMatch"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[FileNameMatch] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -45,7 +47,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["FileNameMatch"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[FileNameMatch]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,7 +61,7 @@ def sync_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[List["FileNameMatch"]]: +) -> Response[list[FileNameMatch]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -74,7 +76,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['FileNameMatch']] + Response[list[FileNameMatch]] """ kwargs = _get_kwargs( @@ -95,7 +97,7 @@ def sync( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Optional[List["FileNameMatch"]]: +) -> list[FileNameMatch] | None: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -110,7 +112,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['FileNameMatch'] + list[FileNameMatch] """ try: @@ -128,7 +130,7 @@ async def asyncio_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[List["FileNameMatch"]]: +) -> Response[list[FileNameMatch]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -143,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['FileNameMatch']] + Response[list[FileNameMatch]] """ kwargs = _get_kwargs( @@ -161,7 +163,7 @@ async def asyncio( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Optional[List["FileNameMatch"]]: +) -> list[FileNameMatch] | None: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -176,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['FileNameMatch'] + list[FileNameMatch] """ try: diff --git a/cirro_api_client/v1/api/processes/validate_file_requirements.py b/cirro_api_client/v1/api/processes/validate_file_requirements.py index 21961f8..190063f 100644 --- a/cirro_api_client/v1/api/processes/validate_file_requirements.py +++ b/cirro_api_client/v1/api/processes/validate_file_requirements.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( process_id: str, *, body: ValidateFileRequirementsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/processes/{process_id}/validate-files", + "url": "/processes/{process_id}/validate-files".format( + process_id=quote(str(process_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FileRequirements]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> FileRequirements | None: + if response.status_code == 200: response_200 = FileRequirements.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ValidateFileRequirementsRequest, -) -> Optional[FileRequirements]: +) -> FileRequirements | None: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ValidateFileRequirementsRequest, -) -> Optional[FileRequirements]: +) -> FileRequirements | None: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) diff --git a/cirro_api_client/v1/api/project_requests/__init__.py b/cirro_api_client/v1/api/project_requests/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/project_requests/__init__.py +++ b/cirro_api_client/v1/api/project_requests/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/project_requests/create_project_request.py b/cirro_api_client/v1/api/project_requests/create_project_request.py index 84b0bc8..78b388d 100644 --- a/cirro_api_client/v1/api/project_requests/create_project_request.py +++ b/cirro_api_client/v1/api/project_requests/create_project_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: ProjectRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/project-requests", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: ProjectRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project request Request a new project to be created @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: ProjectRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project request Request a new project to be created diff --git a/cirro_api_client/v1/api/projects/__init__.py b/cirro_api_client/v1/api/projects/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/projects/__init__.py +++ b/cirro_api_client/v1/api/projects/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/projects/approve_access_request.py b/cirro_api_client/v1/api/projects/approve_access_request.py index 4d1e990..f69046e 100644 --- a/cirro_api_client/v1/api/projects/approve_access_request.py +++ b/cirro_api_client/v1/api/projects/approve_access_request.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( access_request_id: str, *, body: ApproveProjectAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/access-requests/{access_request_id}:approve", + "url": "/projects/{project_id}/access-requests/{access_request_id}:approve".format( + project_id=quote(str(project_id), safe=""), + access_request_id=quote(str(access_request_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/archive_project.py b/cirro_api_client/v1/api/projects/archive_project.py index 55710d9..245e109 100644 --- a/cirro_api_client/v1/api/projects/archive_project.py +++ b/cirro_api_client/v1/api/projects/archive_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}:archive", + "url": "/projects/{project_id}:archive".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/create_access_request.py b/cirro_api_client/v1/api/projects/create_access_request.py index d8b27d5..c1ea22b 100644 --- a/cirro_api_client/v1/api/projects/create_access_request.py +++ b/cirro_api_client/v1/api/projects/create_access_request.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: CreateProjectAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/access-requests", + "url": "/projects/{project_id}/access-requests".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: CreateProjectAccessRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create access request Creates an access request for the project @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: CreateProjectAccessRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create access request Creates an access request for the project diff --git a/cirro_api_client/v1/api/projects/create_project.py b/cirro_api_client/v1/api/projects/create_project.py index 9d79b22..44087ae 100644 --- a/cirro_api_client/v1/api/projects/create_project.py +++ b/cirro_api_client/v1/api/projects/create_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: ProjectInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/projects", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project Creates a project @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project Creates a project diff --git a/cirro_api_client/v1/api/projects/deny_access_request.py b/cirro_api_client/v1/api/projects/deny_access_request.py index 4232bd9..6ceccd2 100644 --- a/cirro_api_client/v1/api/projects/deny_access_request.py +++ b/cirro_api_client/v1/api/projects/deny_access_request.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, access_request_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/access-requests/{access_request_id}:deny", + "url": "/projects/{project_id}/access-requests/{access_request_id}:deny".format( + project_id=quote(str(project_id), safe=""), + access_request_id=quote(str(access_request_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/get_access_requests.py b/cirro_api_client/v1/api/projects/get_access_requests.py index b885748..75e77d9 100644 --- a/cirro_api_client/v1/api/projects/get_access_requests.py +++ b/cirro_api_client/v1/api/projects/get_access_requests.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -12,25 +13,27 @@ def _get_kwargs( project_id: str, *, - include_closed: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_closed: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeClosed"] = include_closed params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/access-requests", + "url": "/projects/{project_id}/access-requests".format( + project_id=quote(str(project_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectAccessRequest"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ProjectAccessRequest] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -43,7 +46,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectAccessRequest"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ProjectAccessRequest]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,15 +59,15 @@ def sync_detailed( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Response[List["ProjectAccessRequest"]]: + include_closed: bool | Unset = False, +) -> Response[list[ProjectAccessRequest]]: """Get access requests Gets users who have requested access to the project Args: project_id (str): - include_closed (Union[Unset, bool]): Default: False. + include_closed (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -72,7 +75,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectAccessRequest']] + Response[list[ProjectAccessRequest]] """ kwargs = _get_kwargs( @@ -92,15 +95,15 @@ def sync( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Optional[List["ProjectAccessRequest"]]: + include_closed: bool | Unset = False, +) -> list[ProjectAccessRequest] | None: """Get access requests Gets users who have requested access to the project Args: project_id (str): - include_closed (Union[Unset, bool]): Default: False. + include_closed (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -108,7 +111,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectAccessRequest'] + list[ProjectAccessRequest] """ try: @@ -125,15 +128,15 @@ async def asyncio_detailed( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Response[List["ProjectAccessRequest"]]: + include_closed: bool | Unset = False, +) -> Response[list[ProjectAccessRequest]]: """Get access requests Gets users who have requested access to the project Args: project_id (str): - include_closed (Union[Unset, bool]): Default: False. + include_closed (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -141,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectAccessRequest']] + Response[list[ProjectAccessRequest]] """ kwargs = _get_kwargs( @@ -158,15 +161,15 @@ async def asyncio( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Optional[List["ProjectAccessRequest"]]: + include_closed: bool | Unset = False, +) -> list[ProjectAccessRequest] | None: """Get access requests Gets users who have requested access to the project Args: project_id (str): - include_closed (Union[Unset, bool]): Default: False. + include_closed (bool | Unset): Default: False. client (Client): instance of the API client Raises: @@ -174,7 +177,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectAccessRequest'] + list[ProjectAccessRequest] """ try: diff --git a/cirro_api_client/v1/api/projects/get_discoverable_projects.py b/cirro_api_client/v1/api/projects/get_discoverable_projects.py index 0dbd4a3..5a4b1a2 100644 --- a/cirro_api_client/v1/api/projects/get_discoverable_projects.py +++ b/cirro_api_client/v1/api/projects/get_discoverable_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects/discover", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Project] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Project]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list[Project]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Project']] + Response[list[Project]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Project"]]: +) -> list[Project] | None: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Project'] + list[Project] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list[Project]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Project']] + Response[list[Project]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Project"]]: +) -> list[Project] | None: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Project'] + list[Project] """ try: diff --git a/cirro_api_client/v1/api/projects/get_project.py b/cirro_api_client/v1/api/projects/get_project.py index 44ce3cf..fbf135b 100644 --- a/cirro_api_client/v1/api/projects/get_project.py +++ b/cirro_api_client/v1/api/projects/get_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}", + "url": "/projects/{project_id}".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: + if response.status_code == 200: response_200 = ProjectDetail.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Get project Get detailed project information @@ -135,7 +138,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Get project Get detailed project information diff --git a/cirro_api_client/v1/api/projects/get_project_create_options.py b/cirro_api_client/v1/api/projects/get_project_create_options.py index 91bec8f..40450f7 100644 --- a/cirro_api_client/v1/api/projects/get_project_create_options.py +++ b/cirro_api_client/v1/api/projects/get_project_create_options.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects/options", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectCreateOptions]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectCreateOptions | None: + if response.status_code == 200: response_200 = ProjectCreateOptions.from_dict(response.json()) return response_200 @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[ProjectCreateOptions]: +) -> ProjectCreateOptions | None: """Get project create options Get allowed options for creating a project @@ -112,7 +112,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[ProjectCreateOptions]: +) -> ProjectCreateOptions | None: """Get project create options Get allowed options for creating a project diff --git a/cirro_api_client/v1/api/projects/get_project_users.py b/cirro_api_client/v1/api/projects/get_project_users.py index 1fbe3a1..428a08f 100644 --- a/cirro_api_client/v1/api/projects/get_project_users.py +++ b/cirro_api_client/v1/api/projects/get_project_users.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/permissions", + "url": "/projects/{project_id}/permissions".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectUser"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ProjectUser] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectUser"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ProjectUser]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["ProjectUser"]]: +) -> Response[list[ProjectUser]]: """Get project permissions Gets users who have access to the project @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectUser']] + Response[list[ProjectUser]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["ProjectUser"]]: +) -> list[ProjectUser] | None: """Get project permissions Gets users who have access to the project @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectUser'] + list[ProjectUser] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["ProjectUser"]]: +) -> Response[list[ProjectUser]]: """Get project permissions Gets users who have access to the project @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ProjectUser']] + Response[list[ProjectUser]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["ProjectUser"]]: +) -> list[ProjectUser] | None: """Get project permissions Gets users who have access to the project @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ProjectUser'] + list[ProjectUser] """ try: diff --git a/cirro_api_client/v1/api/projects/get_projects.py b/cirro_api_client/v1/api/projects/get_projects.py index 9a76039..86cecdc 100644 --- a/cirro_api_client/v1/api/projects/get_projects.py +++ b/cirro_api_client/v1/api/projects/get_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Project] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Project]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list[Project]]: """Get projects Retrieve a list of projects @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Project']] + Response[list[Project]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Project"]]: +) -> list[Project] | None: """Get projects Retrieve a list of projects @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Project'] + list[Project] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list[Project]]: """Get projects Retrieve a list of projects @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Project']] + Response[list[Project]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Project"]]: +) -> list[Project] | None: """Get projects Retrieve a list of projects @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Project'] + list[Project] """ try: diff --git a/cirro_api_client/v1/api/projects/redeploy_project.py b/cirro_api_client/v1/api/projects/redeploy_project.py index 94da853..8244a7d 100644 --- a/cirro_api_client/v1/api/projects/redeploy_project.py +++ b/cirro_api_client/v1/api/projects/redeploy_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}:re-deploy", + "url": "/projects/{project_id}:re-deploy".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/set_user_project_role.py b/cirro_api_client/v1/api/projects/set_user_project_role.py index 6daa624..f04baae 100644 --- a/cirro_api_client/v1/api/projects/set_user_project_role.py +++ b/cirro_api_client/v1/api/projects/set_user_project_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,25 +14,26 @@ def _get_kwargs( project_id: str, *, body: SetUserProjectRoleRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/permissions", + "url": "/projects/{project_id}/permissions".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/unarchive_project.py b/cirro_api_client/v1/api/projects/unarchive_project.py index c724507..2d2b891 100644 --- a/cirro_api_client/v1/api/projects/unarchive_project.py +++ b/cirro_api_client/v1/api/projects/unarchive_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}:unarchive", + "url": "/projects/{project_id}:unarchive".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/projects/update_project.py b/cirro_api_client/v1/api/projects/update_project.py index 0e4c510..e3c6118 100644 --- a/cirro_api_client/v1/api/projects/update_project.py +++ b/cirro_api_client/v1/api/projects/update_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: ProjectInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}", + "url": "/projects/{project_id}".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: + if response.status_code == 200: response_200 = ProjectDetail.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Update project Updates a project @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Update project Updates a project diff --git a/cirro_api_client/v1/api/projects/update_project_tags.py b/cirro_api_client/v1/api/projects/update_project_tags.py index e829300..460b474 100644 --- a/cirro_api_client/v1/api/projects/update_project_tags.py +++ b/cirro_api_client/v1/api/projects/update_project_tags.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,29 +13,30 @@ def _get_kwargs( project_id: str, *, - body: List["Tag"], -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} + body: list[Tag], +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}:tags", + "url": "/projects/{project_id}:tags".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = [] + _kwargs["json"] = [] for body_item_data in body: body_item = body_item_data.to_dict() - _body.append(body_item) + _kwargs["json"].append(body_item) - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) @@ -53,7 +55,7 @@ def sync_detailed( project_id: str, *, client: Client, - body: List["Tag"], + body: list[Tag], ) -> Response[Any]: """Set project tags @@ -61,7 +63,7 @@ def sync_detailed( Args: project_id (str): - body (List['Tag']): + body (list[Tag]): client (Client): instance of the API client Raises: @@ -89,7 +91,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - body: List["Tag"], + body: list[Tag], ) -> Response[Any]: """Set project tags @@ -97,7 +99,7 @@ async def asyncio_detailed( Args: project_id (str): - body (List['Tag']): + body (list[Tag]): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/references/__init__.py b/cirro_api_client/v1/api/references/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/references/__init__.py +++ b/cirro_api_client/v1/api/references/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/references/create_project_reference.py b/cirro_api_client/v1/api/references/create_project_reference.py index cbb21fd..cd1b6ee 100644 --- a/cirro_api_client/v1/api/references/create_project_reference.py +++ b/cirro_api_client/v1/api/references/create_project_reference.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: CreateReferenceRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/references", + "url": "/projects/{project_id}/references".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Reference]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Reference | None: + if response.status_code == 200: response_200 = Reference.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: CreateReferenceRequest, -) -> Optional[Reference]: +) -> Reference | None: """Create project reference Creates a reference @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: CreateReferenceRequest, -) -> Optional[Reference]: +) -> Reference | None: """Create project reference Creates a reference diff --git a/cirro_api_client/v1/api/references/delete_project_reference.py b/cirro_api_client/v1/api/references/delete_project_reference.py index ba54693..9f72b4e 100644 --- a/cirro_api_client/v1/api/references/delete_project_reference.py +++ b/cirro_api_client/v1/api/references/delete_project_reference.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/references", + "url": "/projects/{project_id}/references".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/references/get_reference_types.py b/cirro_api_client/v1/api/references/get_reference_types.py index c50d7e0..811b676 100644 --- a/cirro_api_client/v1/api/references/get_reference_types.py +++ b/cirro_api_client/v1/api/references/get_reference_types.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/reference-types", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ReferenceType"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ReferenceType] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ReferenceType"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ReferenceType]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ReferenceType"]]: +) -> Response[list[ReferenceType]]: """Get reference types List available reference types @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ReferenceType']] + Response[list[ReferenceType]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ReferenceType"]]: +) -> list[ReferenceType] | None: """Get reference types List available reference types @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ReferenceType'] + list[ReferenceType] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ReferenceType"]]: +) -> Response[list[ReferenceType]]: """Get reference types List available reference types @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ReferenceType']] + Response[list[ReferenceType]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ReferenceType"]]: +) -> list[ReferenceType] | None: """Get reference types List available reference types @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ReferenceType'] + list[ReferenceType] """ try: diff --git a/cirro_api_client/v1/api/references/get_references.py b/cirro_api_client/v1/api/references/get_references.py index 97c1dd8..460ca44 100644 --- a/cirro_api_client/v1/api/references/get_references.py +++ b/cirro_api_client/v1/api/references/get_references.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/references", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Reference] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Reference]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list[Reference]]: """Get global references List available references (available to everyone) @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Reference']] + Response[list[Reference]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Reference"]]: +) -> list[Reference] | None: """Get global references List available references (available to everyone) @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Reference'] + list[Reference] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list[Reference]]: """Get global references List available references (available to everyone) @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Reference']] + Response[list[Reference]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Reference"]]: +) -> list[Reference] | None: """Get global references List available references (available to everyone) @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Reference'] + list[Reference] """ try: diff --git a/cirro_api_client/v1/api/references/get_references_for_project.py b/cirro_api_client/v1/api/references/get_references_for_project.py index 94e189b..3875dac 100644 --- a/cirro_api_client/v1/api/references/get_references_for_project.py +++ b/cirro_api_client/v1/api/references/get_references_for_project.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/references", + "url": "/projects/{project_id}/references".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Reference] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Reference]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list[Reference]]: """Get project references List available references for a given project @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Reference']] + Response[list[Reference]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Reference"]]: +) -> list[Reference] | None: """Get project references List available references for a given project @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Reference'] + list[Reference] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list[Reference]]: """Get project references List available references for a given project @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Reference']] + Response[list[Reference]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Reference"]]: +) -> list[Reference] | None: """Get project references List available references for a given project @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Reference'] + list[Reference] """ try: diff --git a/cirro_api_client/v1/api/references/refresh_project_references.py b/cirro_api_client/v1/api/references/refresh_project_references.py index 8c913a3..451d6d7 100644 --- a/cirro_api_client/v1/api/references/refresh_project_references.py +++ b/cirro_api_client/v1/api/references/refresh_project_references.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/references", + "url": "/projects/{project_id}/references".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/sharing/__init__.py b/cirro_api_client/v1/api/sharing/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/sharing/__init__.py +++ b/cirro_api_client/v1/api/sharing/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/sharing/create_share.py b/cirro_api_client/v1/api/sharing/create_share.py index 630521a..3628d92 100644 --- a/cirro_api_client/v1/api/sharing/create_share.py +++ b/cirro_api_client/v1/api/sharing/create_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: ShareInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/shares", + "url": "/projects/{project_id}/shares".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: ShareInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create share Create a new share to publish to other projects @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: ShareInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create share Create a new share to publish to other projects diff --git a/cirro_api_client/v1/api/sharing/delete_share.py b/cirro_api_client/v1/api/sharing/delete_share.py index 0de3be9..8cf3a7f 100644 --- a/cirro_api_client/v1/api/sharing/delete_share.py +++ b/cirro_api_client/v1/api/sharing/delete_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/shares/{share_id}", + "url": "/projects/{project_id}/shares/{share_id}".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py index c2c2d08..aa2e58e 100644 --- a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py +++ b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/shares/discover", + "url": "/projects/{project_id}/shares/discover".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Share] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Share]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list[Share]]: """Get discoverable shares Get shares that the project can request access to @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Share']] + Response[list[Share]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list[Share] | None: """Get discoverable shares Get shares that the project can request access to @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Share'] + list[Share] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list[Share]]: """Get discoverable shares Get shares that the project can request access to @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Share']] + Response[list[Share]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list[Share] | None: """Get discoverable shares Get shares that the project can request access to @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Share'] + list[Share] """ try: diff --git a/cirro_api_client/v1/api/sharing/get_share.py b/cirro_api_client/v1/api/sharing/get_share.py index f6a2426..50f0c51 100644 --- a/cirro_api_client/v1/api/sharing/get_share.py +++ b/cirro_api_client/v1/api/sharing/get_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/shares/{share_id}", + "url": "/projects/{project_id}/shares/{share_id}".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ShareDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> ShareDetail | None: + if response.status_code == 200: response_200 = ShareDetail.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( share_id: str, *, client: Client, -) -> Optional[ShareDetail]: +) -> ShareDetail | None: """Get share Get details on a share that you've published or subscribed to @@ -146,7 +150,7 @@ async def asyncio( share_id: str, *, client: Client, -) -> Optional[ShareDetail]: +) -> ShareDetail | None: """Get share Get details on a share that you've published or subscribed to diff --git a/cirro_api_client/v1/api/sharing/get_shared_datasets.py b/cirro_api_client/v1/api/sharing/get_shared_datasets.py index 433cbad..3fb20a7 100644 --- a/cirro_api_client/v1/api/sharing/get_shared_datasets.py +++ b/cirro_api_client/v1/api/sharing/get_shared_datasets.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any +from urllib.parse import quote import httpx @@ -13,10 +14,10 @@ def _get_kwargs( project_id: str, share_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -24,17 +25,20 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/shares/{share_id}/datasets", + "url": "/projects/{project_id}/shares/{share_id}/datasets".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: + if response.status_code == 200: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) return response_200 @@ -56,8 +60,8 @@ def sync_detailed( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -66,8 +70,8 @@ def sync_detailed( Args: project_id (str): share_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -98,9 +102,9 @@ def sync( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseDatasetListDto | None: """Get share datasets Get dataset listing for a share @@ -108,8 +112,8 @@ def sync( Args: project_id (str): share_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -137,8 +141,8 @@ async def asyncio_detailed( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -147,8 +151,8 @@ async def asyncio_detailed( Args: project_id (str): share_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -176,9 +180,9 @@ async def asyncio( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseDatasetListDto | None: """Get share datasets Get dataset listing for a share @@ -186,8 +190,8 @@ async def asyncio( Args: project_id (str): share_id (str): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/sharing/get_shares.py b/cirro_api_client/v1/api/sharing/get_shares.py index ded07ce..ced3e1e 100644 --- a/cirro_api_client/v1/api/sharing/get_shares.py +++ b/cirro_api_client/v1/api/sharing/get_shares.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/shares", + "url": "/projects/{project_id}/shares".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Share] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Share]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list[Share]]: """Get shares Get shares for a project (both published and shared with the project) @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Share']] + Response[list[Share]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list[Share] | None: """Get shares Get shares for a project (both published and shared with the project) @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Share'] + list[Share] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list[Share]]: """Get shares Get shares for a project (both published and shared with the project) @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Share']] + Response[list[Share]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list[Share] | None: """Get shares Get shares for a project (both published and shared with the project) @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Share'] + list[Share] """ try: diff --git a/cirro_api_client/v1/api/sharing/subscribe_share.py b/cirro_api_client/v1/api/sharing/subscribe_share.py index cd3ae69..f1dcfe0 100644 --- a/cirro_api_client/v1/api/sharing/subscribe_share.py +++ b/cirro_api_client/v1/api/sharing/subscribe_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/shares/{share_id}:subscribe", + "url": "/projects/{project_id}/shares/{share_id}:subscribe".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/sharing/unsubscribe_share.py b/cirro_api_client/v1/api/sharing/unsubscribe_share.py index 86e4620..f6eebf3 100644 --- a/cirro_api_client/v1/api/sharing/unsubscribe_share.py +++ b/cirro_api_client/v1/api/sharing/unsubscribe_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/shares/{share_id}:unsubscribe", + "url": "/projects/{project_id}/shares/{share_id}:unsubscribe".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/sharing/update_share.py b/cirro_api_client/v1/api/sharing/update_share.py index 2f9dbb9..decd10d 100644 --- a/cirro_api_client/v1/api/sharing/update_share.py +++ b/cirro_api_client/v1/api/sharing/update_share.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( share_id: str, *, body: ShareInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/shares/{share_id}", + "url": "/projects/{project_id}/shares/{share_id}".format( + project_id=quote(str(project_id), safe=""), + share_id=quote(str(share_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/system/__init__.py b/cirro_api_client/v1/api/system/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/system/__init__.py +++ b/cirro_api_client/v1/api/system/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/system/get_service_connections.py b/cirro_api_client/v1/api/system/get_service_connections.py index 67dadbb..c12c60a 100644 --- a/cirro_api_client/v1/api/system/get_service_connections.py +++ b/cirro_api_client/v1/api/system/get_service_connections.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/service-connections", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ServiceConnection"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[ServiceConnection] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ServiceConnection"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[ServiceConnection]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ServiceConnection"]]: +) -> Response[list[ServiceConnection]]: """Get service connections List available service connections @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ServiceConnection']] + Response[list[ServiceConnection]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ServiceConnection"]]: +) -> list[ServiceConnection] | None: """Get service connections List available service connections @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ServiceConnection'] + list[ServiceConnection] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ServiceConnection"]]: +) -> Response[list[ServiceConnection]]: """Get service connections List available service connections @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['ServiceConnection']] + Response[list[ServiceConnection]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ServiceConnection"]]: +) -> list[ServiceConnection] | None: """Get service connections List available service connections @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['ServiceConnection'] + list[ServiceConnection] """ try: diff --git a/cirro_api_client/v1/api/system/info.py b/cirro_api_client/v1/api/system/info.py index c9bda11..ae512ac 100644 --- a/cirro_api_client/v1/api/system/info.py +++ b/cirro_api_client/v1/api/system/info.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/info", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SystemInfoResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> SystemInfoResponse | None: + if response.status_code == 200: response_200 = SystemInfoResponse.from_dict(response.json()) return response_200 @@ -63,7 +63,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[SystemInfoResponse]: +) -> SystemInfoResponse | None: """Get system info Raises: @@ -106,7 +106,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[SystemInfoResponse]: +) -> SystemInfoResponse | None: """Get system info Raises: diff --git a/cirro_api_client/v1/api/tools/__init__.py b/cirro_api_client/v1/api/tools/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/tools/__init__.py +++ b/cirro_api_client/v1/api/tools/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/tools/move_dataset.py b/cirro_api_client/v1/api/tools/move_dataset.py index cf0a715..dff6bd7 100644 --- a/cirro_api_client/v1/api/tools/move_dataset.py +++ b/cirro_api_client/v1/api/tools/move_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: MoveDatasetInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": "/tools/move-dataset", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[MoveDatasetResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> MoveDatasetResponse | None: + if response.status_code == 200: response_200 = MoveDatasetResponse.from_dict(response.json()) return response_200 @@ -86,7 +85,7 @@ def sync( *, client: Client, body: MoveDatasetInput, -) -> Optional[MoveDatasetResponse]: +) -> MoveDatasetResponse | None: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to @@ -148,7 +147,7 @@ async def asyncio( *, client: Client, body: MoveDatasetInput, -) -> Optional[MoveDatasetResponse]: +) -> MoveDatasetResponse | None: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to diff --git a/cirro_api_client/v1/api/users/__init__.py b/cirro_api_client/v1/api/users/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/users/__init__.py +++ b/cirro_api_client/v1/api/users/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/users/get_user.py b/cirro_api_client/v1/api/users/get_user.py index d92c1c6..23bd584 100644 --- a/cirro_api_client/v1/api/users/get_user.py +++ b/cirro_api_client/v1/api/users/get_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( username: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/users/{username}", + "url": "/users/{username}".format( + username=quote(str(username), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UserDetail]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> UserDetail | None: + if response.status_code == 200: response_200 = UserDetail.from_dict(response.json()) return response_200 @@ -75,7 +78,7 @@ def sync( username: str, *, client: Client, -) -> Optional[UserDetail]: +) -> UserDetail | None: """Get user Get user information @@ -135,7 +138,7 @@ async def asyncio( username: str, *, client: Client, -) -> Optional[UserDetail]: +) -> UserDetail | None: """Get user Get user information diff --git a/cirro_api_client/v1/api/users/invite_user.py b/cirro_api_client/v1/api/users/invite_user.py index 4ee4734..19dd039 100644 --- a/cirro_api_client/v1/api/users/invite_user.py +++ b/cirro_api_client/v1/api/users/invite_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,25 +13,24 @@ def _get_kwargs( *, body: InviteUserRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/users", } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[InviteUserResponse]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> InviteUserResponse | None: + if response.status_code == 200: response_200 = InviteUserResponse.from_dict(response.json()) return response_200 @@ -85,7 +84,7 @@ def sync( *, client: Client, body: InviteUserRequest, -) -> Optional[InviteUserResponse]: +) -> InviteUserResponse | None: """Invite user Invites a user to the system @@ -145,7 +144,7 @@ async def asyncio( *, client: Client, body: InviteUserRequest, -) -> Optional[InviteUserResponse]: +) -> InviteUserResponse | None: """Invite user Invites a user to the system diff --git a/cirro_api_client/v1/api/users/list_users.py b/cirro_api_client/v1/api/users/list_users.py index af6323c..6e5b4df 100644 --- a/cirro_api_client/v1/api/users/list_users.py +++ b/cirro_api_client/v1/api/users/list_users.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -11,13 +11,13 @@ def _get_kwargs( *, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: None | str | Unset = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} - json_username: Union[None, Unset, str] + json_username: None | str | Unset if isinstance(username, Unset): json_username = UNSET else: @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/users", "params": params, @@ -39,8 +39,8 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseUserDto]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseUserDto | None: + if response.status_code == 200: response_200 = PaginatedResponseUserDto.from_dict(response.json()) return response_200 @@ -60,18 +60,18 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Pag def sync_detailed( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + username: None | str | Unset = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users Gets a list of users, matching an optional username pattern Args: - username (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + username (None | str | Unset): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -99,18 +99,18 @@ def sync_detailed( def sync( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseUserDto]: + username: None | str | Unset = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseUserDto | None: """List users Gets a list of users, matching an optional username pattern Args: - username (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + username (None | str | Unset): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -135,18 +135,18 @@ def sync( async def asyncio_detailed( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + username: None | str | Unset = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users Gets a list of users, matching an optional username pattern Args: - username (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + username (None | str | Unset): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: @@ -171,18 +171,18 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseUserDto]: + username: None | str | Unset = UNSET, + limit: int | Unset = 5000, + next_token: str | Unset = UNSET, +) -> PaginatedResponseUserDto | None: """List users Gets a list of users, matching an optional username pattern Args: - username (Union[None, Unset, str]): - limit (Union[Unset, int]): Default: 5000. - next_token (Union[Unset, str]): + username (None | str | Unset): + limit (int | Unset): Default: 5000. + next_token (str | Unset): client (Client): instance of the API client Raises: diff --git a/cirro_api_client/v1/api/users/sign_out_user.py b/cirro_api_client/v1/api/users/sign_out_user.py index c290d4d..147edfb 100644 --- a/cirro_api_client/v1/api/users/sign_out_user.py +++ b/cirro_api_client/v1/api/users/sign_out_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -10,17 +11,19 @@ def _get_kwargs( username: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/users/{username}:signOut", + "url": "/users/{username}:signOut".format( + username=quote(str(username), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/users/update_user.py b/cirro_api_client/v1/api/users/update_user.py index e3dad7f..39abb78 100644 --- a/cirro_api_client/v1/api/users/update_user.py +++ b/cirro_api_client/v1/api/users/update_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( username: str, *, body: UpdateUserRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/users/{username}", + "url": "/users/{username}".format( + username=quote(str(username), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[User]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> User | None: + if response.status_code == 200: response_200 = User.from_dict(response.json()) return response_200 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: UpdateUserRequest, -) -> Optional[User]: +) -> User | None: """Update user Update user information @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: UpdateUserRequest, -) -> Optional[User]: +) -> User | None: """Update user Update user information diff --git a/cirro_api_client/v1/api/workspaces/__init__.py b/cirro_api_client/v1/api/workspaces/__init__.py index e69de29..2d7c0b2 100644 --- a/cirro_api_client/v1/api/workspaces/__init__.py +++ b/cirro_api_client/v1/api/workspaces/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/cirro_api_client/v1/api/workspaces/connect_workspace.py b/cirro_api_client/v1/api/workspaces/connect_workspace.py index fee9a4e..c8ebed2 100644 --- a/cirro_api_client/v1/api/workspaces/connect_workspace.py +++ b/cirro_api_client/v1/api/workspaces/connect_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/workspaces/{workspace_id}:connect", + "url": "/projects/{project_id}/workspaces/{workspace_id}:connect".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[WorkspaceConnectionResponse]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> WorkspaceConnectionResponse | None: + if response.status_code == 202: response_202 = WorkspaceConnectionResponse.from_dict(response.json()) return response_202 @@ -80,7 +84,7 @@ def sync( workspace_id: str, *, client: Client, -) -> Optional[WorkspaceConnectionResponse]: +) -> WorkspaceConnectionResponse | None: """Connect to workspace Generates a URL to connect to the given workspace @@ -146,7 +150,7 @@ async def asyncio( workspace_id: str, *, client: Client, -) -> Optional[WorkspaceConnectionResponse]: +) -> WorkspaceConnectionResponse | None: """Connect to workspace Generates a URL to connect to the given workspace diff --git a/cirro_api_client/v1/api/workspaces/create_workspace.py b/cirro_api_client/v1/api/workspaces/create_workspace.py index 57ccc68..7490b51 100644 --- a/cirro_api_client/v1/api/workspaces/create_workspace.py +++ b/cirro_api_client/v1/api/workspaces/create_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,26 @@ def _get_kwargs( project_id: str, *, body: WorkspaceInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/workspaces", + "url": "/projects/{project_id}/workspaces".format( + project_id=quote(str(project_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: - if response.status_code == HTTPStatus.CREATED: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == 201: response_201 = CreateResponse.from_dict(response.json()) return response_201 @@ -90,7 +92,7 @@ def sync( *, client: Client, body: WorkspaceInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create workspace Creates a workspace within a project @@ -156,7 +158,7 @@ async def asyncio( *, client: Client, body: WorkspaceInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create workspace Creates a workspace within a project diff --git a/cirro_api_client/v1/api/workspaces/delete_workspace.py b/cirro_api_client/v1/api/workspaces/delete_workspace.py index 0d3a07d..591bfb2 100644 --- a/cirro_api_client/v1/api/workspaces/delete_workspace.py +++ b/cirro_api_client/v1/api/workspaces/delete_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/workspaces/{workspace_id}", + "url": "/projects/{project_id}/workspaces/{workspace_id}".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/workspaces/disconnect_workspace.py b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py index a87b790..f9335f5 100644 --- a/cirro_api_client/v1/api/workspaces/disconnect_workspace.py +++ b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -13,24 +14,27 @@ def _get_kwargs( workspace_id: str, *, session_id: str, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["sessionId"] = session_id params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/projects/{project_id}/workspaces/{workspace_id}:disconnect", + "url": "/projects/{project_id}/workspaces/{workspace_id}:disconnect".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), "params": params, } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/workspaces/get_workspace.py b/cirro_api_client/v1/api/workspaces/get_workspace.py index a755235..30e7df7 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspace.py +++ b/cirro_api_client/v1/api/workspaces/get_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -12,17 +13,20 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/workspaces/{workspace_id}", + "url": "/projects/{project_id}/workspaces/{workspace_id}".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Workspace]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Workspace | None: + if response.status_code == 200: response_200 = Workspace.from_dict(response.json()) return response_200 @@ -80,7 +84,7 @@ def sync( workspace_id: str, *, client: Client, -) -> Optional[Workspace]: +) -> Workspace | None: """Get workspace Get details of a particular workspace @@ -146,7 +150,7 @@ async def asyncio( workspace_id: str, *, client: Client, -) -> Optional[Workspace]: +) -> Workspace | None: """Get workspace Get details of a particular workspace diff --git a/cirro_api_client/v1/api/workspaces/get_workspace_environments.py b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py index e6a4c80..c9f3083 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspace_environments.py +++ b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/workspace-environments", } @@ -18,8 +18,8 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["WorkspaceEnvironment"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[WorkspaceEnvironment] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["WorkspaceEnvironment"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[WorkspaceEnvironment]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["WorkspaceEnvironment"]]: +) -> Response[list[WorkspaceEnvironment]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -54,7 +54,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['WorkspaceEnvironment']] + Response[list[WorkspaceEnvironment]] """ kwargs = _get_kwargs() @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["WorkspaceEnvironment"]]: +) -> list[WorkspaceEnvironment] | None: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -80,7 +80,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['WorkspaceEnvironment'] + list[WorkspaceEnvironment] """ try: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["WorkspaceEnvironment"]]: +) -> Response[list[WorkspaceEnvironment]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -104,7 +104,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['WorkspaceEnvironment']] + Response[list[WorkspaceEnvironment]] """ kwargs = _get_kwargs() @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["WorkspaceEnvironment"]]: +) -> list[WorkspaceEnvironment] | None: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -127,7 +127,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['WorkspaceEnvironment'] + list[WorkspaceEnvironment] """ try: diff --git a/cirro_api_client/v1/api/workspaces/get_workspaces.py b/cirro_api_client/v1/api/workspaces/get_workspaces.py index 5f3958e..24aa5ec 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspaces.py +++ b/cirro_api_client/v1/api/workspaces/get_workspaces.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,19 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/projects/{project_id}/workspaces", + "url": "/projects/{project_id}/workspaces".format( + project_id=quote(str(project_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Workspace"]]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> list[Workspace] | None: + if response.status_code == 200: response_200 = [] _response_200 = response.json() for response_200_item_data in _response_200: @@ -34,7 +37,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Workspace"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list[Workspace]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +50,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Workspace"]]: +) -> Response[list[Workspace]]: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -61,7 +64,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Workspace']] + Response[list[Workspace]] """ kwargs = _get_kwargs( @@ -80,7 +83,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Workspace"]]: +) -> list[Workspace] | None: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -94,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Workspace'] + list[Workspace] """ try: @@ -110,7 +113,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Workspace"]]: +) -> Response[list[Workspace]]: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -124,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['Workspace']] + Response[list[Workspace]] """ kwargs = _get_kwargs( @@ -140,7 +143,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Workspace"]]: +) -> list[Workspace] | None: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -154,7 +157,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['Workspace'] + list[Workspace] """ try: diff --git a/cirro_api_client/v1/api/workspaces/postpone_auto_stop.py b/cirro_api_client/v1/api/workspaces/postpone_auto_stop.py new file mode 100644 index 0000000..768a6ee --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/postpone_auto_stop.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import Client +from ...models.postpone_workspace_autostop_input import PostponeWorkspaceAutostopInput +from ...models.workspace import Workspace +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, + *, + body: PostponeWorkspaceAutostopInput, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/projects/{project_id}/workspaces/{workspace_id}:postpone-auto-stop".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Workspace | None: + if response.status_code == 200: + response_200 = Workspace.from_dict(response.json()) + + return response_200 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Workspace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + body: PostponeWorkspaceAutostopInput, +) -> Response[Workspace]: + """Postpone workspace autostop + + Postpone autostop for the given workspace + + Args: + project_id (str): + workspace_id (str): + body (PostponeWorkspaceAutostopInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Workspace] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + body=body, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + workspace_id: str, + *, + client: Client, + body: PostponeWorkspaceAutostopInput, +) -> Workspace | None: + """Postpone workspace autostop + + Postpone autostop for the given workspace + + Args: + project_id (str): + workspace_id (str): + body (PostponeWorkspaceAutostopInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Workspace + """ + + try: + return sync_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + body=body, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + body: PostponeWorkspaceAutostopInput, +) -> Response[Workspace]: + """Postpone workspace autostop + + Postpone autostop for the given workspace + + Args: + project_id (str): + workspace_id (str): + body (PostponeWorkspaceAutostopInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Workspace] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + workspace_id: str, + *, + client: Client, + body: PostponeWorkspaceAutostopInput, +) -> Workspace | None: + """Postpone workspace autostop + + Postpone autostop for the given workspace + + Args: + project_id (str): + workspace_id (str): + body (PostponeWorkspaceAutostopInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Workspace + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + body=body, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/start_workspace.py b/cirro_api_client/v1/api/workspaces/start_workspace.py index 98b4ed3..9d452d1 100644 --- a/cirro_api_client/v1/api/workspaces/start_workspace.py +++ b/cirro_api_client/v1/api/workspaces/start_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/workspaces/{workspace_id}:start", + "url": "/projects/{project_id}/workspaces/{workspace_id}:start".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/workspaces/stop_workspace.py b/cirro_api_client/v1/api/workspaces/stop_workspace.py index c258ba3..5641e8b 100644 --- a/cirro_api_client/v1/api/workspaces/stop_workspace.py +++ b/cirro_api_client/v1/api/workspaces/stop_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -11,17 +12,20 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/projects/{project_id}/workspaces/{workspace_id}:stop", + "url": "/projects/{project_id}/workspaces/{workspace_id}:stop".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.ACCEPTED: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 202: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/api/workspaces/update_workspace.py b/cirro_api_client/v1/api/workspaces/update_workspace.py index aa5b8c6..9ad78df 100644 --- a/cirro_api_client/v1/api/workspaces/update_workspace.py +++ b/cirro_api_client/v1/api/workspaces/update_workspace.py @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any +from urllib.parse import quote import httpx @@ -14,25 +15,27 @@ def _get_kwargs( workspace_id: str, *, body: WorkspaceInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", - "url": f"/projects/{project_id}/workspaces/{workspace_id}", + "url": "/projects/{project_id}/workspaces/{workspace_id}".format( + project_id=quote(str(project_id), safe=""), + workspace_id=quote(str(workspace_id), safe=""), + ), } - _body = body.to_dict() + _kwargs["json"] = body.to_dict() - _kwargs["json"] = _body headers["Content-Type"] = "application/json" _kwargs["headers"] = headers return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: - if response.status_code == HTTPStatus.OK: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: return None errors.handle_error_response(response, client.raise_on_unexpected_status) diff --git a/cirro_api_client/v1/client.py b/cirro_api_client/v1/client.py index f2816dc..167d4ca 100644 --- a/cirro_api_client/v1/client.py +++ b/cirro_api_client/v1/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any import httpx from attrs import define, evolve, field @@ -38,20 +38,20 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) auth_method: httpx.Auth = field(default=None, kw_only=True) - _base_url: str - _cookies: Dict[str, str] = field(factory=dict, kw_only=True) - _headers: Dict[str, str] = field(factory=dict, kw_only=True) - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) - _follow_redirects: bool = field(default=False, kw_only=True) - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + _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: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: 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: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) def get_auth(self): return self.auth_method - def with_headers(self, headers: Dict[str, str]) -> "Client": + 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) @@ -59,7 +59,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + 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) diff --git a/cirro_api_client/v1/errors.py b/cirro_api_client/v1/errors.py index c679971..413e2b4 100644 --- a/cirro_api_client/v1/errors.py +++ b/cirro_api_client/v1/errors.py @@ -1,7 +1,6 @@ """Contains shared errors types that can be raised from API functions""" from http import HTTPStatus -from typing import Dict import httpx @@ -38,7 +37,7 @@ def __init__(self, status_code: int, content: bytes): class CirroException(Exception): """Raised when the server returns a known error response""" - def __init__(self, error_response_data: Dict): + def __init__(self, error_response_data: dict): self.error_response = PortalErrorResponse.from_dict(error_response_data) super().__init__(self.error_response.error_detail) diff --git a/cirro_api_client/v1/models/__init__.py b/cirro_api_client/v1/models/__init__.py index 732e284..2d10db2 100644 --- a/cirro_api_client/v1/models/__init__.py +++ b/cirro_api_client/v1/models/__init__.py @@ -99,6 +99,7 @@ from .governance_type import GovernanceType from .group_cost import GroupCost from .import_data_request import ImportDataRequest +from .import_data_request_download_method import ImportDataRequestDownloadMethod from .invite_user_request import InviteUserRequest from .invite_user_response import InviteUserResponse from .list_events_entity_type import ListEventsEntityType @@ -124,6 +125,7 @@ from .pipeline_code import PipelineCode from .pipeline_cost import PipelineCost from .portal_error_response import PortalErrorResponse +from .postpone_workspace_autostop_input import PostponeWorkspaceAutostopInput from .process import Process from .process_detail import ProcessDetail from .project import Project @@ -292,6 +294,7 @@ "GovernanceType", "GroupCost", "ImportDataRequest", + "ImportDataRequestDownloadMethod", "InviteUserRequest", "InviteUserResponse", "ListEventsEntityType", @@ -317,6 +320,7 @@ "PipelineCode", "PipelineCost", "PortalErrorResponse", + "PostponeWorkspaceAutostopInput", "Process", "ProcessDetail", "Project", diff --git a/cirro_api_client/v1/models/agent.py b/cirro_api_client/v1/models/agent.py index 54f6f68..a7f78e3 100644 --- a/cirro_api_client/v1/models/agent.py +++ b/cirro_api_client/v1/models/agent.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -19,29 +22,29 @@ class Agent: Attributes: status (AgentStatus): The status of the agent - id (Union[Unset, str]): The unique ID of the agent - name (Union[Unset, str]): The display name of the agent - tags (Union[Unset, AgentTags]): Tags associated with the agent + id (str | Unset): The unique ID of the agent + name (str | Unset): The display name of the agent + tags (AgentTags | Unset): Tags associated with the agent """ status: AgentStatus - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - tags: Union[Unset, "AgentTags"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + id: str | Unset = UNSET + name: str | Unset = UNSET + tags: AgentTags | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status = self.status.value id = self.id name = self.name - tags: Union[Unset, Dict[str, Any]] = UNSET + tags: dict[str, Any] | Unset = UNSET if not isinstance(self.tags, Unset): tags = self.tags.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -58,10 +61,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent_tags import AgentTags - d = src_dict.copy() + d = dict(src_dict) status = AgentStatus(d.pop("status")) id = d.pop("id", UNSET) @@ -69,7 +72,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name", UNSET) _tags = d.pop("tags", UNSET) - tags: Union[Unset, AgentTags] + tags: AgentTags | Unset if isinstance(_tags, Unset): tags = UNSET else: @@ -86,5 +89,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/agent_detail.py b/cirro_api_client/v1/models/agent_detail.py index f5a09c2..8b8df18 100644 --- a/cirro_api_client/v1/models/agent_detail.py +++ b/cirro_api_client/v1/models/agent_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -28,9 +31,9 @@ class AgentDetail: created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - registration (Union['AgentRegistration', None, Unset]): - tags (Union['AgentDetailTags', None, Unset]): - environment_configuration (Union['AgentDetailEnvironmentConfiguration', None, Unset]): + registration (AgentRegistration | None | Unset): + tags (AgentDetailTags | None | Unset): + environment_configuration (AgentDetailEnvironmentConfiguration | None | Unset): """ id: str @@ -40,12 +43,12 @@ class AgentDetail: created_by: str created_at: datetime.datetime updated_at: datetime.datetime - registration: Union["AgentRegistration", None, Unset] = UNSET - tags: Union["AgentDetailTags", None, Unset] = UNSET - environment_configuration: Union["AgentDetailEnvironmentConfiguration", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + registration: AgentRegistration | None | Unset = UNSET + tags: AgentDetailTags | None | Unset = UNSET + environment_configuration: AgentDetailEnvironmentConfiguration | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration @@ -64,7 +67,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - registration: Union[Dict[str, Any], None, Unset] + registration: dict[str, Any] | None | Unset if isinstance(self.registration, Unset): registration = UNSET elif isinstance(self.registration, AgentRegistration): @@ -72,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: else: registration = self.registration - tags: Union[Dict[str, Any], None, Unset] + tags: dict[str, Any] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentDetailTags): @@ -80,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - environment_configuration: Union[Dict[str, Any], None, Unset] + environment_configuration: dict[str, Any] | None | Unset if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentDetailEnvironmentConfiguration): @@ -88,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: else: environment_configuration = self.environment_configuration - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,12 +114,12 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -131,7 +134,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_registration(data: object) -> Union["AgentRegistration", None, Unset]: + def _parse_registration(data: object) -> AgentRegistration | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -142,13 +145,13 @@ def _parse_registration(data: object) -> Union["AgentRegistration", None, Unset] registration_type_1 = AgentRegistration.from_dict(data) return registration_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentRegistration", None, Unset], data) + return cast(AgentRegistration | None | Unset, data) registration = _parse_registration(d.pop("registration", UNSET)) - def _parse_tags(data: object) -> Union["AgentDetailTags", None, Unset]: + def _parse_tags(data: object) -> AgentDetailTags | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -159,13 +162,13 @@ def _parse_tags(data: object) -> Union["AgentDetailTags", None, Unset]: tags_type_0 = AgentDetailTags.from_dict(data) return tags_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentDetailTags", None, Unset], data) + return cast(AgentDetailTags | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) - def _parse_environment_configuration(data: object) -> Union["AgentDetailEnvironmentConfiguration", None, Unset]: + def _parse_environment_configuration(data: object) -> AgentDetailEnvironmentConfiguration | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -176,9 +179,9 @@ def _parse_environment_configuration(data: object) -> Union["AgentDetailEnvironm environment_configuration_type_0 = AgentDetailEnvironmentConfiguration.from_dict(data) return environment_configuration_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentDetailEnvironmentConfiguration", None, Unset], data) + return cast(AgentDetailEnvironmentConfiguration | None | Unset, data) environment_configuration = _parse_environment_configuration(d.pop("environmentConfiguration", UNSET)) @@ -199,5 +202,17 @@ def _parse_environment_configuration(data: object) -> Union["AgentDetailEnvironm return agent_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/agent_detail_environment_configuration.py b/cirro_api_client/v1/models/agent_detail_environment_configuration.py index f0990c5..753221f 100644 --- a/cirro_api_client/v1/models/agent_detail_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_detail_environment_configuration.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class AgentDetailEnvironmentConfiguration: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_detail_environment_configuration = cls() agent_detail_environment_configuration.additional_properties = d return agent_detail_environment_configuration @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/agent_detail_tags.py b/cirro_api_client/v1/models/agent_detail_tags.py index fdd3e93..86dac65 100644 --- a/cirro_api_client/v1/models/agent_detail_tags.py +++ b/cirro_api_client/v1/models/agent_detail_tags.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class AgentDetailTags: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_detail_tags = cls() agent_detail_tags.additional_properties = d return agent_detail_tags @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/agent_input.py b/cirro_api_client/v1/models/agent_input.py index bf7447e..81b5482 100644 --- a/cirro_api_client/v1/models/agent_input.py +++ b/cirro_api_client/v1/models/agent_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -20,24 +23,24 @@ class AgentInput: Attributes: name (str): The display name of the agent agent_role_arn (str): Arn of the AWS IAM role or user that the agent will use (JSONSchema format) - id (Union[None, Unset, str]): The unique ID of the agent (required on create) - configuration_options_schema (Union['AgentInputConfigurationOptionsSchema', None, Unset]): The configuration - options available for the agent - environment_configuration (Union['AgentInputEnvironmentConfiguration', None, Unset]): The environment - configuration for the agent Example: {'PARTITION': 'restart'}. - tags (Union['AgentInputTags', None, Unset]): The tags associated with the agent displayed to the user Example: + id (None | str | Unset): The unique ID of the agent (required on create) + configuration_options_schema (AgentInputConfigurationOptionsSchema | None | Unset): The configuration options + available for the agent + environment_configuration (AgentInputEnvironmentConfiguration | None | Unset): The environment configuration for + the agent Example: {'PARTITION': 'restart'}. + tags (AgentInputTags | None | Unset): The tags associated with the agent displayed to the user Example: {'Support Email': 'it@company.com'}. """ name: str agent_role_arn: str - id: Union[None, Unset, str] = UNSET - configuration_options_schema: Union["AgentInputConfigurationOptionsSchema", None, Unset] = UNSET - environment_configuration: Union["AgentInputEnvironmentConfiguration", None, Unset] = UNSET - tags: Union["AgentInputTags", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + id: None | str | Unset = UNSET + configuration_options_schema: AgentInputConfigurationOptionsSchema | None | Unset = UNSET + environment_configuration: AgentInputEnvironmentConfiguration | None | Unset = UNSET + tags: AgentInputTags | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags @@ -46,13 +49,13 @@ def to_dict(self) -> Dict[str, Any]: agent_role_arn = self.agent_role_arn - id: Union[None, Unset, str] + id: None | str | Unset if isinstance(self.id, Unset): id = UNSET else: id = self.id - configuration_options_schema: Union[Dict[str, Any], None, Unset] + configuration_options_schema: dict[str, Any] | None | Unset if isinstance(self.configuration_options_schema, Unset): configuration_options_schema = UNSET elif isinstance(self.configuration_options_schema, AgentInputConfigurationOptionsSchema): @@ -60,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: else: configuration_options_schema = self.configuration_options_schema - environment_configuration: Union[Dict[str, Any], None, Unset] + environment_configuration: dict[str, Any] | None | Unset if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentInputEnvironmentConfiguration): @@ -68,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: else: environment_configuration = self.environment_configuration - tags: Union[Dict[str, Any], None, Unset] + tags: dict[str, Any] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentInputTags): @@ -76,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -96,28 +99,26 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") agent_role_arn = d.pop("agentRoleArn") - def _parse_id(data: object) -> Union[None, Unset, str]: + def _parse_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) id = _parse_id(d.pop("id", UNSET)) - def _parse_configuration_options_schema( - data: object, - ) -> Union["AgentInputConfigurationOptionsSchema", None, Unset]: + def _parse_configuration_options_schema(data: object) -> AgentInputConfigurationOptionsSchema | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -128,13 +129,13 @@ def _parse_configuration_options_schema( configuration_options_schema_type_0 = AgentInputConfigurationOptionsSchema.from_dict(data) return configuration_options_schema_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentInputConfigurationOptionsSchema", None, Unset], data) + return cast(AgentInputConfigurationOptionsSchema | None | Unset, data) configuration_options_schema = _parse_configuration_options_schema(d.pop("configurationOptionsSchema", UNSET)) - def _parse_environment_configuration(data: object) -> Union["AgentInputEnvironmentConfiguration", None, Unset]: + def _parse_environment_configuration(data: object) -> AgentInputEnvironmentConfiguration | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -145,13 +146,13 @@ def _parse_environment_configuration(data: object) -> Union["AgentInputEnvironme environment_configuration_type_0 = AgentInputEnvironmentConfiguration.from_dict(data) return environment_configuration_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentInputEnvironmentConfiguration", None, Unset], data) + return cast(AgentInputEnvironmentConfiguration | None | Unset, data) environment_configuration = _parse_environment_configuration(d.pop("environmentConfiguration", UNSET)) - def _parse_tags(data: object) -> Union["AgentInputTags", None, Unset]: + def _parse_tags(data: object) -> AgentInputTags | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -162,9 +163,9 @@ def _parse_tags(data: object) -> Union["AgentInputTags", None, Unset]: tags_type_0 = AgentInputTags.from_dict(data) return tags_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AgentInputTags", None, Unset], data) + return cast(AgentInputTags | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -181,5 +182,17 @@ def _parse_tags(data: object) -> Union["AgentInputTags", None, Unset]: return agent_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py index af170ad..b831e3c 100644 --- a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py +++ b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class AgentInputConfigurationOptionsSchema: """The configuration options available for the agent""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_input_configuration_options_schema = cls() agent_input_configuration_options_schema.additional_properties = d return agent_input_configuration_options_schema @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/agent_input_environment_configuration.py b/cirro_api_client/v1/models/agent_input_environment_configuration.py index 7c5ac6d..dbe18db 100644 --- a/cirro_api_client/v1/models/agent_input_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_input_environment_configuration.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class AgentInputEnvironmentConfiguration: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_input_environment_configuration = cls() agent_input_environment_configuration.additional_properties = d return agent_input_environment_configuration @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/agent_input_tags.py b/cirro_api_client/v1/models/agent_input_tags.py index ccfba73..cd36871 100644 --- a/cirro_api_client/v1/models/agent_input_tags.py +++ b/cirro_api_client/v1/models/agent_input_tags.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class AgentInputTags: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_input_tags = cls() agent_input_tags.additional_properties = d return agent_input_tags @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/agent_registration.py b/cirro_api_client/v1/models/agent_registration.py index 1f2914f..54a4f8b 100644 --- a/cirro_api_client/v1/models/agent_registration.py +++ b/cirro_api_client/v1/models/agent_registration.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class AgentRegistration: agent_version: str hostname: str os: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: local_ip = self.local_ip remote_ip = self.remote_ip @@ -35,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: os = self.os - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,8 +53,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) local_ip = d.pop("localIp") remote_ip = d.pop("remoteIp") @@ -74,5 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_registration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/agent_tags.py b/cirro_api_client/v1/models/agent_tags.py index 2da7cc5..02a4ea9 100644 --- a/cirro_api_client/v1/models/agent_tags.py +++ b/cirro_api_client/v1/models/agent_tags.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class AgentTags: """Tags associated with the agent""" - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) agent_tags = cls() agent_tags.additional_properties = d return agent_tags @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/allowed_data_type.py b/cirro_api_client/v1/models/allowed_data_type.py index f584e2c..64461dc 100644 --- a/cirro_api_client/v1/models/allowed_data_type.py +++ b/cirro_api_client/v1/models/allowed_data_type.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -16,15 +19,15 @@ class AllowedDataType: Attributes: description (str): error_msg (str): - allowed_patterns (List['FileNamePattern']): + allowed_patterns (list[FileNamePattern]): """ description: str error_msg: str - allowed_patterns: List["FileNamePattern"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_patterns: list[FileNamePattern] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: description = self.description error_msg = self.error_msg @@ -34,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: allowed_patterns_item = allowed_patterns_item_data.to_dict() allowed_patterns.append(allowed_patterns_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,10 +50,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern - d = src_dict.copy() + d = dict(src_dict) description = d.pop("description") error_msg = d.pop("errorMsg") @@ -72,5 +75,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return allowed_data_type @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/approve_project_access_request.py b/cirro_api_client/v1/models/approve_project_access_request.py index 5f47c56..513a086 100644 --- a/cirro_api_client/v1/models/approve_project_access_request.py +++ b/cirro_api_client/v1/models/approve_project_access_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +19,12 @@ class ApproveProjectAccessRequest: """ role: ProjectRole - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: role = self.role.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -32,8 +35,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) role = ProjectRole(d.pop("role")) approve_project_access_request = cls( @@ -44,5 +47,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return approve_project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/artifact.py b/cirro_api_client/v1/models/artifact.py index f9c70fd..e3123b7 100644 --- a/cirro_api_client/v1/models/artifact.py +++ b/cirro_api_client/v1/models/artifact.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,24 +16,24 @@ class Artifact: """A secondary file or resource associated with a dataset Attributes: - type (ArtifactType): + type_ (ArtifactType): path (str): """ - type: ArtifactType + type_: ArtifactType path: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type = self.type.value + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value path = self.path - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "type": type, + "type": type_, "path": path, } ) @@ -38,14 +41,14 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - type = ArtifactType(d.pop("type")) + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = ArtifactType(d.pop("type")) path = d.pop("path") artifact = cls( - type=type, + type_=type_, path=path, ) @@ -53,5 +56,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return artifact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/artifact_type.py b/cirro_api_client/v1/models/artifact_type.py index 7bc0eee..6732628 100644 --- a/cirro_api_client/v1/models/artifact_type.py +++ b/cirro_api_client/v1/models/artifact_type.py @@ -3,31 +3,18 @@ class ArtifactType(str, Enum): FILES = "FILES" - """ Files used in the workflow """ INGEST_MANIFEST = "INGEST_MANIFEST" - """ Files expected to upload """ METADATA = "METADATA" - """ Snapshot of metadata at the time of execution """ SAMPLE_SHEET = "SAMPLE_SHEET" - """ Samples used in the workflow """ WORKFLOW_COMPUTE_CONFIG = "WORKFLOW_COMPUTE_CONFIG" - """ Compute overrides used in the workflow """ WORKFLOW_DAG = "WORKFLOW_DAG" - """ Direct acyclic graph of workflow execution """ WORKFLOW_DEBUG_LOGS = "WORKFLOW_DEBUG_LOGS" - """ Debug logs from workflow engine """ WORKFLOW_LOGS = "WORKFLOW_LOGS" - """ Logs from workflow engine """ WORKFLOW_OPTIONS = "WORKFLOW_OPTIONS" - """ Options used in the workflow """ WORKFLOW_PARAMETERS = "WORKFLOW_PARAMETERS" - """ Parameters used in the workflow """ WORKFLOW_REPORT = "WORKFLOW_REPORT" - """ Execution report from workflow engine """ WORKFLOW_TIMELINE = "WORKFLOW_TIMELINE" - """ Timeline of workflow execution """ WORKFLOW_TRACE = "WORKFLOW_TRACE" - """ Trace of workflow execution """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/audit_event.py b/cirro_api_client/v1/models/audit_event.py index 6376582..e411bc1 100644 --- a/cirro_api_client/v1/models/audit_event.py +++ b/cirro_api_client/v1/models/audit_event.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -19,33 +22,33 @@ class AuditEvent: """ Attributes: - id (Union[Unset, str]): The unique identifier for the audit event - event_type (Union[Unset, str]): The type of event Example: CREATE. - project_id (Union[Unset, str]): The project ID associated with the event (if applicable) - entity_id (Union[Unset, str]): The entity ID associated with the event - entity_type (Union[Unset, str]): The entity type associated with the event Example: Project. - event_detail (Union['AuditEventEventDetail', None, Unset]): The details of the event, such as the request - details sent from the client - changes (Union['AuditEventChanges', None, Unset]): The changes made to the entity (if applicable) Example: + id (str | Unset): The unique identifier for the audit event + event_type (str | Unset): The type of event Example: CREATE. + project_id (str | Unset): The project ID associated with the event (if applicable) + entity_id (str | Unset): The entity ID associated with the event + entity_type (str | Unset): The entity type associated with the event Example: Project. + event_detail (AuditEventEventDetail | None | Unset): The details of the event, such as the request details sent + from the client + changes (AuditEventChanges | None | Unset): The changes made to the entity (if applicable) Example: {'.settings.retentionPolicyDays': '1 -> 2'}. - username (Union[Unset, str]): The username of the user who performed the action Example: admin@cirro.bio. - ip_address (Union[Unset, str]): The IP address of the user who performed the action Example: 0.0.0.0. - created_at (Union[Unset, datetime.datetime]): The date and time the event was created + username (str | Unset): The username of the user who performed the action Example: admin@cirro.bio. + ip_address (str | Unset): The IP address of the user who performed the action Example: 0.0.0.0. + created_at (datetime.datetime | Unset): The date and time the event was created """ - id: Union[Unset, str] = UNSET - event_type: Union[Unset, str] = UNSET - project_id: Union[Unset, str] = UNSET - entity_id: Union[Unset, str] = UNSET - entity_type: Union[Unset, str] = UNSET - event_detail: Union["AuditEventEventDetail", None, Unset] = UNSET - changes: Union["AuditEventChanges", None, Unset] = UNSET - username: Union[Unset, str] = UNSET - ip_address: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + id: str | Unset = UNSET + event_type: str | Unset = UNSET + project_id: str | Unset = UNSET + entity_id: str | Unset = UNSET + entity_type: str | Unset = UNSET + event_detail: AuditEventEventDetail | None | Unset = UNSET + changes: AuditEventChanges | None | Unset = UNSET + username: str | Unset = UNSET + ip_address: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail @@ -59,7 +62,7 @@ def to_dict(self) -> Dict[str, Any]: entity_type = self.entity_type - event_detail: Union[Dict[str, Any], None, Unset] + event_detail: dict[str, Any] | None | Unset if isinstance(self.event_detail, Unset): event_detail = UNSET elif isinstance(self.event_detail, AuditEventEventDetail): @@ -67,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: else: event_detail = self.event_detail - changes: Union[Dict[str, Any], None, Unset] + changes: dict[str, Any] | None | Unset if isinstance(self.changes, Unset): changes = UNSET elif isinstance(self.changes, AuditEventChanges): @@ -79,11 +82,11 @@ def to_dict(self) -> Dict[str, Any]: ip_address = self.ip_address - created_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if id is not UNSET: @@ -110,11 +113,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id", UNSET) event_type = d.pop("eventType", UNSET) @@ -125,7 +128,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: entity_type = d.pop("entityType", UNSET) - def _parse_event_detail(data: object) -> Union["AuditEventEventDetail", None, Unset]: + def _parse_event_detail(data: object) -> AuditEventEventDetail | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -136,13 +139,13 @@ def _parse_event_detail(data: object) -> Union["AuditEventEventDetail", None, Un event_detail_type_0 = AuditEventEventDetail.from_dict(data) return event_detail_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AuditEventEventDetail", None, Unset], data) + return cast(AuditEventEventDetail | None | Unset, data) event_detail = _parse_event_detail(d.pop("eventDetail", UNSET)) - def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: + def _parse_changes(data: object) -> AuditEventChanges | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -153,9 +156,9 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: changes_type_0 = AuditEventChanges.from_dict(data) return changes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AuditEventChanges", None, Unset], data) + return cast(AuditEventChanges | None | Unset, data) changes = _parse_changes(d.pop("changes", UNSET)) @@ -164,7 +167,7 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: ip_address = d.pop("ipAddress", UNSET) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: datetime.datetime | Unset if isinstance(_created_at, Unset): created_at = UNSET else: @@ -187,5 +190,17 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: return audit_event @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/audit_event_changes.py b/cirro_api_client/v1/models/audit_event_changes.py index c99871f..3586e5d 100644 --- a/cirro_api_client/v1/models/audit_event_changes.py +++ b/cirro_api_client/v1/models/audit_event_changes.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class AuditEventChanges: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) audit_event_changes = cls() audit_event_changes.additional_properties = d return audit_event_changes @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/audit_event_event_detail.py b/cirro_api_client/v1/models/audit_event_event_detail.py index ca9ab44..49c9697 100644 --- a/cirro_api_client/v1/models/audit_event_event_detail.py +++ b/cirro_api_client/v1/models/audit_event_event_detail.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class AuditEventEventDetail: """The details of the event, such as the request details sent from the client""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) audit_event_event_detail = cls() audit_event_event_detail.additional_properties = d return audit_event_event_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/auth_info.py b/cirro_api_client/v1/models/auth_info.py index 50cbf3a..f33feb7 100644 --- a/cirro_api_client/v1/models/auth_info.py +++ b/cirro_api_client/v1/models/auth_info.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class AuthInfo: ui_app_id: str drive_app_id: str endpoint: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: user_pool_id = self.user_pool_id sdk_app_id = self.sdk_app_id @@ -35,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: endpoint = self.endpoint - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,8 +53,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) user_pool_id = d.pop("userPoolId") sdk_app_id = d.pop("sdkAppId") @@ -74,5 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return auth_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/aws_credentials.py b/cirro_api_client/v1/models/aws_credentials.py index b3854a6..2935367 100644 --- a/cirro_api_client/v1/models/aws_credentials.py +++ b/cirro_api_client/v1/models/aws_credentials.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,17 +21,17 @@ class AWSCredentials: secret_access_key (str): session_token (str): expiration (datetime.datetime): - region (Union[Unset, str]): Region of requested resource (i.e., S3 Bucket) + region (str | Unset): Region of requested resource (i.e., S3 Bucket) """ access_key_id: str secret_access_key: str session_token: str expiration: datetime.datetime - region: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + region: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_key_id = self.access_key_id secret_access_key = self.secret_access_key @@ -39,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: region = self.region - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,8 +58,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) access_key_id = d.pop("accessKeyId") secret_access_key = d.pop("secretAccessKey") @@ -79,5 +82,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return aws_credentials @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/billing_account.py b/cirro_api_client/v1/models/billing_account.py index 9c162a2..d9d0376 100644 --- a/cirro_api_client/v1/models/billing_account.py +++ b/cirro_api_client/v1/models/billing_account.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -20,28 +23,28 @@ class BillingAccount: id (str): name (str): organization (str): - contacts (List['Contact']): + contacts (list[Contact]): customer_type (CustomerType): billing_method (BillingMethod): primary_budget_number (str): owner (str): - shared_with (List[str]): + shared_with (list[str]): is_archived (bool): """ id: str name: str organization: str - contacts: List["Contact"] + contacts: list[Contact] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: List[str] + shared_with: list[str] is_archived: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -65,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: is_archived = self.is_archived - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -85,10 +88,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.contact import Contact - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -110,7 +113,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(List[str], d.pop("sharedWith")) + shared_with = cast(list[str], d.pop("sharedWith")) is_archived = d.pop("isArchived") @@ -131,5 +134,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return billing_account @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/billing_account_request.py b/cirro_api_client/v1/models/billing_account_request.py index 7351d24..7adcbab 100644 --- a/cirro_api_client/v1/models/billing_account_request.py +++ b/cirro_api_client/v1/models/billing_account_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -18,24 +21,24 @@ class BillingAccountRequest: """ Attributes: name (str): - contacts (List['Contact']): + contacts (list[Contact]): customer_type (CustomerType): billing_method (BillingMethod): primary_budget_number (str): owner (str): - shared_with (List[str]): + shared_with (list[str]): """ name: str - contacts: List["Contact"] + contacts: list[Contact] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + shared_with: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name contacts = [] @@ -53,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: shared_with = self.shared_with - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -70,10 +73,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.contact import Contact - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") contacts = [] @@ -91,7 +94,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(List[str], d.pop("sharedWith")) + shared_with = cast(list[str], d.pop("sharedWith")) billing_account_request = cls( name=name, @@ -107,5 +110,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return billing_account_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py index 98ea5c6..7d794f8 100644 --- a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py +++ b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class CalculatePipelineCostRequest: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) calculate_pipeline_cost_request = cls() calculate_pipeline_cost_request.additional_properties = d return calculate_pipeline_cost_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/classification_input.py b/cirro_api_client/v1/models/classification_input.py index e202904..442fc21 100644 --- a/cirro_api_client/v1/models/classification_input.py +++ b/cirro_api_client/v1/models/classification_input.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -12,22 +15,22 @@ class ClassificationInput: Attributes: name (str): description (str): - requirement_ids (List[str]): + requirement_ids (list[str]): """ name: str description: str - requirement_ids: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + requirement_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description requirement_ids = self.requirement_ids - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +43,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - requirement_ids = cast(List[str], d.pop("requirementIds")) + requirement_ids = cast(list[str], d.pop("requirementIds")) classification_input = cls( name=name, @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return classification_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/cloud_account.py b/cirro_api_client/v1/models/cloud_account.py index 04bade4..02e06fd 100644 --- a/cirro_api_client/v1/models/cloud_account.py +++ b/cirro_api_client/v1/models/cloud_account.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,19 +17,18 @@ class CloudAccount: """ Attributes: account_type (CloudAccountType): Type of cloud account (Hosted by Cirro, or Bring your own account) - account_id (Union[Unset, str]): AWS Account ID - account_name (Union[Unset, str]): Name used to describe the account, useful when the account hosts multiple - projects - region_name (Union[Unset, str]): AWS Region Code (defaults to region of Cirro app) Example: us-west-2. + account_id (str | Unset): AWS Account ID + account_name (str | Unset): Name used to describe the account, useful when the account hosts multiple projects + region_name (str | Unset): AWS Region Code (defaults to region of Cirro app) Example: us-west-2. """ account_type: CloudAccountType - account_id: Union[Unset, str] = UNSET - account_name: Union[Unset, str] = UNSET - region_name: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + account_id: str | Unset = UNSET + account_name: str | Unset = UNSET + region_name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: account_type = self.account_type.value account_id = self.account_id @@ -35,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: region_name = self.region_name - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,8 +54,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) account_type = CloudAccountType(d.pop("accountType")) account_id = d.pop("accountId", UNSET) @@ -73,5 +75,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return cloud_account @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/column_definition.py b/cirro_api_client/v1/models/column_definition.py index 9b93224..9960df0 100644 --- a/cirro_api_client/v1/models/column_definition.py +++ b/cirro_api_client/v1/models/column_definition.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,24 +15,24 @@ class ColumnDefinition: """ Attributes: - col (Union[Unset, str]): Column name in asset file - name (Union[Unset, str]): User-friendly column name - desc (Union[Unset, str]): Description of the column + col (str | Unset): Column name in asset file + name (str | Unset): User-friendly column name + desc (str | Unset): Description of the column """ - col: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - desc: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + col: str | Unset = UNSET + name: str | Unset = UNSET + desc: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: col = self.col name = self.name desc = self.desc - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if col is not UNSET: @@ -42,8 +45,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) col = d.pop("col", UNSET) name = d.pop("name", UNSET) @@ -60,5 +63,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return column_definition @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/compute_environment_configuration.py b/cirro_api_client/v1/models/compute_environment_configuration.py index d4bbbb7..1e74dac 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration.py +++ b/cirro_api_client/v1/models/compute_environment_configuration.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -23,25 +26,25 @@ class ComputeEnvironmentConfiguration: environment_type (EnvironmentType): The type of compute environment created_at (datetime.datetime): updated_at (datetime.datetime): - id (Union[Unset, str]): The unique ID of the environment - name (Union[Unset, str]): The display name of the environment - properties (Union[Unset, ComputeEnvironmentConfigurationProperties]): Configuration properties passed to the + id (str | Unset): The unique ID of the environment + name (str | Unset): The display name of the environment + properties (ComputeEnvironmentConfigurationProperties | Unset): Configuration properties passed to the environment - agent (Union['Agent', None, Unset]): - created_by (Union[Unset, str]): The user who created the environment + agent (Agent | None | Unset): + created_by (str | Unset): The user who created the environment """ environment_type: EnvironmentType created_at: datetime.datetime updated_at: datetime.datetime - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - properties: Union[Unset, "ComputeEnvironmentConfigurationProperties"] = UNSET - agent: Union["Agent", None, Unset] = UNSET - created_by: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + id: str | Unset = UNSET + name: str | Unset = UNSET + properties: ComputeEnvironmentConfigurationProperties | Unset = UNSET + agent: Agent | None | Unset = UNSET + created_by: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.agent import Agent environment_type = self.environment_type.value @@ -54,11 +57,11 @@ def to_dict(self) -> Dict[str, Any]: name = self.name - properties: Union[Unset, Dict[str, Any]] = UNSET + properties: dict[str, Any] | Unset = UNSET if not isinstance(self.properties, Unset): properties = self.properties.to_dict() - agent: Union[Dict[str, Any], None, Unset] + agent: dict[str, Any] | None | Unset if isinstance(self.agent, Unset): agent = UNSET elif isinstance(self.agent, Agent): @@ -68,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: created_by = self.created_by - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,11 +94,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent import Agent from ..models.compute_environment_configuration_properties import ComputeEnvironmentConfigurationProperties - d = src_dict.copy() + d = dict(src_dict) environment_type = EnvironmentType(d.pop("environmentType")) created_at = isoparse(d.pop("createdAt")) @@ -107,13 +110,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name", UNSET) _properties = d.pop("properties", UNSET) - properties: Union[Unset, ComputeEnvironmentConfigurationProperties] + properties: ComputeEnvironmentConfigurationProperties | Unset if isinstance(_properties, Unset): properties = UNSET else: properties = ComputeEnvironmentConfigurationProperties.from_dict(_properties) - def _parse_agent(data: object) -> Union["Agent", None, Unset]: + def _parse_agent(data: object) -> Agent | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -124,9 +127,9 @@ def _parse_agent(data: object) -> Union["Agent", None, Unset]: agent_type_1 = Agent.from_dict(data) return agent_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["Agent", None, Unset], data) + return cast(Agent | None | Unset, data) agent = _parse_agent(d.pop("agent", UNSET)) @@ -147,5 +150,17 @@ def _parse_agent(data: object) -> Union["Agent", None, Unset]: return compute_environment_configuration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input.py b/cirro_api_client/v1/models/compute_environment_configuration_input.py index 61591cc..9b5639b 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -19,29 +22,29 @@ class ComputeEnvironmentConfigurationInput: """ Attributes: name (str): - agent_id (Union[None, Unset, str]): - properties (Union['ComputeEnvironmentConfigurationInputProperties', None, Unset]): + agent_id (None | str | Unset): + properties (ComputeEnvironmentConfigurationInputProperties | None | Unset): """ name: str - agent_id: Union[None, Unset, str] = UNSET - properties: Union["ComputeEnvironmentConfigurationInputProperties", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + agent_id: None | str | Unset = UNSET + properties: ComputeEnvironmentConfigurationInputProperties | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) name = self.name - agent_id: Union[None, Unset, str] + agent_id: None | str | Unset if isinstance(self.agent_id, Unset): agent_id = UNSET else: agent_id = self.agent_id - properties: Union[Dict[str, Any], None, Unset] + properties: dict[str, Any] | None | Unset if isinstance(self.properties, Unset): properties = UNSET elif isinstance(self.properties, ComputeEnvironmentConfigurationInputProperties): @@ -49,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: else: properties = self.properties - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -64,24 +67,24 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") - def _parse_agent_id(data: object) -> Union[None, Unset, str]: + def _parse_agent_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) agent_id = _parse_agent_id(d.pop("agentId", UNSET)) - def _parse_properties(data: object) -> Union["ComputeEnvironmentConfigurationInputProperties", None, Unset]: + def _parse_properties(data: object) -> ComputeEnvironmentConfigurationInputProperties | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -92,9 +95,9 @@ def _parse_properties(data: object) -> Union["ComputeEnvironmentConfigurationInp properties_type_0 = ComputeEnvironmentConfigurationInputProperties.from_dict(data) return properties_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ComputeEnvironmentConfigurationInputProperties", None, Unset], data) + return cast(ComputeEnvironmentConfigurationInputProperties | None | Unset, data) properties = _parse_properties(d.pop("properties", UNSET)) @@ -108,5 +111,17 @@ def _parse_properties(data: object) -> Union["ComputeEnvironmentConfigurationInp return compute_environment_configuration_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py index 0b06d10..df149da 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class ComputeEnvironmentConfigurationInputProperties: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) compute_environment_configuration_input_properties = cls() compute_environment_configuration_input_properties.additional_properties = d return compute_environment_configuration_input_properties @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/compute_environment_configuration_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_properties.py index 88d17ce..e4fbe23 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_properties.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class ComputeEnvironmentConfigurationProperties: """Configuration properties passed to the environment""" - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) compute_environment_configuration_properties = cls() compute_environment_configuration_properties.additional_properties = d return compute_environment_configuration_properties @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/contact.py b/cirro_api_client/v1/models/contact.py index 163daed..1a0f5b4 100644 --- a/cirro_api_client/v1/models/contact.py +++ b/cirro_api_client/v1/models/contact.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +23,9 @@ class Contact: organization: str email: str phone: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name organization = self.organization @@ -31,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: phone = self.phone - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,8 +48,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") organization = d.pop("organization") @@ -66,5 +69,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return contact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/contact_input.py b/cirro_api_client/v1/models/contact_input.py index 0a8a160..ed20f72 100644 --- a/cirro_api_client/v1/models/contact_input.py +++ b/cirro_api_client/v1/models/contact_input.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class ContactInput: name: str phone: str email: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: title = self.title description = self.description @@ -35,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: email = self.email - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,8 +53,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) title = d.pop("title") description = d.pop("description") @@ -74,5 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return contact_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/cost_response.py b/cirro_api_client/v1/models/cost_response.py index 16eae86..b4cd24d 100644 --- a/cirro_api_client/v1/models/cost_response.py +++ b/cirro_api_client/v1/models/cost_response.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -17,29 +20,29 @@ class CostResponse: """ Attributes: - total_cost (Union[Unset, float]): Total cost - groups (Union[Unset, List['GroupCost']]): Costs grouped by the task status - tasks (Union[Unset, List['TaskCost']]): Costs for each workflow task - is_estimate (Union[Unset, bool]): Whether this is an estimated cost + total_cost (float | Unset): Total cost + groups (list[GroupCost] | Unset): Costs grouped by the task status + tasks (list[TaskCost] | Unset): Costs for each workflow task + is_estimate (bool | Unset): Whether this is an estimated cost """ - total_cost: Union[Unset, float] = UNSET - groups: Union[Unset, List["GroupCost"]] = UNSET - tasks: Union[Unset, List["TaskCost"]] = UNSET - is_estimate: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + total_cost: float | Unset = UNSET + groups: list[GroupCost] | Unset = UNSET + tasks: list[TaskCost] | Unset = UNSET + is_estimate: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: total_cost = self.total_cost - groups: Union[Unset, List[Dict[str, Any]]] = UNSET + groups: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.groups, Unset): groups = [] for groups_item_data in self.groups: groups_item = groups_item_data.to_dict() groups.append(groups_item) - tasks: Union[Unset, List[Dict[str, Any]]] = UNSET + tasks: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.tasks, Unset): tasks = [] for tasks_item_data in self.tasks: @@ -48,7 +51,7 @@ def to_dict(self) -> Dict[str, Any]: is_estimate = self.is_estimate - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if total_cost is not UNSET: @@ -63,26 +66,30 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.group_cost import GroupCost from ..models.task_cost import TaskCost - d = src_dict.copy() + d = dict(src_dict) total_cost = d.pop("totalCost", UNSET) - groups = [] _groups = d.pop("groups", UNSET) - for groups_item_data in _groups or []: - groups_item = GroupCost.from_dict(groups_item_data) + groups: list[GroupCost] | Unset = UNSET + if _groups is not UNSET: + groups = [] + for groups_item_data in _groups: + groups_item = GroupCost.from_dict(groups_item_data) - groups.append(groups_item) + groups.append(groups_item) - tasks = [] _tasks = d.pop("tasks", UNSET) - for tasks_item_data in _tasks or []: - tasks_item = TaskCost.from_dict(tasks_item_data) + tasks: list[TaskCost] | Unset = UNSET + if _tasks is not UNSET: + tasks = [] + for tasks_item_data in _tasks: + tasks_item = TaskCost.from_dict(tasks_item_data) - tasks.append(tasks_item) + tasks.append(tasks_item) is_estimate = d.pop("isEstimate", UNSET) @@ -97,5 +104,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return cost_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/create_notebook_instance_request.py b/cirro_api_client/v1/models/create_notebook_instance_request.py index e08e2d0..6c130f4 100644 --- a/cirro_api_client/v1/models/create_notebook_instance_request.py +++ b/cirro_api_client/v1/models/create_notebook_instance_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -14,22 +17,22 @@ class CreateNotebookInstanceRequest: Attributes: name (str): instance_type (str): AWS EC2 Instance Type (see list of available options) Example: ml.t3.medium. - accelerator_types (List[str]): + accelerator_types (list[str]): volume_size_gb (int): - git_repositories (Union[List[str], None, Unset]): List of public git repositories to clone into the notebook + git_repositories (list[str] | None | Unset): List of public git repositories to clone into the notebook instance. - is_shared_with_project (Union[Unset, bool]): Whether the notebook is shared with the project Default: False. + is_shared_with_project (bool | Unset): Whether the notebook is shared with the project Default: False. """ name: str instance_type: str - accelerator_types: List[str] + accelerator_types: list[str] volume_size_gb: int - git_repositories: Union[List[str], None, Unset] = UNSET - is_shared_with_project: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + git_repositories: list[str] | None | Unset = UNSET + is_shared_with_project: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name instance_type = self.instance_type @@ -38,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: volume_size_gb = self.volume_size_gb - git_repositories: Union[List[str], None, Unset] + git_repositories: list[str] | None | Unset if isinstance(self.git_repositories, Unset): git_repositories = UNSET elif isinstance(self.git_repositories, list): @@ -49,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: is_shared_with_project = self.is_shared_with_project - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -67,17 +70,17 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") instance_type = d.pop("instanceType") - accelerator_types = cast(List[str], d.pop("acceleratorTypes")) + accelerator_types = cast(list[str], d.pop("acceleratorTypes")) volume_size_gb = d.pop("volumeSizeGB") - def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: + def _parse_git_repositories(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -85,12 +88,12 @@ def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - git_repositories_type_0 = cast(List[str], data) + git_repositories_type_0 = cast(list[str], data) return git_repositories_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) git_repositories = _parse_git_repositories(d.pop("gitRepositories", UNSET)) @@ -109,5 +112,17 @@ def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: return create_notebook_instance_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/create_project_access_request.py b/cirro_api_client/v1/models/create_project_access_request.py index 494fb21..d59b7c4 100644 --- a/cirro_api_client/v1/models/create_project_access_request.py +++ b/cirro_api_client/v1/models/create_project_access_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +21,14 @@ class CreateProjectAccessRequest: role: ProjectRole message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: role = self.role.value message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,8 +40,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) role = ProjectRole(d.pop("role")) message = d.pop("message") @@ -52,5 +55,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/create_reference_request.py b/cirro_api_client/v1/models/create_reference_request.py index 7e860f1..16491b3 100644 --- a/cirro_api_client/v1/models/create_reference_request.py +++ b/cirro_api_client/v1/models/create_reference_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -12,32 +15,32 @@ class CreateReferenceRequest: Attributes: name (str): description (str): - type (str): - expected_files (List[str]): + type_ (str): + expected_files (list[str]): """ name: str description: str - type: str - expected_files: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + type_: str + expected_files: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description - type = self.type + type_ = self.type_ expected_files = self.expected_files - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, "description": description, - "type": type, + "type": type_, "expectedFiles": expected_files, } ) @@ -45,20 +48,20 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - type = d.pop("type") + type_ = d.pop("type") - expected_files = cast(List[str], d.pop("expectedFiles")) + expected_files = cast(list[str], d.pop("expectedFiles")) create_reference_request = cls( name=name, description=description, - type=type, + type_=type_, expected_files=expected_files, ) @@ -66,5 +69,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_reference_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/create_response.py b/cirro_api_client/v1/models/create_response.py index 2798030..6f1f3b4 100644 --- a/cirro_api_client/v1/models/create_response.py +++ b/cirro_api_client/v1/models/create_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class CreateResponse: id: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") message = d.pop("message") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/custom_pipeline_settings.py b/cirro_api_client/v1/models/custom_pipeline_settings.py index aba1b06..8ba6ab9 100644 --- a/cirro_api_client/v1/models/custom_pipeline_settings.py +++ b/cirro_api_client/v1/models/custom_pipeline_settings.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -18,34 +21,34 @@ class CustomPipelineSettings: Attributes: repository (str): GitHub repository that contains the process definition Example: CirroBio/my-pipeline. - branch (Union[Unset, str]): Branch, tag, or commit hash of the repo that contains the process definition - Default: 'main'. - folder (Union[Unset, str]): Folder within the repo that contains the process definition Default: '.cirro'. - repository_type (Union[None, RepositoryType, Unset]): - last_sync (Union[None, Unset, datetime.datetime]): Time of last sync - sync_status (Union[None, SyncStatus, Unset]): - commit_hash (Union[None, Unset, str]): Commit hash of the last successful sync - is_authorized (Union[Unset, bool]): Whether we are authorized to access the repository Default: False. + branch (str | Unset): Branch, tag, or commit hash of the repo that contains the process definition Default: + 'main'. + folder (str | Unset): Folder within the repo that contains the process definition Default: '.cirro'. + repository_type (None | RepositoryType | Unset): + last_sync (datetime.datetime | None | Unset): Time of last sync + sync_status (None | SyncStatus | Unset): + commit_hash (None | str | Unset): Commit hash of the last successful sync + is_authorized (bool | Unset): Whether we are authorized to access the repository Default: False. """ repository: str - branch: Union[Unset, str] = "main" - folder: Union[Unset, str] = ".cirro" - repository_type: Union[None, RepositoryType, Unset] = UNSET - last_sync: Union[None, Unset, datetime.datetime] = UNSET - sync_status: Union[None, SyncStatus, Unset] = UNSET - commit_hash: Union[None, Unset, str] = UNSET - is_authorized: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + branch: str | Unset = "main" + folder: str | Unset = ".cirro" + repository_type: None | RepositoryType | Unset = UNSET + last_sync: datetime.datetime | None | Unset = UNSET + sync_status: None | SyncStatus | Unset = UNSET + commit_hash: None | str | Unset = UNSET + is_authorized: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: repository = self.repository branch = self.branch folder = self.folder - repository_type: Union[None, Unset, str] + repository_type: None | str | Unset if isinstance(self.repository_type, Unset): repository_type = UNSET elif isinstance(self.repository_type, RepositoryType): @@ -53,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: else: repository_type = self.repository_type - last_sync: Union[None, Unset, str] + last_sync: None | str | Unset if isinstance(self.last_sync, Unset): last_sync = UNSET elif isinstance(self.last_sync, datetime.datetime): @@ -61,7 +64,7 @@ def to_dict(self) -> Dict[str, Any]: else: last_sync = self.last_sync - sync_status: Union[None, Unset, str] + sync_status: None | str | Unset if isinstance(self.sync_status, Unset): sync_status = UNSET elif isinstance(self.sync_status, SyncStatus): @@ -69,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: else: sync_status = self.sync_status - commit_hash: Union[None, Unset, str] + commit_hash: None | str | Unset if isinstance(self.commit_hash, Unset): commit_hash = UNSET else: @@ -77,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: is_authorized = self.is_authorized - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -102,15 +105,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) repository = d.pop("repository") branch = d.pop("branch", UNSET) folder = d.pop("folder", UNSET) - def _parse_repository_type(data: object) -> Union[None, RepositoryType, Unset]: + def _parse_repository_type(data: object) -> None | RepositoryType | Unset: if data is None: return data if isinstance(data, Unset): @@ -121,13 +124,13 @@ def _parse_repository_type(data: object) -> Union[None, RepositoryType, Unset]: repository_type_type_1 = RepositoryType(data) return repository_type_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, RepositoryType, Unset], data) + return cast(None | RepositoryType | Unset, data) repository_type = _parse_repository_type(d.pop("repositoryType", UNSET)) - def _parse_last_sync(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_last_sync(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -138,13 +141,13 @@ def _parse_last_sync(data: object) -> Union[None, Unset, datetime.datetime]: last_sync_type_0 = isoparse(data) return last_sync_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) last_sync = _parse_last_sync(d.pop("lastSync", UNSET)) - def _parse_sync_status(data: object) -> Union[None, SyncStatus, Unset]: + def _parse_sync_status(data: object) -> None | SyncStatus | Unset: if data is None: return data if isinstance(data, Unset): @@ -155,18 +158,18 @@ def _parse_sync_status(data: object) -> Union[None, SyncStatus, Unset]: sync_status_type_1 = SyncStatus(data) return sync_status_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, SyncStatus, Unset], data) + return cast(None | SyncStatus | Unset, data) sync_status = _parse_sync_status(d.pop("syncStatus", UNSET)) - def _parse_commit_hash(data: object) -> Union[None, Unset, str]: + def _parse_commit_hash(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) commit_hash = _parse_commit_hash(d.pop("commitHash", UNSET)) @@ -187,5 +190,17 @@ def _parse_commit_hash(data: object) -> Union[None, Unset, str]: return custom_pipeline_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/custom_process_input.py b/cirro_api_client/v1/models/custom_process_input.py index 5ccb4c9..c385ccb 100644 --- a/cirro_api_client/v1/models/custom_process_input.py +++ b/cirro_api_client/v1/models/custom_process_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -24,43 +27,43 @@ class CustomProcessInput: description (str): Description of the process Example: MAGeCK Flute enables accurate identification of essential genes with their related biological functions. executor (Executor): How the workflow is executed - child_process_ids (List[str]): IDs of pipelines that can be run downstream - parent_process_ids (List[str]): IDs of processes that can run this pipeline - linked_project_ids (List[str]): Projects that can run this process - data_type (Union[None, Unset, str]): Name of the data type this pipeline produces (if it is not defined, use the + child_process_ids (list[str]): IDs of pipelines that can be run downstream + parent_process_ids (list[str]): IDs of processes that can run this pipeline + linked_project_ids (list[str]): Projects that can run this process + data_type (None | str | Unset): Name of the data type this pipeline produces (if it is not defined, use the name) - category (Union[Unset, str]): Category of the process Example: Microbial Analysis. - documentation_url (Union[None, Unset, str]): Link to process documentation Example: + category (str | Unset): Category of the process Example: Microbial Analysis. + documentation_url (None | str | Unset): Link to process documentation Example: https://docs.cirro.bio/pipelines/catalog_targeted_sequencing/#crispr-screen-analysis. - file_requirements_message (Union[None, Unset, str]): Description of the files to be uploaded (optional) - pipeline_code (Union['PipelineCode', None, Unset]): - is_tenant_wide (Union[Unset, bool]): Whether the process is shared with the tenant - allow_multiple_sources (Union[Unset, bool]): Whether the pipeline is allowed to have multiple dataset sources - uses_sample_sheet (Union[Unset, bool]): Whether the pipeline uses the Cirro-provided sample sheet - custom_settings (Union['CustomPipelineSettings', None, Unset]): - file_mapping_rules (Union[List['FileMappingRule'], None, Unset]): + file_requirements_message (None | str | Unset): Description of the files to be uploaded (optional) + pipeline_code (None | PipelineCode | Unset): + is_tenant_wide (bool | Unset): Whether the process is shared with the tenant + allow_multiple_sources (bool | Unset): Whether the pipeline is allowed to have multiple dataset sources + uses_sample_sheet (bool | Unset): Whether the pipeline uses the Cirro-provided sample sheet + custom_settings (CustomPipelineSettings | None | Unset): + file_mapping_rules (list[FileMappingRule] | None | Unset): """ id: str name: str description: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] - data_type: Union[None, Unset, str] = UNSET - category: Union[Unset, str] = UNSET - documentation_url: Union[None, Unset, str] = UNSET - file_requirements_message: Union[None, Unset, str] = UNSET - pipeline_code: Union["PipelineCode", None, Unset] = UNSET - is_tenant_wide: Union[Unset, bool] = UNSET - allow_multiple_sources: Union[Unset, bool] = UNSET - uses_sample_sheet: Union[Unset, bool] = UNSET - custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] + data_type: None | str | Unset = UNSET + category: str | Unset = UNSET + documentation_url: None | str | Unset = UNSET + file_requirements_message: None | str | Unset = UNSET + pipeline_code: None | PipelineCode | Unset = UNSET + is_tenant_wide: bool | Unset = UNSET + allow_multiple_sources: bool | Unset = UNSET + uses_sample_sheet: bool | Unset = UNSET + custom_settings: CustomPipelineSettings | None | Unset = UNSET + file_mapping_rules: list[FileMappingRule] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -78,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: linked_project_ids = self.linked_project_ids - data_type: Union[None, Unset, str] + data_type: None | str | Unset if isinstance(self.data_type, Unset): data_type = UNSET else: @@ -86,19 +89,19 @@ def to_dict(self) -> Dict[str, Any]: category = self.category - documentation_url: Union[None, Unset, str] + documentation_url: None | str | Unset if isinstance(self.documentation_url, Unset): documentation_url = UNSET else: documentation_url = self.documentation_url - file_requirements_message: Union[None, Unset, str] + file_requirements_message: None | str | Unset if isinstance(self.file_requirements_message, Unset): file_requirements_message = UNSET else: file_requirements_message = self.file_requirements_message - pipeline_code: Union[Dict[str, Any], None, Unset] + pipeline_code: dict[str, Any] | None | Unset if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -112,7 +115,7 @@ def to_dict(self) -> Dict[str, Any]: uses_sample_sheet = self.uses_sample_sheet - custom_settings: Union[Dict[str, Any], None, Unset] + custom_settings: dict[str, Any] | None | Unset if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -120,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] + file_mapping_rules: list[dict[str, Any]] | None | Unset if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -132,7 +135,7 @@ def to_dict(self) -> Dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -169,12 +172,12 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -183,42 +186,42 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) - def _parse_data_type(data: object) -> Union[None, Unset, str]: + def _parse_data_type(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) data_type = _parse_data_type(d.pop("dataType", UNSET)) category = d.pop("category", UNSET) - def _parse_documentation_url(data: object) -> Union[None, Unset, str]: + def _parse_documentation_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) documentation_url = _parse_documentation_url(d.pop("documentationUrl", UNSET)) - def _parse_file_requirements_message(data: object) -> Union[None, Unset, str]: + def _parse_file_requirements_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) file_requirements_message = _parse_file_requirements_message(d.pop("fileRequirementsMessage", UNSET)) - def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: + def _parse_pipeline_code(data: object) -> None | PipelineCode | Unset: if data is None: return data if isinstance(data, Unset): @@ -229,9 +232,9 @@ def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: pipeline_code_type_1 = PipelineCode.from_dict(data) return pipeline_code_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["PipelineCode", None, Unset], data) + return cast(None | PipelineCode | Unset, data) pipeline_code = _parse_pipeline_code(d.pop("pipelineCode", UNSET)) @@ -241,7 +244,7 @@ def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: uses_sample_sheet = d.pop("usesSampleSheet", UNSET) - def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None, Unset]: + def _parse_custom_settings(data: object) -> CustomPipelineSettings | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -252,13 +255,13 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings_type_1 = CustomPipelineSettings.from_dict(data) return custom_settings_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["CustomPipelineSettings", None, Unset], data) + return cast(CustomPipelineSettings | None | Unset, data) custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: + def _parse_file_mapping_rules(data: object) -> list[FileMappingRule] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -274,9 +277,9 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No file_mapping_rules_type_0.append(file_mapping_rules_type_0_item) return file_mapping_rules_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["FileMappingRule"], None, Unset], data) + return cast(list[FileMappingRule] | None | Unset, data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) @@ -304,5 +307,17 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return custom_process_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard.py b/cirro_api_client/v1/models/dashboard.py index 7224b38..e54450e 100644 --- a/cirro_api_client/v1/models/dashboard.py +++ b/cirro_api_client/v1/models/dashboard.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -22,26 +25,26 @@ class Dashboard: id (str): name (str): description (str): - process_ids (List[str]): + process_ids (list[str]): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - dashboard_data (Union[Unset, DashboardDashboardData]): - info (Union[Unset, DashboardInfo]): + dashboard_data (DashboardDashboardData | Unset): + info (DashboardInfo | Unset): """ id: str name: str description: str - process_ids: List[str] + process_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - dashboard_data: Union[Unset, "DashboardDashboardData"] = UNSET - info: Union[Unset, "DashboardInfo"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + dashboard_data: DashboardDashboardData | Unset = UNSET + info: DashboardInfo | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -56,15 +59,15 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - dashboard_data: Union[Unset, Dict[str, Any]] = UNSET + dashboard_data: dict[str, Any] | Unset = UNSET if not isinstance(self.dashboard_data, Unset): dashboard_data = self.dashboard_data.to_dict() - info: Union[Unset, Dict[str, Any]] = UNSET + info: dict[str, Any] | Unset = UNSET if not isinstance(self.info, Unset): info = self.info.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -85,18 +88,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_dashboard_data import DashboardDashboardData from ..models.dashboard_info import DashboardInfo - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") - process_ids = cast(List[str], d.pop("processIds")) + process_ids = cast(list[str], d.pop("processIds")) created_by = d.pop("createdBy") @@ -105,14 +108,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) _dashboard_data = d.pop("dashboardData", UNSET) - dashboard_data: Union[Unset, DashboardDashboardData] + dashboard_data: DashboardDashboardData | Unset if isinstance(_dashboard_data, Unset): dashboard_data = UNSET else: dashboard_data = DashboardDashboardData.from_dict(_dashboard_data) _info = d.pop("info", UNSET) - info: Union[Unset, DashboardInfo] + info: DashboardInfo | Unset if isinstance(_info, Unset): info = UNSET else: @@ -134,5 +137,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard_dashboard_data.py b/cirro_api_client/v1/models/dashboard_dashboard_data.py index f65feee..9f33b96 100644 --- a/cirro_api_client/v1/models/dashboard_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_dashboard_data.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DashboardDashboardData: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dashboard_dashboard_data = cls() dashboard_dashboard_data.additional_properties = d return dashboard_dashboard_data @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard_info.py b/cirro_api_client/v1/models/dashboard_info.py index 9df6aff..246ee58 100644 --- a/cirro_api_client/v1/models/dashboard_info.py +++ b/cirro_api_client/v1/models/dashboard_info.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DashboardInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dashboard_info = cls() dashboard_info.additional_properties = d return dashboard_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard_request.py b/cirro_api_client/v1/models/dashboard_request.py index 358eb79..48aa4f6 100644 --- a/cirro_api_client/v1/models/dashboard_request.py +++ b/cirro_api_client/v1/models/dashboard_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -19,34 +22,34 @@ class DashboardRequest: Attributes: name (str): description (str): - process_ids (List[str]): - dashboard_data (Union[Unset, DashboardRequestDashboardData]): - info (Union[Unset, DashboardRequestInfo]): + process_ids (list[str]): + dashboard_data (DashboardRequestDashboardData | Unset): + info (DashboardRequestInfo | Unset): """ name: str description: str - process_ids: List[str] - dashboard_data: Union[Unset, "DashboardRequestDashboardData"] = UNSET - info: Union[Unset, "DashboardRequestInfo"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + process_ids: list[str] + dashboard_data: DashboardRequestDashboardData | Unset = UNSET + info: DashboardRequestInfo | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description process_ids = self.process_ids - dashboard_data: Union[Unset, Dict[str, Any]] = UNSET + dashboard_data: dict[str, Any] | Unset = UNSET if not isinstance(self.dashboard_data, Unset): dashboard_data = self.dashboard_data.to_dict() - info: Union[Unset, Dict[str, Any]] = UNSET + info: dict[str, Any] | Unset = UNSET if not isinstance(self.info, Unset): info = self.info.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,26 +66,26 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_request_dashboard_data import DashboardRequestDashboardData from ..models.dashboard_request_info import DashboardRequestInfo - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - process_ids = cast(List[str], d.pop("processIds")) + process_ids = cast(list[str], d.pop("processIds")) _dashboard_data = d.pop("dashboardData", UNSET) - dashboard_data: Union[Unset, DashboardRequestDashboardData] + dashboard_data: DashboardRequestDashboardData | Unset if isinstance(_dashboard_data, Unset): dashboard_data = UNSET else: dashboard_data = DashboardRequestDashboardData.from_dict(_dashboard_data) _info = d.pop("info", UNSET) - info: Union[Unset, DashboardRequestInfo] + info: DashboardRequestInfo | Unset if isinstance(_info, Unset): info = UNSET else: @@ -100,5 +103,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py index 21e68ab..9791f1d 100644 --- a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DashboardRequestDashboardData: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dashboard_request_dashboard_data = cls() dashboard_request_dashboard_data.additional_properties = d return dashboard_request_dashboard_data @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dashboard_request_info.py b/cirro_api_client/v1/models/dashboard_request_info.py index 69c7b1d..4bef924 100644 --- a/cirro_api_client/v1/models/dashboard_request_info.py +++ b/cirro_api_client/v1/models/dashboard_request_info.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DashboardRequestInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dashboard_request_info = cls() dashboard_request_info.additional_properties = d return dashboard_request_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/data_file.py b/cirro_api_client/v1/models/data_file.py index 86a00cc..a84e503 100644 --- a/cirro_api_client/v1/models/data_file.py +++ b/cirro_api_client/v1/models/data_file.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -19,15 +22,15 @@ class DataFile: """ path: str - metadata: "DataFileMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + metadata: DataFileMetadata + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,10 +42,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.data_file_metadata import DataFileMetadata - d = src_dict.copy() + d = dict(src_dict) path = d.pop("path") metadata = DataFileMetadata.from_dict(d.pop("metadata")) @@ -56,5 +59,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return data_file @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/data_file_metadata.py b/cirro_api_client/v1/models/data_file_metadata.py index 1080d87..9d20c75 100644 --- a/cirro_api_client/v1/models/data_file_metadata.py +++ b/cirro_api_client/v1/models/data_file_metadata.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DataFileMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) data_file_metadata = cls() data_file_metadata.additional_properties = d return data_file_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset.py b/cirro_api_client/v1/models/dataset.py index b60afaf..f27abd8 100644 --- a/cirro_api_client/v1/models/dataset.py +++ b/cirro_api_client/v1/models/dataset.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +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 @@ -23,9 +26,9 @@ class Dataset: description (str): project_id (str): process_id (str): - source_dataset_ids (List[str]): + source_dataset_ids (list[str]): status (Status): - tags (List['Tag']): + tags (list[Tag]): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): @@ -36,15 +39,15 @@ class Dataset: description: str project_id: str process_id: str - source_dataset_ids: List[str] + source_dataset_ids: list[str] status: Status - tags: List["Tag"] + tags: list[Tag] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -70,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,10 +94,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -105,7 +108,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: process_id = d.pop("processId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) status = Status(d.pop("status")) @@ -140,5 +143,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_assets_manifest.py b/cirro_api_client/v1/models/dataset_assets_manifest.py index 1890850..e566cfe 100644 --- a/cirro_api_client/v1/models/dataset_assets_manifest.py +++ b/cirro_api_client/v1/models/dataset_assets_manifest.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -19,26 +22,26 @@ class DatasetAssetsManifest: """ Attributes: - domain (Union[Unset, str]): Base URL for files Example: s3://project-1a1a/datasets/1a1a. - files (Union[Unset, List['FileEntry']]): List of files in the dataset, including metadata - total_files (Union[Unset, int]): Total number of files in the dataset, used for pagination - viz (Union[Unset, List['DatasetViz']]): List of viz to render for the dataset - tables (Union[Unset, List['Table']]): List of web optimized tables for the dataset - artifacts (Union[Unset, List['Artifact']]): Artifacts associated with the dataset + domain (str | Unset): Base URL for files Example: s3://project-1a1a/datasets/1a1a. + files (list[FileEntry] | Unset): List of files in the dataset, including metadata + total_files (int | Unset): Total number of files in the dataset, used for pagination + viz (list[DatasetViz] | Unset): List of viz to render for the dataset + tables (list[Table] | Unset): List of web optimized tables for the dataset + artifacts (list[Artifact] | Unset): Artifacts associated with the dataset """ - domain: Union[Unset, str] = UNSET - files: Union[Unset, List["FileEntry"]] = UNSET - total_files: Union[Unset, int] = UNSET - viz: Union[Unset, List["DatasetViz"]] = UNSET - tables: Union[Unset, List["Table"]] = UNSET - artifacts: Union[Unset, List["Artifact"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + domain: str | Unset = UNSET + files: list[FileEntry] | Unset = UNSET + total_files: int | Unset = UNSET + viz: list[DatasetViz] | Unset = UNSET + tables: list[Table] | Unset = UNSET + artifacts: list[Artifact] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: domain = self.domain - files: Union[Unset, List[Dict[str, Any]]] = UNSET + files: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.files, Unset): files = [] for files_item_data in self.files: @@ -47,28 +50,28 @@ def to_dict(self) -> Dict[str, Any]: total_files = self.total_files - viz: Union[Unset, List[Dict[str, Any]]] = UNSET + viz: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.viz, Unset): viz = [] for viz_item_data in self.viz: viz_item = viz_item_data.to_dict() viz.append(viz_item) - tables: Union[Unset, List[Dict[str, Any]]] = UNSET + tables: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.tables, Unset): tables = [] for tables_item_data in self.tables: tables_item = tables_item_data.to_dict() tables.append(tables_item) - artifacts: Union[Unset, List[Dict[str, Any]]] = UNSET + artifacts: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.artifacts, Unset): artifacts = [] for artifacts_item_data in self.artifacts: artifacts_item = artifacts_item_data.to_dict() artifacts.append(artifacts_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if domain is not UNSET: @@ -87,44 +90,52 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.artifact import Artifact from ..models.dataset_viz import DatasetViz from ..models.file_entry import FileEntry from ..models.table import Table - d = src_dict.copy() + d = dict(src_dict) domain = d.pop("domain", UNSET) - files = [] _files = d.pop("files", UNSET) - for files_item_data in _files or []: - files_item = FileEntry.from_dict(files_item_data) + files: list[FileEntry] | Unset = UNSET + if _files is not UNSET: + files = [] + for files_item_data in _files: + files_item = FileEntry.from_dict(files_item_data) - files.append(files_item) + files.append(files_item) total_files = d.pop("totalFiles", UNSET) - viz = [] _viz = d.pop("viz", UNSET) - for viz_item_data in _viz or []: - viz_item = DatasetViz.from_dict(viz_item_data) + viz: list[DatasetViz] | Unset = UNSET + if _viz is not UNSET: + viz = [] + for viz_item_data in _viz: + viz_item = DatasetViz.from_dict(viz_item_data) - viz.append(viz_item) + viz.append(viz_item) - tables = [] _tables = d.pop("tables", UNSET) - for tables_item_data in _tables or []: - tables_item = Table.from_dict(tables_item_data) + tables: list[Table] | Unset = UNSET + if _tables is not UNSET: + tables = [] + for tables_item_data in _tables: + tables_item = Table.from_dict(tables_item_data) - tables.append(tables_item) + tables.append(tables_item) - artifacts = [] _artifacts = d.pop("artifacts", UNSET) - for artifacts_item_data in _artifacts or []: - artifacts_item = Artifact.from_dict(artifacts_item_data) + artifacts: list[Artifact] | Unset = UNSET + if _artifacts is not UNSET: + artifacts = [] + for artifacts_item_data in _artifacts: + artifacts_item = Artifact.from_dict(artifacts_item_data) - artifacts.append(artifacts_item) + artifacts.append(artifacts_item) dataset_assets_manifest = cls( domain=domain, @@ -139,5 +150,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_assets_manifest @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_condition.py b/cirro_api_client/v1/models/dataset_condition.py index 208ea02..59c21f7 100644 --- a/cirro_api_client/v1/models/dataset_condition.py +++ b/cirro_api_client/v1/models/dataset_condition.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +21,14 @@ class DatasetCondition: field: DatasetConditionField value: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: field = self.field.value value = self.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,8 +40,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) field = DatasetConditionField(d.pop("field")) value = d.pop("value") @@ -52,5 +55,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_condition @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_detail.py b/cirro_api_client/v1/models/dataset_detail.py index b892146..5e482de 100644 --- a/cirro_api_client/v1/models/dataset_detail.py +++ b/cirro_api_client/v1/models/dataset_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -29,24 +32,24 @@ class DatasetDetail: s3 (str): process_id (str): project_id (str): - source_dataset_ids (List[str]): - source_datasets (List['NamedItem']): - source_sample_ids (List[str]): + source_dataset_ids (list[str]): + source_datasets (list[NamedItem]): + source_sample_ids (list[str]): source_sample_files_map (DatasetDetailSourceSampleFilesMap): Keys are sampleIds, and the lists are file paths to include. status (Status): status_message (str): - tags (List['Tag']): + tags (list[Tag]): params (DatasetDetailParams): info (DatasetDetailInfo): is_view_restricted (bool): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - originating_project_id (Union[Unset, str]): The originating project ID might be different if the dataset was - shared from another project. - share (Union['NamedItem', None, Unset]): - total_size_bytes (Union[None, Unset, int]): Total size of dataset files (in bytes) + originating_project_id (str | Unset): The originating project ID might be different if the dataset was shared + from another project. + share (NamedItem | None | Unset): + total_size_bytes (int | None | Unset): Total size of dataset files (in bytes) """ id: str @@ -55,25 +58,25 @@ class DatasetDetail: s3: str process_id: str project_id: str - source_dataset_ids: List[str] - source_datasets: List["NamedItem"] - source_sample_ids: List[str] - source_sample_files_map: "DatasetDetailSourceSampleFilesMap" + source_dataset_ids: list[str] + source_datasets: list[NamedItem] + source_sample_ids: list[str] + source_sample_files_map: DatasetDetailSourceSampleFilesMap status: Status status_message: str - tags: List["Tag"] - params: "DatasetDetailParams" - info: "DatasetDetailInfo" + tags: list[Tag] + params: DatasetDetailParams + info: DatasetDetailInfo is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - originating_project_id: Union[Unset, str] = UNSET - share: Union["NamedItem", None, Unset] = UNSET - total_size_bytes: Union[None, Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + originating_project_id: str | Unset = UNSET + share: NamedItem | None | Unset = UNSET + total_size_bytes: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.named_item import NamedItem id = self.id @@ -122,7 +125,7 @@ def to_dict(self) -> Dict[str, Any]: originating_project_id = self.originating_project_id - share: Union[Dict[str, Any], None, Unset] + share: dict[str, Any] | None | Unset if isinstance(self.share, Unset): share = UNSET elif isinstance(self.share, NamedItem): @@ -130,13 +133,13 @@ def to_dict(self) -> Dict[str, Any]: else: share = self.share - total_size_bytes: Union[None, Unset, int] + total_size_bytes: int | None | Unset if isinstance(self.total_size_bytes, Unset): total_size_bytes = UNSET else: total_size_bytes = self.total_size_bytes - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -171,14 +174,14 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset_detail_info import DatasetDetailInfo from ..models.dataset_detail_params import DatasetDetailParams from ..models.dataset_detail_source_sample_files_map import DatasetDetailSourceSampleFilesMap from ..models.named_item import NamedItem from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -191,7 +194,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_id = d.pop("projectId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) source_datasets = [] _source_datasets = d.pop("sourceDatasets") @@ -200,7 +203,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: source_datasets.append(source_datasets_item) - source_sample_ids = cast(List[str], d.pop("sourceSampleIds")) + source_sample_ids = cast(list[str], d.pop("sourceSampleIds")) source_sample_files_map = DatasetDetailSourceSampleFilesMap.from_dict(d.pop("sourceSampleFilesMap")) @@ -229,7 +232,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: originating_project_id = d.pop("originatingProjectId", UNSET) - def _parse_share(data: object) -> Union["NamedItem", None, Unset]: + def _parse_share(data: object) -> NamedItem | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -240,18 +243,18 @@ def _parse_share(data: object) -> Union["NamedItem", None, Unset]: share_type_1 = NamedItem.from_dict(data) return share_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NamedItem", None, Unset], data) + return cast(NamedItem | None | Unset, data) share = _parse_share(d.pop("share", UNSET)) - def _parse_total_size_bytes(data: object) -> Union[None, Unset, int]: + def _parse_total_size_bytes(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(int | None | Unset, data) total_size_bytes = _parse_total_size_bytes(d.pop("totalSizeBytes", UNSET)) @@ -284,5 +287,17 @@ def _parse_total_size_bytes(data: object) -> Union[None, Unset, int]: return dataset_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_detail_info.py b/cirro_api_client/v1/models/dataset_detail_info.py index 81e6604..aeafa70 100644 --- a/cirro_api_client/v1/models/dataset_detail_info.py +++ b/cirro_api_client/v1/models/dataset_detail_info.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DatasetDetailInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dataset_detail_info = cls() dataset_detail_info.additional_properties = d return dataset_detail_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_detail_params.py b/cirro_api_client/v1/models/dataset_detail_params.py index 30c09a3..5854afc 100644 --- a/cirro_api_client/v1/models/dataset_detail_params.py +++ b/cirro_api_client/v1/models/dataset_detail_params.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DatasetDetailParams: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dataset_detail_params = cls() dataset_detail_params.additional_properties = d return dataset_detail_params @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py index 9dc26ef..69dbe60 100644 --- a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py +++ b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -10,25 +13,23 @@ class DatasetDetailSourceSampleFilesMap: """Keys are sampleIds, and the lists are file paths to include.""" - additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + 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 - field_dict.update({}) - return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dataset_detail_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(List[str], prop_dict) + additional_property = cast(list[str], prop_dict) additional_properties[prop_name] = additional_property @@ -36,5 +37,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_detail_source_sample_files_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[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/cirro_api_client/v1/models/dataset_viz.py b/cirro_api_client/v1/models/dataset_viz.py index 4d4b24d..84b3e52 100644 --- a/cirro_api_client/v1/models/dataset_viz.py +++ b/cirro_api_client/v1/models/dataset_viz.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -16,34 +19,34 @@ class DatasetViz: """ Attributes: - path (Union[Unset, str]): Path to viz configuration, if applicable - name (Union[Unset, str]): Name of viz - desc (Union[Unset, str]): Description of viz - type (Union[Unset, str]): Type of viz Example: vitescce. - config (Union[Unset, DatasetVizConfig]): Config or path to config used to render viz + path (str | Unset): Path to viz configuration, if applicable + name (str | Unset): Name of viz + desc (str | Unset): Description of viz + type_ (str | Unset): Type of viz Example: vitescce. + config (DatasetVizConfig | Unset): Config or path to config used to render viz """ - path: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - desc: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET - config: Union[Unset, "DatasetVizConfig"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + path: str | Unset = UNSET + name: str | Unset = UNSET + desc: str | Unset = UNSET + type_: str | Unset = UNSET + config: DatasetVizConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path name = self.name desc = self.desc - type = self.type + type_ = self.type_ - config: Union[Unset, Dict[str, Any]] = UNSET + config: dict[str, Any] | Unset = UNSET if not isinstance(self.config, Unset): config = self.config.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -52,28 +55,28 @@ def to_dict(self) -> Dict[str, Any]: field_dict["name"] = name if desc is not UNSET: field_dict["desc"] = desc - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if config is not UNSET: field_dict["config"] = config return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset_viz_config import DatasetVizConfig - d = src_dict.copy() + d = dict(src_dict) path = d.pop("path", UNSET) name = d.pop("name", UNSET) desc = d.pop("desc", UNSET) - type = d.pop("type", UNSET) + type_ = d.pop("type", UNSET) _config = d.pop("config", UNSET) - config: Union[Unset, DatasetVizConfig] + config: DatasetVizConfig | Unset if isinstance(_config, Unset): config = UNSET else: @@ -83,7 +86,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: path=path, name=name, desc=desc, - type=type, + type_=type_, config=config, ) @@ -91,5 +94,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_viz @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/dataset_viz_config.py b/cirro_api_client/v1/models/dataset_viz_config.py index 7cd5cff..12ebb38 100644 --- a/cirro_api_client/v1/models/dataset_viz_config.py +++ b/cirro_api_client/v1/models/dataset_viz_config.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class DatasetVizConfig: """Config or path to config used to render viz""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dataset_viz_config = cls() dataset_viz_config.additional_properties = d return dataset_viz_config @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/discussion.py b/cirro_api_client/v1/models/discussion.py index 51e0f57..d8b1474 100644 --- a/cirro_api_client/v1/models/discussion.py +++ b/cirro_api_client/v1/models/discussion.py @@ -1,11 +1,15 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +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 from ..models.discussion_type import DiscussionType +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.entity import Entity @@ -22,27 +26,27 @@ class Discussion: name (str): description (str): entity (Entity): - type (DiscussionType): + type_ (DiscussionType): project_id (str): created_by (str): - last_message_time (datetime.datetime): created_at (datetime.datetime): updated_at (datetime.datetime): + last_message_time (datetime.datetime | None | Unset): """ id: str name: str description: str - entity: "Entity" - type: DiscussionType + entity: Entity + type_: DiscussionType project_id: str created_by: str - last_message_time: datetime.datetime created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + last_message_time: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -51,19 +55,25 @@ def to_dict(self) -> Dict[str, Any]: entity = self.entity.to_dict() - type = self.type.value + type_ = self.type_.value project_id = self.project_id created_by = self.created_by - last_message_time = self.last_message_time.isoformat() - created_at = self.created_at.isoformat() updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + last_message_time: None | str | Unset + if isinstance(self.last_message_time, Unset): + last_message_time = UNSET + elif isinstance(self.last_message_time, datetime.datetime): + last_message_time = self.last_message_time.isoformat() + else: + last_message_time = self.last_message_time + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -71,22 +81,23 @@ def to_dict(self) -> Dict[str, Any]: "name": name, "description": description, "entity": entity, - "type": type, + "type": type_, "projectId": project_id, "createdBy": created_by, - "lastMessageTime": last_message_time, "createdAt": created_at, "updatedAt": updated_at, } ) + if last_message_time is not UNSET: + field_dict["lastMessageTime"] = last_message_time return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.entity import Entity - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -95,34 +106,61 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: entity = Entity.from_dict(d.pop("entity")) - type = DiscussionType(d.pop("type")) + type_ = DiscussionType(d.pop("type")) project_id = d.pop("projectId") created_by = d.pop("createdBy") - last_message_time = isoparse(d.pop("lastMessageTime")) - created_at = isoparse(d.pop("createdAt")) updated_at = isoparse(d.pop("updatedAt")) + def _parse_last_message_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_message_time_type_0 = isoparse(data) + + return last_message_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_message_time = _parse_last_message_time(d.pop("lastMessageTime", UNSET)) + discussion = cls( id=id, name=name, description=description, entity=entity, - type=type, + type_=type_, project_id=project_id, created_by=created_by, - last_message_time=last_message_time, created_at=created_at, updated_at=updated_at, + last_message_time=last_message_time, ) discussion.additional_properties = d return discussion @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/discussion_input.py b/cirro_api_client/v1/models/discussion_input.py index a158b86..4e9c8d3 100644 --- a/cirro_api_client/v1/models/discussion_input.py +++ b/cirro_api_client/v1/models/discussion_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -19,36 +22,36 @@ class DiscussionInput: name (str): description (str): entity (Entity): - type (DiscussionType): + type_ (DiscussionType): project_id (str): """ name: str description: str - entity: "Entity" - type: DiscussionType + entity: Entity + type_: DiscussionType project_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description entity = self.entity.to_dict() - type = self.type.value + type_ = self.type_.value project_id = self.project_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, "description": description, "entity": entity, - "type": type, + "type": type_, "projectId": project_id, } ) @@ -56,17 +59,17 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.entity import Entity - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") entity = Entity.from_dict(d.pop("entity")) - type = DiscussionType(d.pop("type")) + type_ = DiscussionType(d.pop("type")) project_id = d.pop("projectId") @@ -74,7 +77,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name=name, description=description, entity=entity, - type=type, + type_=type_, project_id=project_id, ) @@ -82,5 +85,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return discussion_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/entity.py b/cirro_api_client/v1/models/entity.py index 3dfcd49..71713d6 100644 --- a/cirro_api_client/v1/models/entity.py +++ b/cirro_api_client/v1/models/entity.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,24 +15,24 @@ class Entity: """ Attributes: - type (EntityType): + type_ (EntityType): id (str): """ - type: EntityType + type_: EntityType id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type = self.type.value + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value id = self.id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "type": type, + "type": type_, "id": id, } ) @@ -37,14 +40,14 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - type = EntityType(d.pop("type")) + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = EntityType(d.pop("type")) id = d.pop("id") entity = cls( - type=type, + type_=type_, id=id, ) @@ -52,5 +55,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return entity @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/entity_type.py b/cirro_api_client/v1/models/entity_type.py index dd9e295..3542bec 100644 --- a/cirro_api_client/v1/models/entity_type.py +++ b/cirro_api_client/v1/models/entity_type.py @@ -11,9 +11,9 @@ class EntityType(str, Enum): SAMPLE = "SAMPLE" SHARE = "SHARE" TAG = "TAG" - USER = "USER" UNKNOWN = "UNKNOWN" - """ This is a fallback value for when the value is not known, do not use this value when making requests """ + USER = "USER" + WORKSPACE = "WORKSPACE" def __str__(self) -> str: return str(self.value) diff --git a/cirro_api_client/v1/models/error_message.py b/cirro_api_client/v1/models/error_message.py index c25cfd9..fffb507 100644 --- a/cirro_api_client/v1/models/error_message.py +++ b/cirro_api_client/v1/models/error_message.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +17,12 @@ class ErrorMessage: """ message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,8 +33,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) message = d.pop("message") error_message = cls( @@ -42,5 +45,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return error_message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/feature_flags.py b/cirro_api_client/v1/models/feature_flags.py index 3107594..cedc731 100644 --- a/cirro_api_client/v1/models/feature_flags.py +++ b/cirro_api_client/v1/models/feature_flags.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class FeatureFlags: project_requests_enabled: bool workspaces_enabled: bool drive_enabled: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: sftp_enabled = self.sftp_enabled governance_enabled = self.governance_enabled @@ -35,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: drive_enabled = self.drive_enabled - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,8 +53,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) sftp_enabled = d.pop("sftpEnabled") governance_enabled = d.pop("governanceEnabled") @@ -74,5 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return feature_flags @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/file_entry.py b/cirro_api_client/v1/models/file_entry.py index 9aa3602..15afaa4 100644 --- a/cirro_api_client/v1/models/file_entry.py +++ b/cirro_api_client/v1/models/file_entry.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -16,26 +19,26 @@ class FileEntry: """ Attributes: - path (Union[Unset, str]): Relative path to file Example: data/fastq/SRX12875516_SRR16674827_1.fastq.gz. - size (Union[Unset, int]): File size (in bytes) Example: 1435658507. - metadata (Union[Unset, FileEntryMetadata]): Metadata associated with the file Example: {'read': 1}. + path (str | Unset): Relative path to file Example: data/fastq/SRX12875516_SRR16674827_1.fastq.gz. + size (int | Unset): File size (in bytes) Example: 1435658507. + metadata (FileEntryMetadata | Unset): Metadata associated with the file Example: {'read': 1}. """ - path: Union[Unset, str] = UNSET - size: Union[Unset, int] = UNSET - metadata: Union[Unset, "FileEntryMetadata"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + path: str | Unset = UNSET + size: int | Unset = UNSET + metadata: FileEntryMetadata | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path size = self.size - metadata: Union[Unset, Dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -48,16 +51,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.file_entry_metadata import FileEntryMetadata - d = src_dict.copy() + d = dict(src_dict) path = d.pop("path", UNSET) size = d.pop("size", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, FileEntryMetadata] + metadata: FileEntryMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: @@ -73,5 +76,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_entry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/file_entry_metadata.py b/cirro_api_client/v1/models/file_entry_metadata.py index b44803d..4ce9115 100644 --- a/cirro_api_client/v1/models/file_entry_metadata.py +++ b/cirro_api_client/v1/models/file_entry_metadata.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class FileEntryMetadata: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) file_entry_metadata = cls() file_entry_metadata.additional_properties = d return file_entry_metadata @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/file_mapping_rule.py b/cirro_api_client/v1/models/file_mapping_rule.py index 6a322e8..c553eb2 100644 --- a/cirro_api_client/v1/models/file_mapping_rule.py +++ b/cirro_api_client/v1/models/file_mapping_rule.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -17,21 +20,21 @@ class FileMappingRule: """ Attributes: description (str): Describes the group of possible files that meet a single file type criteria. - file_name_patterns (List['FileNamePattern']): Describes the possible file patterns to expect for the file type + file_name_patterns (list[FileNamePattern]): Describes the possible file patterns to expect for the file type group. - min_ (Union[Unset, int]): Minimum number of files to expect for the file type group. - max_ (Union[Unset, int]): Maximum number of files to expect for the file type group. - is_sample (Union[Unset, bool]): Specifies if the file type will be associated with a sample. + min_ (int | Unset): Minimum number of files to expect for the file type group. + max_ (int | Unset): Maximum number of files to expect for the file type group. + is_sample (bool | Unset): Specifies if the file type will be associated with a sample. """ description: str - file_name_patterns: List["FileNamePattern"] - min_: Union[Unset, int] = UNSET - max_: Union[Unset, int] = UNSET - is_sample: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_name_patterns: list[FileNamePattern] + min_: int | Unset = UNSET + max_: int | Unset = UNSET + is_sample: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: description = self.description file_name_patterns = [] @@ -45,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: is_sample = self.is_sample - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,10 +66,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern - d = src_dict.copy() + d = dict(src_dict) description = d.pop("description") file_name_patterns = [] @@ -94,5 +97,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_mapping_rule @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/file_name_match.py b/cirro_api_client/v1/models/file_name_match.py index dc89802..985ec9c 100644 --- a/cirro_api_client/v1/models/file_name_match.py +++ b/cirro_api_client/v1/models/file_name_match.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +21,16 @@ class FileNameMatch: file_name: str sample_name: str regex_pattern_match: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_name = self.file_name sample_name = self.sample_name regex_pattern_match = self.regex_pattern_match - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,8 +43,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) file_name = d.pop("fileName") sample_name = d.pop("sampleName") @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_name_match @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/file_name_pattern.py b/cirro_api_client/v1/models/file_name_pattern.py index 1dbc48f..1cae2c0 100644 --- a/cirro_api_client/v1/models/file_name_pattern.py +++ b/cirro_api_client/v1/models/file_name_pattern.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -15,26 +18,26 @@ class FileNamePattern: example_name (str): User-readable name for the file type used for display. sample_matching_pattern (str): File name pattern, formatted as a valid regex, to extract sample name and other metadata. - description (Union[None, Unset, str]): File description. + description (None | str | Unset): File description. """ example_name: str sample_matching_pattern: str - description: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + description: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: example_name = self.example_name sample_matching_pattern = self.sample_matching_pattern - description: Union[None, Unset, str] + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +51,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) example_name = d.pop("exampleName") sample_matching_pattern = d.pop("sampleMatchingPattern") - def _parse_description(data: object) -> Union[None, Unset, str]: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -73,5 +76,17 @@ def _parse_description(data: object) -> Union[None, Unset, str]: return file_name_pattern @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/file_requirements.py b/cirro_api_client/v1/models/file_requirements.py index 0c01843..5758da2 100644 --- a/cirro_api_client/v1/models/file_requirements.py +++ b/cirro_api_client/v1/models/file_requirements.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -14,17 +17,17 @@ class FileRequirements: """ Attributes: - files (List[str]): + files (list[str]): error_msg (str): - allowed_data_types (List['AllowedDataType']): + allowed_data_types (list[AllowedDataType]): """ - files: List[str] + files: list[str] error_msg: str - allowed_data_types: List["AllowedDataType"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_data_types: list[AllowedDataType] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: files = self.files error_msg = self.error_msg @@ -34,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: allowed_data_types_item = allowed_data_types_item_data.to_dict() allowed_data_types.append(allowed_data_types_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,11 +50,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.allowed_data_type import AllowedDataType - d = src_dict.copy() - files = cast(List[str], d.pop("files")) + d = dict(src_dict) + files = cast(list[str], d.pop("files")) error_msg = d.pop("errorMsg") @@ -72,5 +75,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_requirements @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/form_schema.py b/cirro_api_client/v1/models/form_schema.py index 28357ca..b05d9ad 100644 --- a/cirro_api_client/v1/models/form_schema.py +++ b/cirro_api_client/v1/models/form_schema.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -17,24 +20,24 @@ class FormSchema: """ Attributes: - form (Union[Unset, FormSchemaForm]): JSONSchema representation of the parameters - ui (Union[Unset, FormSchemaUi]): Describes how the form should be rendered, see rjsf + form (FormSchemaForm | Unset): JSONSchema representation of the parameters + ui (FormSchemaUi | Unset): Describes how the form should be rendered, see rjsf """ - form: Union[Unset, "FormSchemaForm"] = UNSET - ui: Union[Unset, "FormSchemaUi"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + form: FormSchemaForm | Unset = UNSET + ui: FormSchemaUi | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - form: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + form: dict[str, Any] | Unset = UNSET if not isinstance(self.form, Unset): form = self.form.to_dict() - ui: Union[Unset, Dict[str, Any]] = UNSET + ui: dict[str, Any] | Unset = UNSET if not isinstance(self.ui, Unset): ui = self.ui.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if form is not UNSET: @@ -45,20 +48,20 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_schema_form import FormSchemaForm from ..models.form_schema_ui import FormSchemaUi - d = src_dict.copy() + d = dict(src_dict) _form = d.pop("form", UNSET) - form: Union[Unset, FormSchemaForm] + form: FormSchemaForm | Unset if isinstance(_form, Unset): form = UNSET else: form = FormSchemaForm.from_dict(_form) _ui = d.pop("ui", UNSET) - ui: Union[Unset, FormSchemaUi] + ui: FormSchemaUi | Unset if isinstance(_ui, Unset): ui = UNSET else: @@ -73,5 +76,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return form_schema @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/form_schema_form.py b/cirro_api_client/v1/models/form_schema_form.py index eaf6c96..8d10ad0 100644 --- a/cirro_api_client/v1/models/form_schema_form.py +++ b/cirro_api_client/v1/models/form_schema_form.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class FormSchemaForm: """JSONSchema representation of the parameters""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) form_schema_form = cls() form_schema_form.additional_properties = d return form_schema_form @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/form_schema_ui.py b/cirro_api_client/v1/models/form_schema_ui.py index eceb456..81ae512 100644 --- a/cirro_api_client/v1/models/form_schema_ui.py +++ b/cirro_api_client/v1/models/form_schema_ui.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class FormSchemaUi: """Describes how the form should be rendered, see rjsf""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) form_schema_ui = cls() form_schema_ui.additional_properties = d return form_schema_ui @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/fulfillment_response.py b/cirro_api_client/v1/models/fulfillment_response.py index 018b21a..5468fea 100644 --- a/cirro_api_client/v1/models/fulfillment_response.py +++ b/cirro_api_client/v1/models/fulfillment_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class FulfillmentResponse: fulfillment_id: str path: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: fulfillment_id = self.fulfillment_id path = self.path - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) fulfillment_id = d.pop("fulfillmentId") path = d.pop("path") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return fulfillment_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/generate_sftp_credentials_request.py b/cirro_api_client/v1/models/generate_sftp_credentials_request.py index 9809148..e90d62d 100644 --- a/cirro_api_client/v1/models/generate_sftp_credentials_request.py +++ b/cirro_api_client/v1/models/generate_sftp_credentials_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,16 +15,16 @@ class GenerateSftpCredentialsRequest: """ Attributes: - lifetime_days (Union[Unset, int]): Number of days the credentials are valid for Default: 1. + lifetime_days (int | Unset): Number of days the credentials are valid for Default: 1. """ - lifetime_days: Union[Unset, int] = 1 - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + lifetime_days: int | Unset = 1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: lifetime_days = self.lifetime_days - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if lifetime_days is not UNSET: @@ -30,8 +33,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) lifetime_days = d.pop("lifetimeDays", UNSET) generate_sftp_credentials_request = cls( @@ -42,5 +45,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return generate_sftp_credentials_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/get_execution_logs_response.py b/cirro_api_client/v1/models/get_execution_logs_response.py index e9de414..1cd5ddf 100644 --- a/cirro_api_client/v1/models/get_execution_logs_response.py +++ b/cirro_api_client/v1/models/get_execution_logs_response.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,19 +17,19 @@ class GetExecutionLogsResponse: """ Attributes: - events (List['LogEntry']): + events (list[LogEntry]): """ - events: List["LogEntry"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + events: list[LogEntry] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: 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: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,10 +40,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.log_entry import LogEntry - d = src_dict.copy() + d = dict(src_dict) events = [] _events = d.pop("events") for events_item_data in _events: @@ -56,5 +59,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_execution_logs_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/get_project_summary_response_200.py b/cirro_api_client/v1/models/get_project_summary_response_200.py index 9552fcd..5933995 100644 --- a/cirro_api_client/v1/models/get_project_summary_response_200.py +++ b/cirro_api_client/v1/models/get_project_summary_response_200.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,25 +17,23 @@ class GetProjectSummaryResponse200: """ """ - additional_properties: Dict[str, List["Task"]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list[Task]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + 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] = [] for additional_property_item_data in prop: additional_property_item = additional_property_item_data.to_dict() field_dict[prop_name].append(additional_property_item) - field_dict.update({}) - return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.task import Task - d = src_dict.copy() + d = dict(src_dict) get_project_summary_response_200 = cls() additional_properties = {} @@ -50,5 +51,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_project_summary_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[Task]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[Task]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_classification.py b/cirro_api_client/v1/models/governance_classification.py index 88e9446..77440f6 100644 --- a/cirro_api_client/v1/models/governance_classification.py +++ b/cirro_api_client/v1/models/governance_classification.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, cast +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 @@ -15,7 +18,7 @@ class GovernanceClassification: id (str): name (str): description (str): - requirement_ids (List[str]): + requirement_ids (list[str]): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): @@ -24,13 +27,13 @@ class GovernanceClassification: id: str name: str description: str - requirement_ids: List[str] + requirement_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -45,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,15 +65,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") - requirement_ids = cast(List[str], d.pop("requirementIds")) + requirement_ids = cast(list[str], d.pop("requirementIds")) created_by = d.pop("createdBy") @@ -92,5 +95,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_classification @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_contact.py b/cirro_api_client/v1/models/governance_contact.py index 9d66a9b..95e420b 100644 --- a/cirro_api_client/v1/models/governance_contact.py +++ b/cirro_api_client/v1/models/governance_contact.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,9 +35,9 @@ class GovernanceContact: created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id title = self.title @@ -53,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -72,8 +75,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") title = d.pop("title") @@ -108,5 +111,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_contact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_expiry.py b/cirro_api_client/v1/models/governance_expiry.py index 7eecbc4..0730f6c 100644 --- a/cirro_api_client/v1/models/governance_expiry.py +++ b/cirro_api_client/v1/models/governance_expiry.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -15,28 +18,28 @@ class GovernanceExpiry: """ Attributes: - type (Union[Unset, GovernanceExpiryType]): The expiry conditions that can be applied to governance requirements. - days (Union[None, Unset, int]): The number of days for a relative expiration - date (Union[None, Unset, datetime.datetime]): The date for an absolute expiration + type_ (GovernanceExpiryType | Unset): The expiry conditions that can be applied to governance requirements. + days (int | None | Unset): The number of days for a relative expiration + date (datetime.datetime | None | Unset): The date for an absolute expiration """ - type: Union[Unset, GovernanceExpiryType] = UNSET - days: Union[None, Unset, int] = UNSET - date: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + type_: GovernanceExpiryType | Unset = UNSET + days: int | None | Unset = UNSET + date: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type: Union[Unset, str] = UNSET - if not isinstance(self.type, Unset): - type = self.type.value + def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value - days: Union[None, Unset, int] + days: int | None | Unset if isinstance(self.days, Unset): days = UNSET else: days = self.days - date: Union[None, Unset, str] + date: None | str | Unset if isinstance(self.date, Unset): date = UNSET elif isinstance(self.date, datetime.datetime): @@ -44,11 +47,11 @@ def to_dict(self) -> Dict[str, Any]: else: date = self.date - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if days is not UNSET: field_dict["days"] = days if date is not UNSET: @@ -57,25 +60,25 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - _type = d.pop("type", UNSET) - type: Union[Unset, GovernanceExpiryType] - if isinstance(_type, Unset): - type = UNSET + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _type_ = d.pop("type", UNSET) + type_: GovernanceExpiryType | Unset + if isinstance(_type_, Unset): + type_ = UNSET else: - type = GovernanceExpiryType(_type) + type_ = GovernanceExpiryType(_type_) - def _parse_days(data: object) -> Union[None, Unset, int]: + def _parse_days(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(int | None | Unset, data) days = _parse_days(d.pop("days", UNSET)) - def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -86,14 +89,14 @@ def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: date_type_0 = isoparse(data) return date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) date = _parse_date(d.pop("date", UNSET)) governance_expiry = cls( - type=type, + type_=type_, days=days, date=date, ) @@ -102,5 +105,17 @@ def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: return governance_expiry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_file.py b/cirro_api_client/v1/models/governance_file.py index cdd0327..8e2a878 100644 --- a/cirro_api_client/v1/models/governance_file.py +++ b/cirro_api_client/v1/models/governance_file.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,30 +16,30 @@ class GovernanceFile: """ Attributes: - name (Union[Unset, str]): The title of the resource visible to users - description (Union[Unset, str]): A description of the resource visible to users - src (Union[Unset, str]): The file name without path or the full link path - type (Union[Unset, GovernanceFileType]): The options for supplementals for governance requirements + name (str | Unset): The title of the resource visible to users + description (str | Unset): A description of the resource visible to users + src (str | Unset): The file name without path or the full link path + type_ (GovernanceFileType | Unset): The options for supplementals for governance requirements """ - name: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - src: Union[Unset, str] = UNSET - type: Union[Unset, GovernanceFileType] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + name: str | Unset = UNSET + description: str | Unset = UNSET + src: str | Unset = UNSET + type_: GovernanceFileType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description src = self.src - type: Union[Unset, str] = UNSET - if not isinstance(self.type, Unset): - type = self.type.value + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if name is not UNSET: @@ -45,37 +48,49 @@ def to_dict(self) -> Dict[str, Any]: field_dict["description"] = description if src is not UNSET: field_dict["src"] = src - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name", UNSET) description = d.pop("description", UNSET) src = d.pop("src", UNSET) - _type = d.pop("type", UNSET) - type: Union[Unset, GovernanceFileType] - if isinstance(_type, Unset): - type = UNSET + _type_ = d.pop("type", UNSET) + type_: GovernanceFileType | Unset + if isinstance(_type_, Unset): + type_ = UNSET else: - type = GovernanceFileType(_type) + type_ = GovernanceFileType(_type_) governance_file = cls( name=name, description=description, src=src, - type=type, + type_=type_, ) governance_file.additional_properties = d return governance_file @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_file_access_request.py b/cirro_api_client/v1/models/governance_file_access_request.py index 4c7fad1..e2b67d3 100644 --- a/cirro_api_client/v1/models/governance_file_access_request.py +++ b/cirro_api_client/v1/models/governance_file_access_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -14,39 +17,39 @@ class GovernanceFileAccessRequest: """ Attributes: access_type (GovernanceAccessType): - fulfillment_id (Union[None, Unset, str]): - project_id (Union[None, Unset, str]): - token_lifetime_hours (Union[None, Unset, int]): + fulfillment_id (None | str | Unset): + project_id (None | str | Unset): + token_lifetime_hours (int | None | Unset): """ access_type: GovernanceAccessType - fulfillment_id: Union[None, Unset, str] = UNSET - project_id: Union[None, Unset, str] = UNSET - token_lifetime_hours: Union[None, Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + fulfillment_id: None | str | Unset = UNSET + project_id: None | str | Unset = UNSET + token_lifetime_hours: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_type = self.access_type.value - fulfillment_id: Union[None, Unset, str] + fulfillment_id: None | str | Unset if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - project_id: Union[None, Unset, str] + project_id: None | str | Unset if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - token_lifetime_hours: Union[None, Unset, int] + token_lifetime_hours: int | None | Unset if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,34 +66,34 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) access_type = GovernanceAccessType(d.pop("accessType")) - def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_project_id(data: object) -> Union[None, Unset, str]: + def _parse_project_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: + def _parse_token_lifetime_hours(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(int | None | Unset, data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -105,5 +108,17 @@ def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: return governance_file_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_file_input.py b/cirro_api_client/v1/models/governance_file_input.py index f37a99a..159c47b 100644 --- a/cirro_api_client/v1/models/governance_file_input.py +++ b/cirro_api_client/v1/models/governance_file_input.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,58 +18,70 @@ class GovernanceFileInput: name (str): description (str): src (str): - type (GovernanceFileType): The options for supplementals for governance requirements + type_ (GovernanceFileType): The options for supplementals for governance requirements """ name: str description: str src: str - type: GovernanceFileType - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + type_: GovernanceFileType + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description src = self.src - type = self.type.value + type_ = self.type_.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, "description": description, "src": src, - "type": type, + "type": type_, } ) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") description = d.pop("description") src = d.pop("src") - type = GovernanceFileType(d.pop("type")) + type_ = GovernanceFileType(d.pop("type")) governance_file_input = cls( name=name, description=description, src=src, - type=type, + type_=type_, ) governance_file_input.additional_properties = d return governance_file_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_requirement.py b/cirro_api_client/v1/models/governance_requirement.py index bfe8c7f..b9d527c 100644 --- a/cirro_api_client/v1/models/governance_requirement.py +++ b/cirro_api_client/v1/models/governance_requirement.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -26,49 +29,49 @@ class GovernanceRequirement: id (str): The unique identifier for the requirement name (str): The name of the requirement description (str): A brief description of the requirement - type (GovernanceType): The types of governance requirements that can be enforced + type_ (GovernanceType): The types of governance requirements that can be enforced path (str): S3 prefix where files for the requirement are saved scope (GovernanceScope): The levels at which governance requirements can be enforced - contact_ids (List[str]): The IDs of governance contacts assigned to the requirement. + contact_ids (list[str]): The IDs of governance contacts assigned to the requirement. expiration (GovernanceExpiry): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - project_id (Union[Unset, str]): The project ID if the requirement is project scope - acceptance (Union[GovernanceScope, None, Unset]): Specifies the level at which it is satisfied - enactment_date (Union[None, Unset, datetime.datetime]): The date of enactment for a requirement - supplemental_docs (Union[List['GovernanceFile'], None, Unset]): Optional files with extra information, e.g. - templates for documents, links, etc - file (Union['GovernanceFile', None, Unset]): - authorship (Union[GovernanceScope, None, Unset]): Who needs to supply the agreement document - project_file_map (Union['GovernanceRequirementProjectFileMap', None, Unset]): Files supplied by each project - when authorship is project - verification_method (Union[GovernanceTrainingVerification, None, Unset]): The value indicating how the - completion of the training is verified. + project_id (str | Unset): The project ID if the requirement is project scope + acceptance (GovernanceScope | None | Unset): Specifies the level at which it is satisfied + enactment_date (datetime.datetime | None | Unset): The date of enactment for a requirement + supplemental_docs (list[GovernanceFile] | None | Unset): Optional files with extra information, e.g. templates + for documents, links, etc + file (GovernanceFile | None | Unset): + authorship (GovernanceScope | None | Unset): Who needs to supply the agreement document + project_file_map (GovernanceRequirementProjectFileMap | None | Unset): Files supplied by each project when + authorship is project + verification_method (GovernanceTrainingVerification | None | Unset): The value indicating how the completion of + the training is verified. """ id: str name: str description: str - type: GovernanceType + type_: GovernanceType path: str scope: GovernanceScope - contact_ids: List[str] - expiration: "GovernanceExpiry" + contact_ids: list[str] + expiration: GovernanceExpiry created_by: str created_at: datetime.datetime updated_at: datetime.datetime - project_id: Union[Unset, str] = UNSET - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET - file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET - project_file_map: Union["GovernanceRequirementProjectFileMap", None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + project_id: str | Unset = UNSET + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: datetime.datetime | None | Unset = UNSET + supplemental_docs: list[GovernanceFile] | None | Unset = UNSET + file: GovernanceFile | None | Unset = UNSET + authorship: GovernanceScope | None | Unset = UNSET + project_file_map: GovernanceRequirementProjectFileMap | None | Unset = UNSET + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap @@ -78,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - type = self.type.value + type_ = self.type_.value path = self.path @@ -96,7 +99,7 @@ def to_dict(self) -> Dict[str, Any]: project_id = self.project_id - acceptance: Union[None, Unset, str] + acceptance: None | str | Unset if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -104,7 +107,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | str | Unset if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -112,7 +115,7 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -124,7 +127,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -132,7 +135,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | str | Unset if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -140,7 +143,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - project_file_map: Union[Dict[str, Any], None, Unset] + project_file_map: dict[str, Any] | None | Unset if isinstance(self.project_file_map, Unset): project_file_map = UNSET elif isinstance(self.project_file_map, GovernanceRequirementProjectFileMap): @@ -148,7 +151,7 @@ def to_dict(self) -> Dict[str, Any]: else: project_file_map = self.project_file_map - verification_method: Union[None, Unset, str] + verification_method: None | str | Unset if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -156,14 +159,14 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "id": id, "name": name, "description": description, - "type": type, + "type": type_, "path": path, "scope": scope, "contactIds": contact_ids, @@ -193,25 +196,25 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") - type = GovernanceType(d.pop("type")) + type_ = GovernanceType(d.pop("type")) path = d.pop("path") scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(List[str], d.pop("contactIds")) + contact_ids = cast(list[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) @@ -223,7 +226,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_id = d.pop("projectId", UNSET) - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -234,13 +237,13 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: acceptance_type_1 = GovernanceScope(data) return acceptance_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -251,13 +254,13 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] enactment_date_type_0 = isoparse(data) return enactment_date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list[GovernanceFile] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -273,13 +276,13 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None supplemental_docs_type_0.append(supplemental_docs_type_0_item) return supplemental_docs_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list[GovernanceFile] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) - def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: + def _parse_file(data: object) -> GovernanceFile | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -290,13 +293,13 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file_type_1 = GovernanceFile.from_dict(data) return file_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["GovernanceFile", None, Unset], data) + return cast(GovernanceFile | None | Unset, data) file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -307,13 +310,13 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: authorship_type_1 = GovernanceScope(data) return authorship_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_project_file_map(data: object) -> Union["GovernanceRequirementProjectFileMap", None, Unset]: + def _parse_project_file_map(data: object) -> GovernanceRequirementProjectFileMap | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -324,13 +327,13 @@ def _parse_project_file_map(data: object) -> Union["GovernanceRequirementProject project_file_map_type_0 = GovernanceRequirementProjectFileMap.from_dict(data) return project_file_map_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["GovernanceRequirementProjectFileMap", None, Unset], data) + return cast(GovernanceRequirementProjectFileMap | None | Unset, data) project_file_map = _parse_project_file_map(d.pop("projectFileMap", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -341,9 +344,9 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica verification_method_type_1 = GovernanceTrainingVerification(data) return verification_method_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) @@ -351,7 +354,7 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica id=id, name=name, description=description, - type=type, + type_=type_, path=path, scope=scope, contact_ids=contact_ids, @@ -373,5 +376,17 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return governance_requirement @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/governance_requirement_project_file_map.py b/cirro_api_client/v1/models/governance_requirement_project_file_map.py index 274aabf..c2e573f 100644 --- a/cirro_api_client/v1/models/governance_requirement_project_file_map.py +++ b/cirro_api_client/v1/models/governance_requirement_project_file_map.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,21 +17,20 @@ class GovernanceRequirementProjectFileMap: """Files supplied by each project when authorship is project""" - additional_properties: Dict[str, "GovernanceFile"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, GovernanceFile] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + 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() - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.governance_file import GovernanceFile - d = src_dict.copy() + d = dict(src_dict) governance_requirement_project_file_map = cls() additional_properties = {} @@ -41,5 +43,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_requirement_project_file_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> GovernanceFile: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: GovernanceFile) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/group_cost.py b/cirro_api_client/v1/models/group_cost.py index 18de1d7..9aba1be 100644 --- a/cirro_api_client/v1/models/group_cost.py +++ b/cirro_api_client/v1/models/group_cost.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,20 +15,20 @@ class GroupCost: """ Attributes: - name (Union[Unset, str]): Task status group Example: CACHED. - cost (Union[Unset, float]): Cost + name (str | Unset): Task status group Example: CACHED. + cost (float | Unset): Cost """ - name: Union[Unset, str] = UNSET - cost: Union[Unset, float] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + name: str | Unset = UNSET + cost: float | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name cost = self.cost - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if name is not UNSET: @@ -36,8 +39,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name", UNSET) cost = d.pop("cost", UNSET) @@ -51,5 +54,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return group_cost @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/import_data_request.py b/cirro_api_client/v1/models/import_data_request.py index c8c3c92..fa8af81 100644 --- a/cirro_api_client/v1/models/import_data_request.py +++ b/cirro_api_client/v1/models/import_data_request.py @@ -1,8 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 ..models.import_data_request_download_method import ImportDataRequestDownloadMethod from ..types import UNSET, Unset if TYPE_CHECKING: @@ -17,25 +21,30 @@ class ImportDataRequest: """ Attributes: name (str): Name of the dataset - public_ids (List[str]): - description (Union[Unset, str]): Description of the dataset - tags (Union[List['Tag'], None, Unset]): List of tags to apply to the dataset + public_ids (list[str]): + description (str | Unset): Description of the dataset + tags (list[Tag] | None | Unset): List of tags to apply to the dataset + download_method (ImportDataRequestDownloadMethod | Unset): Method to download FastQ files Default: + ImportDataRequestDownloadMethod.SRATOOLS. + dbgap_key (None | str | Unset): dbGaP repository key (used to access protected data on SRA) """ name: str - public_ids: List[str] - description: Union[Unset, str] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + public_ids: list[str] + description: str | Unset = UNSET + tags: list[Tag] | None | Unset = UNSET + download_method: ImportDataRequestDownloadMethod | Unset = ImportDataRequestDownloadMethod.SRATOOLS + dbgap_key: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: name = self.name public_ids = self.public_ids description = self.description - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -47,7 +56,17 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + download_method: str | Unset = UNSET + if not isinstance(self.download_method, Unset): + download_method = self.download_method.value + + dbgap_key: None | str | Unset + if isinstance(self.dbgap_key, Unset): + dbgap_key = UNSET + else: + dbgap_key = self.dbgap_key + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -59,21 +78,25 @@ def to_dict(self) -> Dict[str, Any]: field_dict["description"] = description if tags is not UNSET: field_dict["tags"] = tags + if download_method is not UNSET: + field_dict["downloadMethod"] = download_method + if dbgap_key is not UNSET: + field_dict["dbgapKey"] = dbgap_key return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") - public_ids = cast(List[str], d.pop("publicIds")) + public_ids = cast(list[str], d.pop("publicIds")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list[Tag] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -89,22 +112,52 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: tags_type_0.append(tags_type_0_item) return tags_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list[Tag] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) + _download_method = d.pop("downloadMethod", UNSET) + download_method: ImportDataRequestDownloadMethod | Unset + if isinstance(_download_method, Unset): + download_method = UNSET + else: + download_method = ImportDataRequestDownloadMethod(_download_method) + + def _parse_dbgap_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dbgap_key = _parse_dbgap_key(d.pop("dbgapKey", UNSET)) + import_data_request = cls( name=name, public_ids=public_ids, description=description, tags=tags, + download_method=download_method, + dbgap_key=dbgap_key, ) import_data_request.additional_properties = d return import_data_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/import_data_request_download_method.py b/cirro_api_client/v1/models/import_data_request_download_method.py new file mode 100644 index 0000000..e1b4e38 --- /dev/null +++ b/cirro_api_client/v1/models/import_data_request_download_method.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class ImportDataRequestDownloadMethod(str, Enum): + ASPERA = "aspera" + FTP = "ftp" + SRATOOLS = "sratools" + UNKNOWN = "UNKNOWN" + """ This is a fallback value for when the value is not known, do not use this value when making requests """ + + def __str__(self) -> str: + return str(self.value) + + @classmethod + def _missing_(cls, number): + return cls(cls.UNKNOWN) diff --git a/cirro_api_client/v1/models/invite_user_request.py b/cirro_api_client/v1/models/invite_user_request.py index 82762b0..c68f1bb 100644 --- a/cirro_api_client/v1/models/invite_user_request.py +++ b/cirro_api_client/v1/models/invite_user_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +21,16 @@ class InviteUserRequest: name: str organization: str email: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name organization = self.organization email = self.email - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,8 +43,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") organization = d.pop("organization") @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return invite_user_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/invite_user_response.py b/cirro_api_client/v1/models/invite_user_response.py index ee42ed6..285ffac 100644 --- a/cirro_api_client/v1/models/invite_user_response.py +++ b/cirro_api_client/v1/models/invite_user_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +17,12 @@ class InviteUserResponse: """ message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,8 +33,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) message = d.pop("message") invite_user_response = cls( @@ -42,5 +45,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return invite_user_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/log_entry.py b/cirro_api_client/v1/models/log_entry.py index 0e570c6..c14ddf9 100644 --- a/cirro_api_client/v1/models/log_entry.py +++ b/cirro_api_client/v1/models/log_entry.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,19 +16,19 @@ class LogEntry: """ Attributes: message (str): - timestamp (Union[Unset, int]): UNIX timestamp in milliseconds, might be blank if we don't have this info + timestamp (int | Unset): UNIX timestamp in milliseconds, might be blank if we don't have this info """ message: str - timestamp: Union[Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + timestamp: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message timestamp = self.timestamp - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,8 +41,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) message = d.pop("message") timestamp = d.pop("timestamp", UNSET) @@ -53,5 +56,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return log_entry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/login_provider.py b/cirro_api_client/v1/models/login_provider.py index babf40e..ee31934 100644 --- a/cirro_api_client/v1/models/login_provider.py +++ b/cirro_api_client/v1/models/login_provider.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +23,9 @@ class LoginProvider: name: str description: str logo_url: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -31,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: logo_url = self.logo_url - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,8 +48,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -66,5 +69,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return login_provider @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/message.py b/cirro_api_client/v1/models/message.py index 32b120d..26db617 100644 --- a/cirro_api_client/v1/models/message.py +++ b/cirro_api_client/v1/models/message.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -22,26 +25,26 @@ class Message: message_type (MessageType): id (str): message (str): - links (List['Entity']): + links (list[Entity]): has_replies (bool): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - parent_message_id (Union[None, Unset, str]): + parent_message_id (None | str | Unset): """ message_type: MessageType id: str message: str - links: List["Entity"] + links: list[Entity] has_replies: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - parent_message_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message_type = self.message_type.value id = self.id @@ -61,13 +64,13 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - parent_message_id: Union[None, Unset, str] + parent_message_id: None | str | Unset if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,10 +90,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.entity import Entity - d = src_dict.copy() + d = dict(src_dict) message_type = MessageType(d.pop("messageType")) id = d.pop("id") @@ -112,12 +115,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: + def _parse_parent_message_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -137,5 +140,17 @@ def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: return message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/message_input.py b/cirro_api_client/v1/models/message_input.py index 613adea..f73c286 100644 --- a/cirro_api_client/v1/models/message_input.py +++ b/cirro_api_client/v1/models/message_input.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -13,23 +16,23 @@ class MessageInput: """ Attributes: message (str): - parent_message_id (Union[None, Unset, str]): + parent_message_id (None | str | Unset): """ message: str - parent_message_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - parent_message_id: Union[None, Unset, str] + parent_message_id: None | str | Unset if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,16 +45,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) message = d.pop("message") - def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: + def _parse_parent_message_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -64,5 +67,17 @@ def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: return message_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/metric_record.py b/cirro_api_client/v1/models/metric_record.py index ad5bc21..e8fb841 100644 --- a/cirro_api_client/v1/models/metric_record.py +++ b/cirro_api_client/v1/models/metric_record.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +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 @@ -19,28 +22,28 @@ class MetricRecord: """ Attributes: unit (str): - date (Union[Unset, datetime.date]): Date in ISO 8601 format - services (Union[Unset, MetricRecordServices]): Map of service names to metric value Example: {'Amazon Simple - Storage Service': 24.91}. + date (datetime.date | Unset): Date in ISO 8601 format + services (MetricRecordServices | Unset): Map of service names to metric value Example: {'Amazon Simple Storage + Service': 24.91}. """ unit: str - date: Union[Unset, datetime.date] = UNSET - services: Union[Unset, "MetricRecordServices"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + date: datetime.date | Unset = UNSET + services: MetricRecordServices | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: unit = self.unit - date: Union[Unset, str] = UNSET + date: str | Unset = UNSET if not isinstance(self.date, Unset): date = self.date.isoformat() - services: Union[Unset, Dict[str, Any]] = UNSET + services: dict[str, Any] | Unset = UNSET if not isinstance(self.services, Unset): services = self.services.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,21 +58,21 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.metric_record_services import MetricRecordServices - d = src_dict.copy() + d = dict(src_dict) unit = d.pop("unit") _date = d.pop("date", UNSET) - date: Union[Unset, datetime.date] + date: datetime.date | Unset if isinstance(_date, Unset): date = UNSET else: date = isoparse(_date).date() _services = d.pop("services", UNSET) - services: Union[Unset, MetricRecordServices] + services: MetricRecordServices | Unset if isinstance(_services, Unset): services = UNSET else: @@ -85,5 +88,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return metric_record @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/metric_record_services.py b/cirro_api_client/v1/models/metric_record_services.py index 5649a8f..e6b9f6a 100644 --- a/cirro_api_client/v1/models/metric_record_services.py +++ b/cirro_api_client/v1/models/metric_record_services.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class MetricRecordServices: """ - additional_properties: Dict[str, float] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) metric_record_services = cls() metric_record_services.additional_properties = d return metric_record_services @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> float: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: float) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/mounted_dataset.py b/cirro_api_client/v1/models/mounted_dataset.py index d7f9e5c..9505e7f 100644 --- a/cirro_api_client/v1/models/mounted_dataset.py +++ b/cirro_api_client/v1/models/mounted_dataset.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +20,14 @@ class MountedDataset: name: str uri: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name uri = self.uri - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -36,8 +39,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") uri = d.pop("uri") @@ -51,5 +54,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return mounted_dataset @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/move_dataset_input.py b/cirro_api_client/v1/models/move_dataset_input.py index 5d3182c..639250d 100644 --- a/cirro_api_client/v1/models/move_dataset_input.py +++ b/cirro_api_client/v1/models/move_dataset_input.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +21,16 @@ class MoveDatasetInput: dataset_id: str source_project_id: str target_project_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: dataset_id = self.dataset_id source_project_id = self.source_project_id target_project_id = self.target_project_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,8 +43,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) dataset_id = d.pop("datasetId") source_project_id = d.pop("sourceProjectId") @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return move_dataset_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/move_dataset_response.py b/cirro_api_client/v1/models/move_dataset_response.py index 2180e35..67e6790 100644 --- a/cirro_api_client/v1/models/move_dataset_response.py +++ b/cirro_api_client/v1/models/move_dataset_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -12,22 +15,22 @@ class MoveDatasetResponse: Attributes: s_3_copy_command (str): s_3_delete_command (str): - samples_not_moved (List[str]): + samples_not_moved (list[str]): """ s_3_copy_command: str s_3_delete_command: str - samples_not_moved: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + samples_not_moved: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: s_3_copy_command = self.s_3_copy_command s_3_delete_command = self.s_3_delete_command samples_not_moved = self.samples_not_moved - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +43,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) s_3_copy_command = d.pop("s3CopyCommand") s_3_delete_command = d.pop("s3DeleteCommand") - samples_not_moved = cast(List[str], d.pop("samplesNotMoved")) + samples_not_moved = cast(list[str], d.pop("samplesNotMoved")) move_dataset_response = cls( s_3_copy_command=s_3_copy_command, @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return move_dataset_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/named_item.py b/cirro_api_client/v1/models/named_item.py index 2350132..229251c 100644 --- a/cirro_api_client/v1/models/named_item.py +++ b/cirro_api_client/v1/models/named_item.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class NamedItem: id: str name: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return named_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/notebook_instance.py b/cirro_api_client/v1/models/notebook_instance.py index 6917f63..f2aed23 100644 --- a/cirro_api_client/v1/models/notebook_instance.py +++ b/cirro_api_client/v1/models/notebook_instance.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, cast +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 @@ -19,8 +22,8 @@ class NotebookInstance: status (Status): status_message (str): instance_type (str): - accelerator_types (List[str]): - git_repositories (List[str]): + accelerator_types (list[str]): + git_repositories (list[str]): volume_size_gb (int): is_shared_with_project (bool): created_by (str): @@ -33,16 +36,16 @@ class NotebookInstance: status: Status status_message: str instance_type: str - accelerator_types: List[str] - git_repositories: List[str] + accelerator_types: list[str] + git_repositories: list[str] volume_size_gb: int is_shared_with_project: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -67,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -89,8 +92,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -101,9 +104,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: instance_type = d.pop("instanceType") - accelerator_types = cast(List[str], d.pop("acceleratorTypes")) + accelerator_types = cast(list[str], d.pop("acceleratorTypes")) - git_repositories = cast(List[str], d.pop("gitRepositories")) + git_repositories = cast(list[str], d.pop("gitRepositories")) volume_size_gb = d.pop("volumeSizeGB") @@ -134,5 +137,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return notebook_instance @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/notebook_instance_status_response.py b/cirro_api_client/v1/models/notebook_instance_status_response.py index 8042a48..df0ef2d 100644 --- a/cirro_api_client/v1/models/notebook_instance_status_response.py +++ b/cirro_api_client/v1/models/notebook_instance_status_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class NotebookInstanceStatusResponse: status: str status_message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status = self.status status_message = self.status_message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) status = d.pop("status") status_message = d.pop("statusMessage") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return notebook_instance_status_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/open_notebook_instance_response.py b/cirro_api_client/v1/models/open_notebook_instance_response.py index de09606..3f7e01b 100644 --- a/cirro_api_client/v1/models/open_notebook_instance_response.py +++ b/cirro_api_client/v1/models/open_notebook_instance_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class OpenNotebookInstanceResponse: url: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: url = self.url message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) url = d.pop("url") message = d.pop("message") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return open_notebook_instance_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py index 02f7cd2..dd9ad55 100644 --- a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py +++ b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,15 +17,15 @@ class PaginatedResponseDatasetListDto: """ Attributes: - data (List['Dataset']): + data (list[Dataset]): next_token (str): """ - data: List["Dataset"] + data: list[Dataset] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,10 +45,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset import Dataset - d = src_dict.copy() + d = dict(src_dict) data = [] _data = d.pop("data") for data_item_data in _data: @@ -64,5 +67,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_dataset_list_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/paginated_response_discussion.py b/cirro_api_client/v1/models/paginated_response_discussion.py index c0ed35f..5281a4a 100644 --- a/cirro_api_client/v1/models/paginated_response_discussion.py +++ b/cirro_api_client/v1/models/paginated_response_discussion.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,15 +17,15 @@ class PaginatedResponseDiscussion: """ Attributes: - data (List['Discussion']): + data (list[Discussion]): next_token (str): """ - data: List["Discussion"] + data: list[Discussion] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,10 +45,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.discussion import Discussion - d = src_dict.copy() + d = dict(src_dict) data = [] _data = d.pop("data") for data_item_data in _data: @@ -64,5 +67,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_discussion @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/paginated_response_message.py b/cirro_api_client/v1/models/paginated_response_message.py index 17022c9..45b8329 100644 --- a/cirro_api_client/v1/models/paginated_response_message.py +++ b/cirro_api_client/v1/models/paginated_response_message.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,15 +17,15 @@ class PaginatedResponseMessage: """ Attributes: - data (List['Message']): + data (list[Message]): next_token (str): """ - data: List["Message"] + data: list[Message] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,10 +45,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.message import Message - d = src_dict.copy() + d = dict(src_dict) data = [] _data = d.pop("data") for data_item_data in _data: @@ -64,5 +67,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/paginated_response_sample_dto.py b/cirro_api_client/v1/models/paginated_response_sample_dto.py index 75b4995..7b4b525 100644 --- a/cirro_api_client/v1/models/paginated_response_sample_dto.py +++ b/cirro_api_client/v1/models/paginated_response_sample_dto.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,15 +17,15 @@ class PaginatedResponseSampleDto: """ Attributes: - data (List['Sample']): + data (list[Sample]): next_token (str): """ - data: List["Sample"] + data: list[Sample] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,10 +45,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.sample import Sample - d = src_dict.copy() + d = dict(src_dict) data = [] _data = d.pop("data") for data_item_data in _data: @@ -64,5 +67,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_sample_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/paginated_response_user_dto.py b/cirro_api_client/v1/models/paginated_response_user_dto.py index 65f185a..aa71fce 100644 --- a/cirro_api_client/v1/models/paginated_response_user_dto.py +++ b/cirro_api_client/v1/models/paginated_response_user_dto.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -14,15 +17,15 @@ class PaginatedResponseUserDto: """ Attributes: - data (List['User']): + data (list[User]): next_token (str): """ - data: List["User"] + data: list[User] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,10 +45,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.user import User - d = src_dict.copy() + d = dict(src_dict) data = [] _data = d.pop("data") for data_item_data in _data: @@ -64,5 +67,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_user_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/pipeline_code.py b/cirro_api_client/v1/models/pipeline_code.py index bd60ed8..2b49a0b 100644 --- a/cirro_api_client/v1/models/pipeline_code.py +++ b/cirro_api_client/v1/models/pipeline_code.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,9 +26,9 @@ class PipelineCode: version: str repository_type: RepositoryType entry_point: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: repository_path = self.repository_path version = self.version @@ -34,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: entry_point = self.entry_point - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,8 +51,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) repository_path = d.pop("repositoryPath") version = d.pop("version") @@ -69,5 +72,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return pipeline_code @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/pipeline_cost.py b/cirro_api_client/v1/models/pipeline_cost.py index 4a9e401..1e58f82 100644 --- a/cirro_api_client/v1/models/pipeline_cost.py +++ b/cirro_api_client/v1/models/pipeline_cost.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -12,18 +15,18 @@ class PipelineCost: """ Attributes: - total_cost (Union[None, Unset, float]): The total cost of running the pipeline - is_estimate (Union[Unset, bool]): Is this an estimate of the cost? - description (Union[Unset, str]): Description of the cost calculation + total_cost (float | None | Unset): The total cost of running the pipeline + is_estimate (bool | Unset): Is this an estimate of the cost? + description (str | Unset): Description of the cost calculation """ - total_cost: Union[None, Unset, float] = UNSET - is_estimate: Union[Unset, bool] = UNSET - description: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + total_cost: float | None | Unset = UNSET + is_estimate: bool | Unset = UNSET + description: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - total_cost: Union[None, Unset, float] + def to_dict(self) -> dict[str, Any]: + total_cost: float | None | Unset if isinstance(self.total_cost, Unset): total_cost = UNSET else: @@ -33,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if total_cost is not UNSET: @@ -46,15 +49,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) - def _parse_total_cost(data: object) -> Union[None, Unset, float]: + def _parse_total_cost(data: object) -> float | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, float], data) + return cast(float | None | Unset, data) total_cost = _parse_total_cost(d.pop("totalCost", UNSET)) @@ -72,5 +75,17 @@ def _parse_total_cost(data: object) -> Union[None, Unset, float]: return pipeline_cost @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/portal_error_response.py b/cirro_api_client/v1/models/portal_error_response.py index e7f445f..a64ae40 100644 --- a/cirro_api_client/v1/models/portal_error_response.py +++ b/cirro_api_client/v1/models/portal_error_response.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -17,16 +20,16 @@ class PortalErrorResponse: status_code (int): error_code (str): error_detail (str): - errors (List['ErrorMessage']): + errors (list[ErrorMessage]): """ status_code: int error_code: str error_detail: str - errors: List["ErrorMessage"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + errors: list[ErrorMessage] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status_code = self.status_code error_code = self.error_code @@ -38,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: errors_item = errors_item_data.to_dict() errors.append(errors_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,10 +55,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.error_message import ErrorMessage - d = src_dict.copy() + d = dict(src_dict) status_code = d.pop("statusCode") error_code = d.pop("errorCode") @@ -80,5 +83,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return portal_error_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/postpone_workspace_autostop_input.py b/cirro_api_client/v1/models/postpone_workspace_autostop_input.py new file mode 100644 index 0000000..7355470 --- /dev/null +++ b/cirro_api_client/v1/models/postpone_workspace_autostop_input.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +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 ..types import UNSET, Unset + +T = TypeVar("T", bound="PostponeWorkspaceAutostopInput") + + +@_attrs_define +class PostponeWorkspaceAutostopInput: + """ + Attributes: + auto_stop_timeout (int | Unset): Time period (in hours) to automatically stop the workspace if running + """ + + auto_stop_timeout: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_stop_timeout = self.auto_stop_timeout + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auto_stop_timeout is not UNSET: + field_dict["autoStopTimeout"] = auto_stop_timeout + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auto_stop_timeout = d.pop("autoStopTimeout", UNSET) + + postpone_workspace_autostop_input = cls( + auto_stop_timeout=auto_stop_timeout, + ) + + postpone_workspace_autostop_input.additional_properties = d + return postpone_workspace_autostop_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/cirro_api_client/v1/models/process.py b/cirro_api_client/v1/models/process.py index 513eb8d..e75cc0a 100644 --- a/cirro_api_client/v1/models/process.py +++ b/cirro_api_client/v1/models/process.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -22,21 +25,21 @@ class Process: genes with their related biological functions. data_type (str): Name of the data type this pipeline produces (if it is not defined, use the name) executor (Executor): How the workflow is executed - child_process_ids (List[str]): IDs of pipelines that can be run downstream - parent_process_ids (List[str]): IDs of processes that can run this pipeline - linked_project_ids (List[str]): Projects that can run this process + child_process_ids (list[str]): IDs of pipelines that can be run downstream + parent_process_ids (list[str]): IDs of processes that can run this pipeline + linked_project_ids (list[str]): Projects that can run this process is_tenant_wide (bool): Whether the process is shared with the tenant allow_multiple_sources (bool): Whether the pipeline is allowed to have multiple dataset sources uses_sample_sheet (bool): Whether the pipeline uses the Cirro-provided sample sheet is_archived (bool): Whether the process is marked as archived - category (Union[Unset, str]): Category of the process Example: Microbial Analysis. - pipeline_type (Union[Unset, str]): Type of pipeline Example: nf-core. - documentation_url (Union[Unset, str]): Link to process documentation Example: + category (str | Unset): Category of the process Example: Microbial Analysis. + pipeline_type (str | Unset): Type of pipeline Example: nf-core. + documentation_url (str | Unset): Link to process documentation Example: https://docs.cirro.bio/pipelines/catalog_targeted_sequencing/#crispr-screen-analysis. - file_requirements_message (Union[Unset, str]): Description of the files to be uploaded (optional) - owner (Union[None, Unset, str]): Username of the pipeline creator (blank if Cirro curated) - created_at (Union[Unset, datetime.datetime]): When the process was created (does not reflect the pipeline code) - updated_at (Union[Unset, datetime.datetime]): When the process was updated (does not reflect the pipeline code) + file_requirements_message (str | Unset): Description of the files to be uploaded (optional) + owner (None | str | Unset): Username of the pipeline creator (blank if Cirro curated) + created_at (datetime.datetime | Unset): When the process was created (does not reflect the pipeline code) + updated_at (datetime.datetime | Unset): When the process was updated (does not reflect the pipeline code) """ id: str @@ -44,23 +47,23 @@ class Process: description: str data_type: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Union[Unset, str] = UNSET - pipeline_type: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - file_requirements_message: Union[Unset, str] = UNSET - owner: Union[None, Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + category: str | Unset = UNSET + pipeline_type: str | Unset = UNSET + documentation_url: str | Unset = UNSET + file_requirements_message: str | Unset = UNSET + owner: None | str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = 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 @@ -93,21 +96,21 @@ def to_dict(self) -> Dict[str, Any]: file_requirements_message = self.file_requirements_message - owner: Union[None, Unset, str] + owner: None | str | Unset if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - created_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Union[Unset, str] = UNSET + updated_at: str | Unset = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -143,8 +146,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -155,11 +158,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -177,24 +180,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_requirements_message = d.pop("fileRequirementsMessage", UNSET) - def _parse_owner(data: object) -> Union[None, Unset, str]: + def _parse_owner(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) owner = _parse_owner(d.pop("owner", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: datetime.datetime | Unset if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Union[Unset, datetime.datetime] + updated_at: datetime.datetime | Unset if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -226,5 +229,17 @@ def _parse_owner(data: object) -> Union[None, Unset, str]: return process @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/process_detail.py b/cirro_api_client/v1/models/process_detail.py index d362c70..5349b37 100644 --- a/cirro_api_client/v1/models/process_detail.py +++ b/cirro_api_client/v1/models/process_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -28,24 +31,24 @@ class ProcessDetail: genes with their related biological functions. data_type (str): Name of the data type this pipeline produces (if it is not defined, use the name) executor (Executor): How the workflow is executed - child_process_ids (List[str]): IDs of pipelines that can be run downstream - parent_process_ids (List[str]): IDs of processes that can run this pipeline - linked_project_ids (List[str]): Projects that can run this process + child_process_ids (list[str]): IDs of pipelines that can be run downstream + parent_process_ids (list[str]): IDs of processes that can run this pipeline + linked_project_ids (list[str]): Projects that can run this process is_tenant_wide (bool): Whether the process is shared with the tenant allow_multiple_sources (bool): Whether the pipeline is allowed to have multiple dataset sources uses_sample_sheet (bool): Whether the pipeline uses the Cirro-provided sample sheet is_archived (bool): Whether the process is marked as archived - category (Union[Unset, str]): Category of the process Example: Microbial Analysis. - pipeline_type (Union[Unset, str]): Type of pipeline Example: nf-core. - documentation_url (Union[Unset, str]): Link to process documentation Example: + category (str | Unset): Category of the process Example: Microbial Analysis. + pipeline_type (str | Unset): Type of pipeline Example: nf-core. + documentation_url (str | Unset): Link to process documentation Example: https://docs.cirro.bio/pipelines/catalog_targeted_sequencing/#crispr-screen-analysis. - file_requirements_message (Union[Unset, str]): Description of the files to be uploaded (optional) - pipeline_code (Union['PipelineCode', None, Unset]): - owner (Union[None, Unset, str]): Username of the pipeline creator (blank if Cirro curated) - custom_settings (Union['CustomPipelineSettings', None, Unset]): - file_mapping_rules (Union[List['FileMappingRule'], None, Unset]): - created_at (Union[Unset, datetime.datetime]): When the process was created (does not reflect the pipeline code) - updated_at (Union[Unset, datetime.datetime]): When the process was updated (does not reflect the pipeline code) + file_requirements_message (str | Unset): Description of the files to be uploaded (optional) + pipeline_code (None | PipelineCode | Unset): + owner (None | str | Unset): Username of the pipeline creator (blank if Cirro curated) + custom_settings (CustomPipelineSettings | None | Unset): + file_mapping_rules (list[FileMappingRule] | None | Unset): + created_at (datetime.datetime | Unset): When the process was created (does not reflect the pipeline code) + updated_at (datetime.datetime | Unset): When the process was updated (does not reflect the pipeline code) """ id: str @@ -53,26 +56,26 @@ class ProcessDetail: description: str data_type: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Union[Unset, str] = UNSET - pipeline_type: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - file_requirements_message: Union[Unset, str] = UNSET - pipeline_code: Union["PipelineCode", None, Unset] = UNSET - owner: Union[None, Unset, str] = UNSET - custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + category: str | Unset = UNSET + pipeline_type: str | Unset = UNSET + documentation_url: str | Unset = UNSET + file_requirements_message: str | Unset = UNSET + pipeline_code: None | PipelineCode | Unset = UNSET + owner: None | str | Unset = UNSET + custom_settings: CustomPipelineSettings | None | Unset = UNSET + file_mapping_rules: list[FileMappingRule] | None | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -108,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: file_requirements_message = self.file_requirements_message - pipeline_code: Union[Dict[str, Any], None, Unset] + pipeline_code: dict[str, Any] | None | Unset if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -116,13 +119,13 @@ def to_dict(self) -> Dict[str, Any]: else: pipeline_code = self.pipeline_code - owner: Union[None, Unset, str] + owner: None | str | Unset if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - custom_settings: Union[Dict[str, Any], None, Unset] + custom_settings: dict[str, Any] | None | Unset if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -130,7 +133,7 @@ def to_dict(self) -> Dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] + file_mapping_rules: list[dict[str, Any]] | None | Unset if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -142,15 +145,15 @@ def to_dict(self) -> Dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - created_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Union[Unset, str] = UNSET + updated_at: str | Unset = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -192,12 +195,12 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -208,11 +211,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -230,7 +233,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_requirements_message = d.pop("fileRequirementsMessage", UNSET) - def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: + def _parse_pipeline_code(data: object) -> None | PipelineCode | Unset: if data is None: return data if isinstance(data, Unset): @@ -241,22 +244,22 @@ def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: pipeline_code_type_1 = PipelineCode.from_dict(data) return pipeline_code_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["PipelineCode", None, Unset], data) + return cast(None | PipelineCode | Unset, data) pipeline_code = _parse_pipeline_code(d.pop("pipelineCode", UNSET)) - def _parse_owner(data: object) -> Union[None, Unset, str]: + def _parse_owner(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) owner = _parse_owner(d.pop("owner", UNSET)) - def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None, Unset]: + def _parse_custom_settings(data: object) -> CustomPipelineSettings | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -267,13 +270,13 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings_type_1 = CustomPipelineSettings.from_dict(data) return custom_settings_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["CustomPipelineSettings", None, Unset], data) + return cast(CustomPipelineSettings | None | Unset, data) custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: + def _parse_file_mapping_rules(data: object) -> list[FileMappingRule] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -289,21 +292,21 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No file_mapping_rules_type_0.append(file_mapping_rules_type_0_item) return file_mapping_rules_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["FileMappingRule"], None, Unset], data) + return cast(list[FileMappingRule] | None | Unset, data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: datetime.datetime | Unset if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Union[Unset, datetime.datetime] + updated_at: datetime.datetime | Unset if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -338,5 +341,17 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return process_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project.py b/cirro_api_client/v1/models/project.py index b409ff2..404c829 100644 --- a/cirro_api_client/v1/models/project.py +++ b/cirro_api_client/v1/models/project.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -20,9 +23,9 @@ class Project: name (str): description (str): status (Status): - tags (List['Tag']): + tags (list[Tag]): organization (str): - classification_ids (List[str]): + classification_ids (list[str]): billing_account_id (str): """ @@ -30,13 +33,13 @@ class Project: name: str description: str status: Status - tags: List["Tag"] + tags: list[Tag] organization: str - classification_ids: List[str] + classification_ids: list[str] billing_account_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -56,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: billing_account_id = self.billing_account_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -74,10 +77,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -95,7 +98,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: organization = d.pop("organization") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) billing_account_id = d.pop("billingAccountId") @@ -114,5 +117,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_access_request.py b/cirro_api_client/v1/models/project_access_request.py index 7b0a13b..710c618 100644 --- a/cirro_api_client/v1/models/project_access_request.py +++ b/cirro_api_client/v1/models/project_access_request.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,9 +38,9 @@ class ProjectAccessRequest: reviewer_username: str created_at: datetime.datetime expiry: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id username = self.username @@ -56,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: expiry = self.expiry.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -75,8 +78,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") username = d.pop("username") @@ -111,5 +114,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_create_options.py b/cirro_api_client/v1/models/project_create_options.py index df22131..157ce38 100644 --- a/cirro_api_client/v1/models/project_create_options.py +++ b/cirro_api_client/v1/models/project_create_options.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,21 +15,21 @@ class ProjectCreateOptions: """ Attributes: - enabled_account_types (List[CloudAccountType]): + enabled_account_types (list[CloudAccountType]): portal_account_id (str): portal_region (str): template_url (str): wizard_url (str): """ - enabled_account_types: List[CloudAccountType] + enabled_account_types: list[CloudAccountType] portal_account_id: str portal_region: str template_url: str wizard_url: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: enabled_account_types = [] for enabled_account_types_item_data in self.enabled_account_types: enabled_account_types_item = enabled_account_types_item_data.value @@ -40,7 +43,7 @@ def to_dict(self) -> Dict[str, Any]: wizard_url = self.wizard_url - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,8 +58,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) enabled_account_types = [] _enabled_account_types = d.pop("enabledAccountTypes") for enabled_account_types_item_data in _enabled_account_types: @@ -84,5 +87,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_create_options @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_detail.py b/cirro_api_client/v1/models/project_detail.py index e6588bd..e994833 100644 --- a/cirro_api_client/v1/models/project_detail.py +++ b/cirro_api_client/v1/models/project_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -26,39 +29,39 @@ class ProjectDetail: name (str): description (str): billing_account_id (str): - contacts (List['Contact']): + contacts (list[Contact]): organization (str): status (Status): settings (ProjectSettings): account (CloudAccount): status_message (str): - tags (List['Tag']): - classification_ids (List[str]): + tags (list[Tag]): + classification_ids (list[str]): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - deployed_at (Union[None, Unset, datetime.datetime]): + deployed_at (datetime.datetime | None | Unset): """ id: str name: str description: str billing_account_id: str - contacts: List["Contact"] + contacts: list[Contact] organization: str status: Status - settings: "ProjectSettings" - account: "CloudAccount" + settings: ProjectSettings + account: CloudAccount status_message: str - tags: List["Tag"] - classification_ids: List[str] + tags: list[Tag] + classification_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - deployed_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + deployed_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -95,7 +98,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - deployed_at: Union[None, Unset, str] + deployed_at: None | str | Unset if isinstance(self.deployed_at, Unset): deployed_at = UNSET elif isinstance(self.deployed_at, datetime.datetime): @@ -103,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: else: deployed_at = self.deployed_at - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -130,13 +133,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -169,7 +172,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: tags.append(tags_item) - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) created_by = d.pop("createdBy") @@ -177,7 +180,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_deployed_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_deployed_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -188,9 +191,9 @@ def _parse_deployed_at(data: object) -> Union[None, Unset, datetime.datetime]: deployed_at_type_0 = isoparse(data) return deployed_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) deployed_at = _parse_deployed_at(d.pop("deployedAt", UNSET)) @@ -217,5 +220,17 @@ def _parse_deployed_at(data: object) -> Union[None, Unset, datetime.datetime]: return project_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_file_access_request.py b/cirro_api_client/v1/models/project_file_access_request.py index a2a3f6c..4cd7108 100644 --- a/cirro_api_client/v1/models/project_file_access_request.py +++ b/cirro_api_client/v1/models/project_file_access_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -14,31 +17,31 @@ class ProjectFileAccessRequest: """ Attributes: access_type (ProjectAccessType): - dataset_id (Union[None, Unset, str]): - token_lifetime_hours (Union[None, Unset, int]): + dataset_id (None | str | Unset): + token_lifetime_hours (int | None | Unset): """ access_type: ProjectAccessType - dataset_id: Union[None, Unset, str] = UNSET - token_lifetime_hours: Union[None, Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + dataset_id: None | str | Unset = UNSET + token_lifetime_hours: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_type = self.access_type.value - dataset_id: Union[None, Unset, str] + dataset_id: None | str | Unset if isinstance(self.dataset_id, Unset): dataset_id = UNSET else: dataset_id = self.dataset_id - token_lifetime_hours: Union[None, Unset, int] + token_lifetime_hours: int | None | Unset if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -53,25 +56,25 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) access_type = ProjectAccessType(d.pop("accessType")) - def _parse_dataset_id(data: object) -> Union[None, Unset, str]: + def _parse_dataset_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) dataset_id = _parse_dataset_id(d.pop("datasetId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: + def _parse_token_lifetime_hours(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(int | None | Unset, data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -85,5 +88,17 @@ def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: return project_file_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_input.py b/cirro_api_client/v1/models/project_input.py index 91a60ad..a0727a2 100644 --- a/cirro_api_client/v1/models/project_input.py +++ b/cirro_api_client/v1/models/project_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -23,23 +26,23 @@ class ProjectInput: description (str): billing_account_id (str): settings (ProjectSettings): - contacts (List['Contact']): - account (Union['CloudAccount', None, Unset]): - classification_ids (Union[List[str], None, Unset]): - tags (Union[List['Tag'], None, Unset]): + contacts (list[Contact]): + account (CloudAccount | None | Unset): + classification_ids (list[str] | None | Unset): + tags (list[Tag] | None | Unset): """ name: str description: str billing_account_id: str - settings: "ProjectSettings" - contacts: List["Contact"] - account: Union["CloudAccount", None, Unset] = UNSET - classification_ids: Union[List[str], None, Unset] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + settings: ProjectSettings + contacts: list[Contact] + account: CloudAccount | None | Unset = UNSET + classification_ids: list[str] | None | Unset = UNSET + tags: list[Tag] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.cloud_account import CloudAccount name = self.name @@ -55,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: contacts_item = contacts_item_data.to_dict() contacts.append(contacts_item) - account: Union[Dict[str, Any], None, Unset] + account: dict[str, Any] | None | Unset if isinstance(self.account, Unset): account = UNSET elif isinstance(self.account, CloudAccount): @@ -63,7 +66,7 @@ def to_dict(self) -> Dict[str, Any]: else: account = self.account - classification_ids: Union[List[str], None, Unset] + classification_ids: list[str] | None | Unset if isinstance(self.classification_ids, Unset): classification_ids = UNSET elif isinstance(self.classification_ids, list): @@ -72,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: else: classification_ids = self.classification_ids - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -84,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -105,13 +108,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") @@ -127,7 +130,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: contacts.append(contacts_item) - def _parse_account(data: object) -> Union["CloudAccount", None, Unset]: + def _parse_account(data: object) -> CloudAccount | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -138,13 +141,13 @@ def _parse_account(data: object) -> Union["CloudAccount", None, Unset]: account_type_1 = CloudAccount.from_dict(data) return account_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["CloudAccount", None, Unset], data) + return cast(CloudAccount | None | Unset, data) account = _parse_account(d.pop("account", UNSET)) - def _parse_classification_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_classification_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -152,16 +155,16 @@ def _parse_classification_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - classification_ids_type_0 = cast(List[str], data) + classification_ids_type_0 = cast(list[str], data) return classification_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) classification_ids = _parse_classification_ids(d.pop("classificationIds", UNSET)) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list[Tag] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -177,9 +180,9 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: tags_type_0.append(tags_type_0_item) return tags_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list[Tag] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -198,5 +201,17 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return project_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_metrics.py b/cirro_api_client/v1/models/project_metrics.py index 158aa75..a95c12f 100644 --- a/cirro_api_client/v1/models/project_metrics.py +++ b/cirro_api_client/v1/models/project_metrics.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +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 @@ -17,37 +20,37 @@ class ProjectMetrics: """ Attributes: project_id (str): - costs (Union[Unset, List['MetricRecord']]): Costs by service by month Example: [{'date': datetime.date(2022, 11, - 1), 'unit': '$', 'service': {'Other': 26.47, 'EC2 - Other': 3.66, 'Amazon Elastic Compute Cloud - Compute': - 140.59, 'Amazon Simple Storage Service': 24.91, 'AmazonCloudWatch': 2.09}}]. - storage_metrics (Union[Unset, List['MetricRecord']]): Storage usage by tier by day Example: [{'date': + costs (list[MetricRecord] | Unset): Costs by service by month Example: [{'date': datetime.date(2022, 11, 1), + 'unit': '$', 'service': {'Other': 26.47, 'EC2 - Other': 3.66, 'Amazon Elastic Compute Cloud - Compute': 140.59, + 'Amazon Simple Storage Service': 24.91, 'AmazonCloudWatch': 2.09}}]. + storage_metrics (list[MetricRecord] | Unset): Storage usage by tier by day Example: [{'date': datetime.date(2023, 12, 12), 'unit': 'GB', 'service': {'IntelligentTieringAIAStorage': 4198.95, 'IntelligentTieringFAStorage': 1516.48, 'StandardStorage': 1.9, 'IntelligentTieringIAStorage': 2154.6}}]. """ project_id: str - costs: Union[Unset, List["MetricRecord"]] = UNSET - storage_metrics: Union[Unset, List["MetricRecord"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + costs: list[MetricRecord] | Unset = UNSET + storage_metrics: list[MetricRecord] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: project_id = self.project_id - costs: Union[Unset, List[Dict[str, Any]]] = UNSET + costs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.costs, Unset): costs = [] for costs_item_data in self.costs: costs_item = costs_item_data.to_dict() costs.append(costs_item) - storage_metrics: Union[Unset, List[Dict[str, Any]]] = UNSET + storage_metrics: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.storage_metrics, Unset): storage_metrics = [] for storage_metrics_item_data in self.storage_metrics: storage_metrics_item = storage_metrics_item_data.to_dict() storage_metrics.append(storage_metrics_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,25 +65,29 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.metric_record import MetricRecord - d = src_dict.copy() + d = dict(src_dict) project_id = d.pop("projectId") - costs = [] _costs = d.pop("costs", UNSET) - for costs_item_data in _costs or []: - costs_item = MetricRecord.from_dict(costs_item_data) + costs: list[MetricRecord] | Unset = UNSET + if _costs is not UNSET: + costs = [] + for costs_item_data in _costs: + costs_item = MetricRecord.from_dict(costs_item_data) - costs.append(costs_item) + costs.append(costs_item) - storage_metrics = [] _storage_metrics = d.pop("storageMetrics", UNSET) - for storage_metrics_item_data in _storage_metrics or []: - storage_metrics_item = MetricRecord.from_dict(storage_metrics_item_data) + storage_metrics: list[MetricRecord] | Unset = UNSET + if _storage_metrics is not UNSET: + storage_metrics = [] + for storage_metrics_item_data in _storage_metrics: + storage_metrics_item = MetricRecord.from_dict(storage_metrics_item_data) - storage_metrics.append(storage_metrics_item) + storage_metrics.append(storage_metrics_item) project_metrics = cls( project_id=project_id, @@ -92,5 +99,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_metrics @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_request.py b/cirro_api_client/v1/models/project_request.py index fdbf74a..dcc0f83 100644 --- a/cirro_api_client/v1/models/project_request.py +++ b/cirro_api_client/v1/models/project_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -12,7 +15,7 @@ class ProjectRequest: Attributes: name (str): description (str): - classification_ids (List[str]): + classification_ids (list[str]): billing_info (str): admin_username (str): message (str): @@ -20,13 +23,13 @@ class ProjectRequest: name: str description: str - classification_ids: List[str] + classification_ids: list[str] billing_info: str admin_username: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -39,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,13 +58,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) billing_info = d.pop("billingInfo") @@ -82,5 +85,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_requirement.py b/cirro_api_client/v1/models/project_requirement.py index e5f3353..bc637ee 100644 --- a/cirro_api_client/v1/models/project_requirement.py +++ b/cirro_api_client/v1/models/project_requirement.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -26,64 +29,64 @@ class ProjectRequirement: id (str): The unique identifier for the requirement name (str): The name of the requirement description (str): A brief description of the requirement - type (GovernanceType): The types of governance requirements that can be enforced + type_ (GovernanceType): The types of governance requirements that can be enforced path (str): S3 prefix where the main file for the requirement is saved supplemental_path (str): S3 prefix where supplemental files for the requirement are saved scope (GovernanceScope): The levels at which governance requirements can be enforced - contacts (List['GovernanceContact']): The governance contacts assigned to the requirement. + contacts (list[GovernanceContact]): The governance contacts assigned to the requirement. is_enacted (bool): Whether the requirement is past the enactment date is_project_configured (bool): A requirement is project configured if it was created by the tenant but needs a file uploaded by the project is_fulfilled (bool): Whether the current user has fulfilled the requirement for this project - acceptance (Union[GovernanceScope, None, Unset]): Specifies the level at which it is satisfied - enactment_date (Union[None, Unset, datetime.datetime]): The date of enactment for the requirement - expiration_type (Union[Unset, GovernanceExpiryType]): The expiry conditions that can be applied to governance + acceptance (GovernanceScope | None | Unset): Specifies the level at which it is satisfied + enactment_date (datetime.datetime | None | Unset): The date of enactment for the requirement + expiration_type (GovernanceExpiryType | Unset): The expiry conditions that can be applied to governance requirements. - expiration_days_after_completion (Union[None, Unset, int]): The number of days for a relative to completion + expiration_days_after_completion (int | None | Unset): The number of days for a relative to completion expiration - expiration_date (Union[None, Unset, datetime.datetime]): The date of expiration for the requirement - supplemental_docs (Union[List['GovernanceFile'], None, Unset]): Optional files with extra information, e.g. - templates for documents, links, etc - file (Union['GovernanceFile', None, Unset]): - authorship (Union[GovernanceScope, None, Unset]): Who needs to supply the agreement document - verification_method (Union[GovernanceTrainingVerification, None, Unset]): The value indicating how the - completion of the training is verified. - fulfillment_id (Union[None, Unset, str]): The id for the requirement fulfillment - fulfillment_date (Union[None, Unset, datetime.datetime]): The date the requirement was fulfilled by the user - fulfillment_file (Union[None, Unset, str]): The optional file uploaded to fulfill the requirement - fulfillment_path (Union[None, Unset, str]): The path to the optional fulfillment file - requires_user_fulfillment (Union[Unset, bool]): Whether this requirement requires the user to fulfill (it is - active, requires fulfillment, and user has not fulfilled + expiration_date (datetime.datetime | None | Unset): The date of expiration for the requirement + supplemental_docs (list[GovernanceFile] | None | Unset): Optional files with extra information, e.g. templates + for documents, links, etc + file (GovernanceFile | None | Unset): + authorship (GovernanceScope | None | Unset): Who needs to supply the agreement document + verification_method (GovernanceTrainingVerification | None | Unset): The value indicating how the completion of + the training is verified. + fulfillment_id (None | str | Unset): The id for the requirement fulfillment + fulfillment_date (datetime.datetime | None | Unset): The date the requirement was fulfilled by the user + fulfillment_file (None | str | Unset): The optional file uploaded to fulfill the requirement + fulfillment_path (None | str | Unset): The path to the optional fulfillment file + requires_user_fulfillment (bool | Unset): Whether this requirement requires the user to fulfill (it is active, + requires fulfillment, and user has not fulfilled """ id: str name: str description: str - type: GovernanceType + type_: GovernanceType path: str supplemental_path: str scope: GovernanceScope - contacts: List["GovernanceContact"] + contacts: list[GovernanceContact] is_enacted: bool is_project_configured: bool is_fulfilled: bool - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - expiration_type: Union[Unset, GovernanceExpiryType] = UNSET - expiration_days_after_completion: Union[None, Unset, int] = UNSET - expiration_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET - file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - fulfillment_id: Union[None, Unset, str] = UNSET - fulfillment_date: Union[None, Unset, datetime.datetime] = UNSET - fulfillment_file: Union[None, Unset, str] = UNSET - fulfillment_path: Union[None, Unset, str] = UNSET - requires_user_fulfillment: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: datetime.datetime | None | Unset = UNSET + expiration_type: GovernanceExpiryType | Unset = UNSET + expiration_days_after_completion: int | None | Unset = UNSET + expiration_date: datetime.datetime | None | Unset = UNSET + supplemental_docs: list[GovernanceFile] | None | Unset = UNSET + file: GovernanceFile | None | Unset = UNSET + authorship: GovernanceScope | None | Unset = UNSET + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + fulfillment_id: None | str | Unset = UNSET + fulfillment_date: datetime.datetime | None | Unset = UNSET + fulfillment_file: None | str | Unset = UNSET + fulfillment_path: None | str | Unset = UNSET + requires_user_fulfillment: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile id = self.id @@ -92,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - type = self.type.value + type_ = self.type_.value path = self.path @@ -111,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: is_fulfilled = self.is_fulfilled - acceptance: Union[None, Unset, str] + acceptance: None | str | Unset if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -119,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | str | Unset if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -127,17 +130,17 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - expiration_type: Union[Unset, str] = UNSET + expiration_type: str | Unset = UNSET if not isinstance(self.expiration_type, Unset): expiration_type = self.expiration_type.value - expiration_days_after_completion: Union[None, Unset, int] + expiration_days_after_completion: int | None | Unset if isinstance(self.expiration_days_after_completion, Unset): expiration_days_after_completion = UNSET else: expiration_days_after_completion = self.expiration_days_after_completion - expiration_date: Union[None, Unset, str] + expiration_date: None | str | Unset if isinstance(self.expiration_date, Unset): expiration_date = UNSET elif isinstance(self.expiration_date, datetime.datetime): @@ -145,7 +148,7 @@ def to_dict(self) -> Dict[str, Any]: else: expiration_date = self.expiration_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -157,7 +160,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -165,7 +168,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | str | Unset if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -173,7 +176,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - verification_method: Union[None, Unset, str] + verification_method: None | str | Unset if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -181,13 +184,13 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - fulfillment_id: Union[None, Unset, str] + fulfillment_id: None | str | Unset if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - fulfillment_date: Union[None, Unset, str] + fulfillment_date: None | str | Unset if isinstance(self.fulfillment_date, Unset): fulfillment_date = UNSET elif isinstance(self.fulfillment_date, datetime.datetime): @@ -195,13 +198,13 @@ def to_dict(self) -> Dict[str, Any]: else: fulfillment_date = self.fulfillment_date - fulfillment_file: Union[None, Unset, str] + fulfillment_file: None | str | Unset if isinstance(self.fulfillment_file, Unset): fulfillment_file = UNSET else: fulfillment_file = self.fulfillment_file - fulfillment_path: Union[None, Unset, str] + fulfillment_path: None | str | Unset if isinstance(self.fulfillment_path, Unset): fulfillment_path = UNSET else: @@ -209,14 +212,14 @@ def to_dict(self) -> Dict[str, Any]: requires_user_fulfillment = self.requires_user_fulfillment - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "id": id, "name": name, "description": description, - "type": type, + "type": type_, "path": path, "supplementalPath": supplemental_path, "scope": scope, @@ -258,18 +261,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.governance_contact import GovernanceContact from ..models.governance_file import GovernanceFile - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") - type = GovernanceType(d.pop("type")) + type_ = GovernanceType(d.pop("type")) path = d.pop("path") @@ -290,7 +293,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_fulfilled = d.pop("isFulfilled") - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -301,13 +304,13 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: acceptance_type_1 = GovernanceScope(data) return acceptance_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -318,31 +321,31 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] enactment_date_type_0 = isoparse(data) return enactment_date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) _expiration_type = d.pop("expirationType", UNSET) - expiration_type: Union[Unset, GovernanceExpiryType] + expiration_type: GovernanceExpiryType | Unset if isinstance(_expiration_type, Unset): expiration_type = UNSET else: expiration_type = GovernanceExpiryType(_expiration_type) - def _parse_expiration_days_after_completion(data: object) -> Union[None, Unset, int]: + def _parse_expiration_days_after_completion(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(int | None | Unset, data) expiration_days_after_completion = _parse_expiration_days_after_completion( d.pop("expirationDaysAfterCompletion", UNSET) ) - def _parse_expiration_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_expiration_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -353,13 +356,13 @@ def _parse_expiration_date(data: object) -> Union[None, Unset, datetime.datetime expiration_date_type_0 = isoparse(data) return expiration_date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) expiration_date = _parse_expiration_date(d.pop("expirationDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list[GovernanceFile] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -375,13 +378,13 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None supplemental_docs_type_0.append(supplemental_docs_type_0_item) return supplemental_docs_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list[GovernanceFile] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) - def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: + def _parse_file(data: object) -> GovernanceFile | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -392,13 +395,13 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file_type_1 = GovernanceFile.from_dict(data) return file_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["GovernanceFile", None, Unset], data) + return cast(GovernanceFile | None | Unset, data) file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -409,13 +412,13 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: authorship_type_1 = GovernanceScope(data) return authorship_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -426,22 +429,22 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica verification_method_type_1 = GovernanceTrainingVerification(data) return verification_method_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) - def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_fulfillment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_fulfillment_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -452,27 +455,27 @@ def _parse_fulfillment_date(data: object) -> Union[None, Unset, datetime.datetim fulfillment_date_type_0 = isoparse(data) return fulfillment_date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) fulfillment_date = _parse_fulfillment_date(d.pop("fulfillmentDate", UNSET)) - def _parse_fulfillment_file(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_file(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) fulfillment_file = _parse_fulfillment_file(d.pop("fulfillmentFile", UNSET)) - def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) fulfillment_path = _parse_fulfillment_path(d.pop("fulfillmentPath", UNSET)) @@ -482,7 +485,7 @@ def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: id=id, name=name, description=description, - type=type, + type_=type_, path=path, supplemental_path=supplemental_path, scope=scope, @@ -510,5 +513,17 @@ def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: return project_requirement @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_settings.py b/cirro_api_client/v1/models/project_settings.py index 3ec8132..463da85 100644 --- a/cirro_api_client/v1/models/project_settings.py +++ b/cirro_api_client/v1/models/project_settings.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -15,68 +18,65 @@ class ProjectSettings: Attributes: budget_amount (int): Total allowed cost for the budget period budget_period (BudgetPeriod): Time period associated with the budget amount - enable_backup (Union[Unset, bool]): Enables the AWS Backup service for S3 Default: False. - enable_sftp (Union[Unset, bool]): Enables access to files over SFTP Default: False. - service_connections (Union[Unset, List[str]]): List of service connections to enable - kms_arn (Union[None, Unset, str]): KMS Key ARN to encrypt S3 objects, if not provided, default bucket encryption - will be used - retention_policy_days (Union[Unset, int]): Days to keep deleted datasets before being permanently erased - Default: 7. - temporary_storage_lifetime_days (Union[Unset, int]): Days to keep temporary storage space (workflow executor - cache) Default: 14. - vpc_id (Union[None, Unset, str]): VPC that the compute environment will use Example: vpc-00000000000000000. - batch_subnets (Union[List[str], None, Unset]): List of subnets that the pipeline compute environment will use - Example: ['subnet-00000000000000000']. - sagemaker_subnets (Union[List[str], None, Unset]): List of subnets that the sagemaker instances will use + enable_backup (bool | Unset): Enables the AWS Backup service for S3 Default: False. + enable_sftp (bool | Unset): Enables access to files over SFTP Default: False. + service_connections (list[str] | Unset): List of service connections to enable + kms_arn (None | str | Unset): KMS Key ARN to encrypt S3 objects, if not provided, default bucket encryption will + be used + retention_policy_days (int | Unset): Days to keep deleted datasets before being permanently erased Default: 7. + temporary_storage_lifetime_days (int | Unset): Days to keep temporary storage space (workflow executor cache) + Default: 14. + vpc_id (None | str | Unset): VPC that the compute environment will use Example: vpc-00000000000000000. + batch_subnets (list[str] | None | Unset): List of subnets that the pipeline compute environment will use Example: ['subnet-00000000000000000']. - workspace_subnets (Union[List[str], None, Unset]): List of subnets that workspace instances will use Example: + sagemaker_subnets (list[str] | None | Unset): List of subnets that the sagemaker instances will use Example: ['subnet-00000000000000000']. - max_spot_vcpu (Union[Unset, int]): vCPU service quota limit for standard spot instances (pipelines) Default: 0. - max_fpgavcpu (Union[Unset, int]): vCPU service quota limit for FPGA-enabled instances (pipelines) Default: 0. - max_gpuvcpu (Union[Unset, int]): vCPU service quota limit for GPU-enabled spot instances (pipelines) Default: 0. - enable_dragen (Union[Unset, bool]): Enables the DRAGEN compute environment (pipelines) Default: False. - dragen_ami (Union[None, Unset, str]): AMI ID for the DRAGEN compute environment, if enabled (pipelines) - max_workspaces_vcpu (Union[Unset, int]): vCPU service quota limit for standard instances (workspaces) Default: + workspace_subnets (list[str] | None | Unset): List of subnets that workspace instances will use Example: + ['subnet-00000000000000000']. + max_spot_vcpu (int | Unset): vCPU service quota limit for standard spot instances (pipelines) Default: 0. + max_fpgavcpu (int | Unset): vCPU service quota limit for FPGA-enabled instances (pipelines) Default: 0. + max_gpuvcpu (int | Unset): vCPU service quota limit for GPU-enabled spot instances (pipelines) Default: 0. + enable_dragen (bool | Unset): Enables the DRAGEN compute environment (pipelines) Default: False. + dragen_ami (None | str | Unset): AMI ID for the DRAGEN compute environment, if enabled (pipelines) + max_workspaces_vcpu (int | Unset): vCPU service quota limit for standard instances (workspaces) Default: 0. + max_workspaces_gpuvcpu (int | Unset): vCPU service quota limit for GPU-enabled instances (workspaces) Default: 0. - max_workspaces_gpuvcpu (Union[Unset, int]): vCPU service quota limit for GPU-enabled instances (workspaces) - Default: 0. - max_workspaces_per_user (Union[Unset, int]): Maximum number of workspaces per user (workspaces) Default: 0. - is_discoverable (Union[None, Unset, bool]): Enables the project to be discoverable by other users Default: + max_workspaces_per_user (int | Unset): Maximum number of workspaces per user (workspaces) Default: 0. + is_discoverable (bool | None | Unset): Enables the project to be discoverable by other users Default: False. + is_shareable (bool | None | Unset): Enables the project to be shared with other projects Default: False. + has_pipelines_enabled (bool | None | Unset): (Read-only) Whether this project has pipelines enabled Default: + False. + has_workspaces_enabled (bool | None | Unset): (Read-only) Whether this project has workspaces enabled Default: False. - is_shareable (Union[None, Unset, bool]): Enables the project to be shared with other projects Default: False. - has_pipelines_enabled (Union[None, Unset, bool]): (Read-only) Whether this project has pipelines enabled - Default: False. - has_workspaces_enabled (Union[None, Unset, bool]): (Read-only) Whether this project has workspaces enabled - Default: False. """ budget_amount: int budget_period: BudgetPeriod - enable_backup: Union[Unset, bool] = False - enable_sftp: Union[Unset, bool] = False - service_connections: Union[Unset, List[str]] = UNSET - kms_arn: Union[None, Unset, str] = UNSET - retention_policy_days: Union[Unset, int] = 7 - temporary_storage_lifetime_days: Union[Unset, int] = 14 - vpc_id: Union[None, Unset, str] = UNSET - batch_subnets: Union[List[str], None, Unset] = UNSET - sagemaker_subnets: Union[List[str], None, Unset] = UNSET - workspace_subnets: Union[List[str], None, Unset] = UNSET - max_spot_vcpu: Union[Unset, int] = 0 - max_fpgavcpu: Union[Unset, int] = 0 - max_gpuvcpu: Union[Unset, int] = 0 - enable_dragen: Union[Unset, bool] = False - dragen_ami: Union[None, Unset, str] = UNSET - max_workspaces_vcpu: Union[Unset, int] = 0 - max_workspaces_gpuvcpu: Union[Unset, int] = 0 - max_workspaces_per_user: Union[Unset, int] = 0 - is_discoverable: Union[None, Unset, bool] = False - is_shareable: Union[None, Unset, bool] = False - has_pipelines_enabled: Union[None, Unset, bool] = False - has_workspaces_enabled: Union[None, Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + enable_backup: bool | Unset = False + enable_sftp: bool | Unset = False + service_connections: list[str] | Unset = UNSET + kms_arn: None | str | Unset = UNSET + retention_policy_days: int | Unset = 7 + temporary_storage_lifetime_days: int | Unset = 14 + vpc_id: None | str | Unset = UNSET + batch_subnets: list[str] | None | Unset = UNSET + sagemaker_subnets: list[str] | None | Unset = UNSET + workspace_subnets: list[str] | None | Unset = UNSET + max_spot_vcpu: int | Unset = 0 + max_fpgavcpu: int | Unset = 0 + max_gpuvcpu: int | Unset = 0 + enable_dragen: bool | Unset = False + dragen_ami: None | str | Unset = UNSET + max_workspaces_vcpu: int | Unset = 0 + max_workspaces_gpuvcpu: int | Unset = 0 + max_workspaces_per_user: int | Unset = 0 + is_discoverable: bool | None | Unset = False + is_shareable: bool | None | Unset = False + has_pipelines_enabled: bool | None | Unset = False + has_workspaces_enabled: bool | None | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: budget_amount = self.budget_amount budget_period = self.budget_period.value @@ -85,11 +85,11 @@ def to_dict(self) -> Dict[str, Any]: enable_sftp = self.enable_sftp - service_connections: Union[Unset, List[str]] = UNSET + service_connections: list[str] | Unset = UNSET if not isinstance(self.service_connections, Unset): service_connections = self.service_connections - kms_arn: Union[None, Unset, str] + kms_arn: None | str | Unset if isinstance(self.kms_arn, Unset): kms_arn = UNSET else: @@ -99,13 +99,13 @@ def to_dict(self) -> Dict[str, Any]: temporary_storage_lifetime_days = self.temporary_storage_lifetime_days - vpc_id: Union[None, Unset, str] + vpc_id: None | str | Unset if isinstance(self.vpc_id, Unset): vpc_id = UNSET else: vpc_id = self.vpc_id - batch_subnets: Union[List[str], None, Unset] + batch_subnets: list[str] | None | Unset if isinstance(self.batch_subnets, Unset): batch_subnets = UNSET elif isinstance(self.batch_subnets, list): @@ -114,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: else: batch_subnets = self.batch_subnets - sagemaker_subnets: Union[List[str], None, Unset] + sagemaker_subnets: list[str] | None | Unset if isinstance(self.sagemaker_subnets, Unset): sagemaker_subnets = UNSET elif isinstance(self.sagemaker_subnets, list): @@ -123,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: else: sagemaker_subnets = self.sagemaker_subnets - workspace_subnets: Union[List[str], None, Unset] + workspace_subnets: list[str] | None | Unset if isinstance(self.workspace_subnets, Unset): workspace_subnets = UNSET elif isinstance(self.workspace_subnets, list): @@ -140,7 +140,7 @@ def to_dict(self) -> Dict[str, Any]: enable_dragen = self.enable_dragen - dragen_ami: Union[None, Unset, str] + dragen_ami: None | str | Unset if isinstance(self.dragen_ami, Unset): dragen_ami = UNSET else: @@ -152,31 +152,31 @@ def to_dict(self) -> Dict[str, Any]: max_workspaces_per_user = self.max_workspaces_per_user - is_discoverable: Union[None, Unset, bool] + is_discoverable: bool | None | Unset if isinstance(self.is_discoverable, Unset): is_discoverable = UNSET else: is_discoverable = self.is_discoverable - is_shareable: Union[None, Unset, bool] + is_shareable: bool | None | Unset if isinstance(self.is_shareable, Unset): is_shareable = UNSET else: is_shareable = self.is_shareable - has_pipelines_enabled: Union[None, Unset, bool] + has_pipelines_enabled: bool | None | Unset if isinstance(self.has_pipelines_enabled, Unset): has_pipelines_enabled = UNSET else: has_pipelines_enabled = self.has_pipelines_enabled - has_workspaces_enabled: Union[None, Unset, bool] + has_workspaces_enabled: bool | None | Unset if isinstance(self.has_workspaces_enabled, Unset): has_workspaces_enabled = UNSET else: has_workspaces_enabled = self.has_workspaces_enabled - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -232,8 +232,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) budget_amount = d.pop("budgetAmount") budget_period = BudgetPeriod(d.pop("budgetPeriod")) @@ -242,14 +242,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enable_sftp = d.pop("enableSftp", UNSET) - service_connections = cast(List[str], d.pop("serviceConnections", UNSET)) + service_connections = cast(list[str], d.pop("serviceConnections", UNSET)) - def _parse_kms_arn(data: object) -> Union[None, Unset, str]: + def _parse_kms_arn(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) kms_arn = _parse_kms_arn(d.pop("kmsArn", UNSET)) @@ -257,16 +257,16 @@ def _parse_kms_arn(data: object) -> Union[None, Unset, str]: temporary_storage_lifetime_days = d.pop("temporaryStorageLifetimeDays", UNSET) - def _parse_vpc_id(data: object) -> Union[None, Unset, str]: + def _parse_vpc_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) vpc_id = _parse_vpc_id(d.pop("vpcId", UNSET)) - def _parse_batch_subnets(data: object) -> Union[List[str], None, Unset]: + def _parse_batch_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -274,16 +274,16 @@ def _parse_batch_subnets(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - batch_subnets_type_0 = cast(List[str], data) + batch_subnets_type_0 = cast(list[str], data) return batch_subnets_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) batch_subnets = _parse_batch_subnets(d.pop("batchSubnets", UNSET)) - def _parse_sagemaker_subnets(data: object) -> Union[List[str], None, Unset]: + def _parse_sagemaker_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -291,16 +291,16 @@ def _parse_sagemaker_subnets(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - sagemaker_subnets_type_0 = cast(List[str], data) + sagemaker_subnets_type_0 = cast(list[str], data) return sagemaker_subnets_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) sagemaker_subnets = _parse_sagemaker_subnets(d.pop("sagemakerSubnets", UNSET)) - def _parse_workspace_subnets(data: object) -> Union[List[str], None, Unset]: + def _parse_workspace_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -308,12 +308,12 @@ def _parse_workspace_subnets(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - workspace_subnets_type_0 = cast(List[str], data) + workspace_subnets_type_0 = cast(list[str], data) return workspace_subnets_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) workspace_subnets = _parse_workspace_subnets(d.pop("workspaceSubnets", UNSET)) @@ -325,12 +325,12 @@ def _parse_workspace_subnets(data: object) -> Union[List[str], None, Unset]: enable_dragen = d.pop("enableDragen", UNSET) - def _parse_dragen_ami(data: object) -> Union[None, Unset, str]: + def _parse_dragen_ami(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) dragen_ami = _parse_dragen_ami(d.pop("dragenAmi", UNSET)) @@ -340,39 +340,39 @@ def _parse_dragen_ami(data: object) -> Union[None, Unset, str]: max_workspaces_per_user = d.pop("maxWorkspacesPerUser", UNSET) - def _parse_is_discoverable(data: object) -> Union[None, Unset, bool]: + def _parse_is_discoverable(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(bool | None | Unset, data) is_discoverable = _parse_is_discoverable(d.pop("isDiscoverable", UNSET)) - def _parse_is_shareable(data: object) -> Union[None, Unset, bool]: + def _parse_is_shareable(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(bool | None | Unset, data) is_shareable = _parse_is_shareable(d.pop("isShareable", UNSET)) - def _parse_has_pipelines_enabled(data: object) -> Union[None, Unset, bool]: + def _parse_has_pipelines_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(bool | None | Unset, data) has_pipelines_enabled = _parse_has_pipelines_enabled(d.pop("hasPipelinesEnabled", UNSET)) - def _parse_has_workspaces_enabled(data: object) -> Union[None, Unset, bool]: + def _parse_has_workspaces_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(bool | None | Unset, data) has_workspaces_enabled = _parse_has_workspaces_enabled(d.pop("hasWorkspacesEnabled", UNSET)) @@ -407,5 +407,17 @@ def _parse_has_workspaces_enabled(data: object) -> Union[None, Unset, bool]: return project_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/project_user.py b/cirro_api_client/v1/models/project_user.py index f1a8616..454e1f4 100644 --- a/cirro_api_client/v1/models/project_user.py +++ b/cirro_api_client/v1/models/project_user.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,9 +31,9 @@ class ProjectUser: email: str job_title: str role: ProjectRole - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name username = self.username @@ -45,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: role = self.role.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,8 +65,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") username = d.pop("username") @@ -92,5 +95,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_user @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/reference.py b/cirro_api_client/v1/models/reference.py index 5df9055..35d3490 100644 --- a/cirro_api_client/v1/models/reference.py +++ b/cirro_api_client/v1/models/reference.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +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 @@ -19,8 +22,8 @@ class Reference: id (str): name (str): description (str): - type (str): - files (List['FileEntry']): + type_ (str): + files (list[FileEntry]): created_by (str): created_at (datetime.datetime): """ @@ -28,20 +31,20 @@ class Reference: id: str name: str description: str - type: str - files: List["FileEntry"] + type_: str + files: list[FileEntry] created_by: str created_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name description = self.description - type = self.type + type_ = self.type_ files = [] for files_item_data in self.files: @@ -52,14 +55,14 @@ def to_dict(self) -> Dict[str, Any]: created_at = self.created_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "id": id, "name": name, "description": description, - "type": type, + "type": type_, "files": files, "createdBy": created_by, "createdAt": created_at, @@ -69,17 +72,17 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.file_entry import FileEntry - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") - type = d.pop("type") + type_ = d.pop("type") files = [] _files = d.pop("files") @@ -96,7 +99,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: id=id, name=name, description=description, - type=type, + type_=type_, files=files, created_by=created_by, created_at=created_at, @@ -106,5 +109,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return reference @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/reference_type.py b/cirro_api_client/v1/models/reference_type.py index e8124ff..0c5f696 100644 --- a/cirro_api_client/v1/models/reference_type.py +++ b/cirro_api_client/v1/models/reference_type.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -17,16 +20,16 @@ class ReferenceType: name (str): description (str): directory (str): - validation (List['ReferenceTypeValidationItem']): + validation (list[ReferenceTypeValidationItem]): """ name: str description: str directory: str - validation: List["ReferenceTypeValidationItem"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + validation: list[ReferenceTypeValidationItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -38,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: validation_item = validation_item_data.to_dict() validation.append(validation_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,10 +55,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.reference_type_validation_item import ReferenceTypeValidationItem - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") @@ -80,5 +83,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return reference_type @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/reference_type_validation_item.py b/cirro_api_client/v1/models/reference_type_validation_item.py index 680bd17..0fff3b2 100644 --- a/cirro_api_client/v1/models/reference_type_validation_item.py +++ b/cirro_api_client/v1/models/reference_type_validation_item.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class ReferenceTypeValidationItem: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) reference_type_validation_item = cls() reference_type_validation_item.additional_properties = d return reference_type_validation_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/requirement_fulfillment_input.py b/cirro_api_client/v1/models/requirement_fulfillment_input.py index f2fdd8d..2cdeea6 100644 --- a/cirro_api_client/v1/models/requirement_fulfillment_input.py +++ b/cirro_api_client/v1/models/requirement_fulfillment_input.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -14,22 +17,22 @@ class RequirementFulfillmentInput: """ Attributes: - file (Union[None, Unset, str]): - completed_on (Union[None, Unset, datetime.datetime]): If not provided, defaults to the current instant + file (None | str | Unset): + completed_on (datetime.datetime | None | Unset): If not provided, defaults to the current instant """ - file: Union[None, Unset, str] = UNSET - completed_on: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file: None | str | Unset = UNSET + completed_on: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - file: Union[None, Unset, str] + def to_dict(self) -> dict[str, Any]: + file: None | str | Unset if isinstance(self.file, Unset): file = UNSET else: file = self.file - completed_on: Union[None, Unset, str] + completed_on: None | str | Unset if isinstance(self.completed_on, Unset): completed_on = UNSET elif isinstance(self.completed_on, datetime.datetime): @@ -37,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: else: completed_on = self.completed_on - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if file is not UNSET: @@ -48,19 +51,19 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) - def _parse_file(data: object) -> Union[None, Unset, str]: + def _parse_file(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) file = _parse_file(d.pop("file", UNSET)) - def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_completed_on(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -71,9 +74,9 @@ def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: completed_on_type_0 = isoparse(data) return completed_on_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) completed_on = _parse_completed_on(d.pop("completedOn", UNSET)) @@ -86,5 +89,17 @@ def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: return requirement_fulfillment_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/requirement_input.py b/cirro_api_client/v1/models/requirement_input.py index ba13e0f..d1c8eb1 100644 --- a/cirro_api_client/v1/models/requirement_input.py +++ b/cirro_api_client/v1/models/requirement_input.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -24,42 +27,42 @@ class RequirementInput: Attributes: name (str): description (str): - type (GovernanceType): The types of governance requirements that can be enforced + type_ (GovernanceType): The types of governance requirements that can be enforced scope (GovernanceScope): The levels at which governance requirements can be enforced - contact_ids (List[str]): + contact_ids (list[str]): expiration (GovernanceExpiry): - project_id (Union[None, Unset, str]): - acceptance (Union[GovernanceScope, None, Unset]): - enactment_date (Union[None, Unset, datetime.datetime]): - supplemental_docs (Union[List['GovernanceFile'], None, Unset]): - file (Union['GovernanceFile', None, Unset]): - authorship (Union[GovernanceScope, None, Unset]): - verification_method (Union[GovernanceTrainingVerification, None, Unset]): + project_id (None | str | Unset): + acceptance (GovernanceScope | None | Unset): + enactment_date (datetime.datetime | None | Unset): + supplemental_docs (list[GovernanceFile] | None | Unset): + file (GovernanceFile | None | Unset): + authorship (GovernanceScope | None | Unset): + verification_method (GovernanceTrainingVerification | None | Unset): """ name: str description: str - type: GovernanceType + type_: GovernanceType scope: GovernanceScope - contact_ids: List[str] - expiration: "GovernanceExpiry" - project_id: Union[None, Unset, str] = UNSET - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET - file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + contact_ids: list[str] + expiration: GovernanceExpiry + project_id: None | str | Unset = UNSET + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: datetime.datetime | None | Unset = UNSET + supplemental_docs: list[GovernanceFile] | None | Unset = UNSET + file: GovernanceFile | None | Unset = UNSET + authorship: GovernanceScope | None | Unset = UNSET + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile name = self.name description = self.description - type = self.type.value + type_ = self.type_.value scope = self.scope.value @@ -67,13 +70,13 @@ def to_dict(self) -> Dict[str, Any]: expiration = self.expiration.to_dict() - project_id: Union[None, Unset, str] + project_id: None | str | Unset if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - acceptance: Union[None, Unset, str] + acceptance: None | str | Unset if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -81,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | str | Unset if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -89,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -101,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -109,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | str | Unset if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -117,7 +120,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - verification_method: Union[None, Unset, str] + verification_method: None | str | Unset if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -125,13 +128,13 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, "description": description, - "type": type, + "type": type_, "scope": scope, "contactIds": contact_ids, "expiration": expiration, @@ -155,33 +158,33 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - type = GovernanceType(d.pop("type")) + type_ = GovernanceType(d.pop("type")) scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(List[str], d.pop("contactIds")) + contact_ids = cast(list[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) - def _parse_project_id(data: object) -> Union[None, Unset, str]: + def _parse_project_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -192,13 +195,13 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: acceptance_type_1 = GovernanceScope(data) return acceptance_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -209,13 +212,13 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] enactment_date_type_0 = isoparse(data) return enactment_date_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list[GovernanceFile] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -231,13 +234,13 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None supplemental_docs_type_0.append(supplemental_docs_type_0_item) return supplemental_docs_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list[GovernanceFile] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) - def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: + def _parse_file(data: object) -> GovernanceFile | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -248,13 +251,13 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file_type_1 = GovernanceFile.from_dict(data) return file_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["GovernanceFile", None, Unset], data) + return cast(GovernanceFile | None | Unset, data) file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -265,13 +268,13 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: authorship_type_1 = GovernanceScope(data) return authorship_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -282,16 +285,16 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica verification_method_type_1 = GovernanceTrainingVerification(data) return verification_method_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) requirement_input = cls( name=name, description=description, - type=type, + type_=type_, scope=scope, contact_ids=contact_ids, expiration=expiration, @@ -308,5 +311,17 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return requirement_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/resources_info.py b/cirro_api_client/v1/models/resources_info.py index 1fad5c2..5b61822 100644 --- a/cirro_api_client/v1/models/resources_info.py +++ b/cirro_api_client/v1/models/resources_info.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class ResourcesInfo: date: datetime.datetime repository: str source_version: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: commit = self.commit date = self.date.isoformat() @@ -33,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: source_version = self.source_version - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,8 +50,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) commit = d.pop("commit") date = isoparse(d.pop("date")) @@ -68,5 +71,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return resources_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/run_analysis_request.py b/cirro_api_client/v1/models/run_analysis_request.py index 3aec141..bddf025 100644 --- a/cirro_api_client/v1/models/run_analysis_request.py +++ b/cirro_api_client/v1/models/run_analysis_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -19,34 +22,34 @@ class RunAnalysisRequest: Attributes: name (str): Name of the dataset process_id (str): Process ID of the workflow Example: process-nf-core-rnaseq-3_8. - source_dataset_ids (List[str]): These datasets contain files that are inputs to this workflow. + source_dataset_ids (list[str]): These datasets contain files that are inputs to this workflow. params (RunAnalysisRequestParams): Parameters used in workflow (can be empty) - notification_emails (List[str]): Emails to notify upon workflow success or failure - description (Union[None, Unset, str]): Description of the dataset (optional) - source_sample_ids (Union[List[str], None, Unset]): Samples within the source datasets that will be used as - inputs to this workflow. If not specified, all samples will be used. - source_sample_files_map (Union['RunAnalysisRequestSourceSampleFilesMap', None, Unset]): Files containing samples - used to define source data input to this workflow. If not specified, all files will be used. Keys are sampleIds, - and the lists are file paths to include. - resume_dataset_id (Union[None, Unset, str]): Used for caching task execution. If the parameters are the same as - the dataset specified here, it will re-use the output to minimize duplicate work - compute_environment_id (Union[None, Unset, str]): The compute environment where to run the workflow, if not + notification_emails (list[str]): Emails to notify upon workflow success or failure + description (None | str | Unset): Description of the dataset (optional) + source_sample_ids (list[str] | None | Unset): Samples within the source datasets that will be used as inputs to + this workflow. If not specified, all samples will be used. + source_sample_files_map (None | RunAnalysisRequestSourceSampleFilesMap | Unset): Files containing samples used + to define source data input to this workflow. If not specified, all files will be used. Keys are sampleIds, and + the lists are file paths to include. + resume_dataset_id (None | str | Unset): Used for caching task execution. If the parameters are the same as the + dataset specified here, it will re-use the output to minimize duplicate work + compute_environment_id (None | str | Unset): The compute environment where to run the workflow, if not specified, it will run in AWS """ name: str process_id: str - source_dataset_ids: List[str] - params: "RunAnalysisRequestParams" - notification_emails: List[str] - description: Union[None, Unset, str] = UNSET - source_sample_ids: Union[List[str], None, Unset] = UNSET - source_sample_files_map: Union["RunAnalysisRequestSourceSampleFilesMap", None, Unset] = UNSET - resume_dataset_id: Union[None, Unset, str] = UNSET - compute_environment_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + source_dataset_ids: list[str] + params: RunAnalysisRequestParams + notification_emails: list[str] + description: None | str | Unset = UNSET + source_sample_ids: list[str] | None | Unset = UNSET + source_sample_files_map: None | RunAnalysisRequestSourceSampleFilesMap | Unset = UNSET + resume_dataset_id: None | str | Unset = UNSET + compute_environment_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap name = self.name @@ -59,13 +62,13 @@ def to_dict(self) -> Dict[str, Any]: notification_emails = self.notification_emails - description: Union[None, Unset, str] + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - source_sample_ids: Union[List[str], None, Unset] + source_sample_ids: list[str] | None | Unset if isinstance(self.source_sample_ids, Unset): source_sample_ids = UNSET elif isinstance(self.source_sample_ids, list): @@ -74,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: else: source_sample_ids = self.source_sample_ids - source_sample_files_map: Union[Dict[str, Any], None, Unset] + source_sample_files_map: dict[str, Any] | None | Unset if isinstance(self.source_sample_files_map, Unset): source_sample_files_map = UNSET elif isinstance(self.source_sample_files_map, RunAnalysisRequestSourceSampleFilesMap): @@ -82,19 +85,19 @@ def to_dict(self) -> Dict[str, Any]: else: source_sample_files_map = self.source_sample_files_map - resume_dataset_id: Union[None, Unset, str] + resume_dataset_id: None | str | Unset if isinstance(self.resume_dataset_id, Unset): resume_dataset_id = UNSET else: resume_dataset_id = self.resume_dataset_id - compute_environment_id: Union[None, Unset, str] + compute_environment_id: None | str | Unset if isinstance(self.compute_environment_id, Unset): compute_environment_id = UNSET else: compute_environment_id = self.compute_environment_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -119,31 +122,31 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.run_analysis_request_params import RunAnalysisRequestParams from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") process_id = d.pop("processId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) params = RunAnalysisRequestParams.from_dict(d.pop("params")) - notification_emails = cast(List[str], d.pop("notificationEmails")) + notification_emails = cast(list[str], d.pop("notificationEmails")) - def _parse_description(data: object) -> Union[None, Unset, str]: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_source_sample_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_source_sample_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -151,18 +154,16 @@ def _parse_source_sample_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - source_sample_ids_type_0 = cast(List[str], data) + source_sample_ids_type_0 = cast(list[str], data) return source_sample_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) source_sample_ids = _parse_source_sample_ids(d.pop("sourceSampleIds", UNSET)) - def _parse_source_sample_files_map( - data: object, - ) -> Union["RunAnalysisRequestSourceSampleFilesMap", None, Unset]: + def _parse_source_sample_files_map(data: object) -> None | RunAnalysisRequestSourceSampleFilesMap | Unset: if data is None: return data if isinstance(data, Unset): @@ -173,27 +174,27 @@ def _parse_source_sample_files_map( source_sample_files_map_type_0 = RunAnalysisRequestSourceSampleFilesMap.from_dict(data) return source_sample_files_map_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["RunAnalysisRequestSourceSampleFilesMap", None, Unset], data) + return cast(None | RunAnalysisRequestSourceSampleFilesMap | Unset, data) source_sample_files_map = _parse_source_sample_files_map(d.pop("sourceSampleFilesMap", UNSET)) - def _parse_resume_dataset_id(data: object) -> Union[None, Unset, str]: + def _parse_resume_dataset_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) resume_dataset_id = _parse_resume_dataset_id(d.pop("resumeDatasetId", UNSET)) - def _parse_compute_environment_id(data: object) -> Union[None, Unset, str]: + def _parse_compute_environment_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) compute_environment_id = _parse_compute_environment_id(d.pop("computeEnvironmentId", UNSET)) @@ -214,5 +215,17 @@ def _parse_compute_environment_id(data: object) -> Union[None, Unset, str]: return run_analysis_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/run_analysis_request_params.py b/cirro_api_client/v1/models/run_analysis_request_params.py index 2938ce1..6b20dcd 100644 --- a/cirro_api_client/v1/models/run_analysis_request_params.py +++ b/cirro_api_client/v1/models/run_analysis_request_params.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class RunAnalysisRequestParams: """Parameters used in workflow (can be empty)""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) run_analysis_request_params = cls() run_analysis_request_params.additional_properties = d return run_analysis_request_params @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py index 544a69a..84619ef 100644 --- a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py +++ b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -13,25 +16,23 @@ class RunAnalysisRequestSourceSampleFilesMap: """ - additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + 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 - field_dict.update({}) - return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) run_analysis_request_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(List[str], prop_dict) + additional_property = cast(list[str], prop_dict) additional_properties[prop_name] = additional_property @@ -39,5 +40,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return run_analysis_request_source_sample_files_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[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/cirro_api_client/v1/models/sample.py b/cirro_api_client/v1/models/sample.py index 572e3e8..2fdf98c 100644 --- a/cirro_api_client/v1/models/sample.py +++ b/cirro_api_client/v1/models/sample.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -21,30 +24,30 @@ class Sample: Attributes: id (str): name (str): - metadata (Union['SampleMetadata', None, Unset]): - files (Union[List['DataFile'], None, Unset]): Files associated with this sample - dataset_ids (Union[List[str], None, Unset]): - created_at (Union[None, Unset, datetime.datetime]): - updated_at (Union[None, Unset, datetime.datetime]): + metadata (None | SampleMetadata | Unset): + files (list[DataFile] | None | Unset): Files associated with this sample + dataset_ids (list[str] | None | Unset): + created_at (datetime.datetime | None | Unset): + updated_at (datetime.datetime | None | Unset): """ id: str name: str - metadata: Union["SampleMetadata", None, Unset] = UNSET - files: Union[List["DataFile"], None, Unset] = UNSET - dataset_ids: Union[List[str], None, Unset] = UNSET - created_at: Union[None, Unset, datetime.datetime] = UNSET - updated_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + metadata: None | SampleMetadata | Unset = UNSET + files: list[DataFile] | None | Unset = UNSET + dataset_ids: list[str] | None | Unset = UNSET + created_at: datetime.datetime | None | Unset = UNSET + updated_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.sample_metadata import SampleMetadata id = self.id name = self.name - metadata: Union[Dict[str, Any], None, Unset] + metadata: dict[str, Any] | None | Unset if isinstance(self.metadata, Unset): metadata = UNSET elif isinstance(self.metadata, SampleMetadata): @@ -52,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: else: metadata = self.metadata - files: Union[List[Dict[str, Any]], None, Unset] + files: list[dict[str, Any]] | None | Unset if isinstance(self.files, Unset): files = UNSET elif isinstance(self.files, list): @@ -64,7 +67,7 @@ def to_dict(self) -> Dict[str, Any]: else: files = self.files - dataset_ids: Union[List[str], None, Unset] + dataset_ids: list[str] | None | Unset if isinstance(self.dataset_ids, Unset): dataset_ids = UNSET elif isinstance(self.dataset_ids, list): @@ -73,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: else: dataset_ids = self.dataset_ids - created_at: Union[None, Unset, str] + created_at: None | str | Unset if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -81,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: else: created_at = self.created_at - updated_at: Union[None, Unset, str] + updated_at: None | str | Unset if isinstance(self.updated_at, Unset): updated_at = UNSET elif isinstance(self.updated_at, datetime.datetime): @@ -89,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: else: updated_at = self.updated_at - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,16 +114,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.data_file import DataFile from ..models.sample_metadata import SampleMetadata - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") - def _parse_metadata(data: object) -> Union["SampleMetadata", None, Unset]: + def _parse_metadata(data: object) -> None | SampleMetadata | Unset: if data is None: return data if isinstance(data, Unset): @@ -131,13 +134,13 @@ def _parse_metadata(data: object) -> Union["SampleMetadata", None, Unset]: metadata_type_0 = SampleMetadata.from_dict(data) return metadata_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["SampleMetadata", None, Unset], data) + return cast(None | SampleMetadata | Unset, data) metadata = _parse_metadata(d.pop("metadata", UNSET)) - def _parse_files(data: object) -> Union[List["DataFile"], None, Unset]: + def _parse_files(data: object) -> list[DataFile] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -153,13 +156,13 @@ def _parse_files(data: object) -> Union[List["DataFile"], None, Unset]: files_type_0.append(files_type_0_item) return files_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["DataFile"], None, Unset], data) + return cast(list[DataFile] | None | Unset, data) files = _parse_files(d.pop("files", UNSET)) - def _parse_dataset_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_dataset_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -167,16 +170,16 @@ def _parse_dataset_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - dataset_ids_type_0 = cast(List[str], data) + dataset_ids_type_0 = cast(list[str], data) return dataset_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) dataset_ids = _parse_dataset_ids(d.pop("datasetIds", UNSET)) - def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_created_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -187,13 +190,13 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: created_at_type_0 = isoparse(data) return created_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) - def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_updated_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -204,9 +207,9 @@ def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: updated_at_type_0 = isoparse(data) return updated_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) updated_at = _parse_updated_at(d.pop("updatedAt", UNSET)) @@ -224,5 +227,17 @@ def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: return sample @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/sample_metadata.py b/cirro_api_client/v1/models/sample_metadata.py index b7ba777..b345b4c 100644 --- a/cirro_api_client/v1/models/sample_metadata.py +++ b/cirro_api_client/v1/models/sample_metadata.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class SampleMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) sample_metadata = cls() sample_metadata.additional_properties = d return sample_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/sample_request.py b/cirro_api_client/v1/models/sample_request.py index 14facc3..d0a5c76 100644 --- a/cirro_api_client/v1/models/sample_request.py +++ b/cirro_api_client/v1/models/sample_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -19,15 +22,15 @@ class SampleRequest: """ name: str - metadata: "SampleRequestMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + metadata: SampleRequestMetadata + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,10 +42,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.sample_request_metadata import SampleRequestMetadata - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") metadata = SampleRequestMetadata.from_dict(d.pop("metadata")) @@ -56,5 +59,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/sample_request_metadata.py b/cirro_api_client/v1/models/sample_request_metadata.py index 78038d8..713ff66 100644 --- a/cirro_api_client/v1/models/sample_request_metadata.py +++ b/cirro_api_client/v1/models/sample_request_metadata.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,23 +13,34 @@ class SampleRequestMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) sample_request_metadata = cls() sample_request_metadata.additional_properties = d return sample_request_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/sample_sheets.py b/cirro_api_client/v1/models/sample_sheets.py index 91dab4b..ef6dc4f 100644 --- a/cirro_api_client/v1/models/sample_sheets.py +++ b/cirro_api_client/v1/models/sample_sheets.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,20 +15,20 @@ class SampleSheets: """ Attributes: - samples (Union[Unset, str]): Written to samplesheet.csv, available as ds.samplesheet in preprocess - files (Union[Unset, str]): Written to files.csv, available as ds.files in preprocess + samples (str | Unset): Written to samplesheet.csv, available as ds.samplesheet in preprocess + files (str | Unset): Written to files.csv, available as ds.files in preprocess """ - samples: Union[Unset, str] = UNSET - files: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + samples: str | Unset = UNSET + files: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: samples = self.samples files = self.files - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if samples is not UNSET: @@ -36,8 +39,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) samples = d.pop("samples", UNSET) files = d.pop("files", UNSET) @@ -51,5 +54,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_sheets @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/service_connection.py b/cirro_api_client/v1/models/service_connection.py index 0ba6a00..98e4ace 100644 --- a/cirro_api_client/v1/models/service_connection.py +++ b/cirro_api_client/v1/models/service_connection.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +19,14 @@ class ServiceConnection: name: str description: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,8 +38,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") description = d.pop("description") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return service_connection @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/set_user_project_role_request.py b/cirro_api_client/v1/models/set_user_project_role_request.py index cb80536..ffefb24 100644 --- a/cirro_api_client/v1/models/set_user_project_role_request.py +++ b/cirro_api_client/v1/models/set_user_project_role_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,22 +18,22 @@ class SetUserProjectRoleRequest: Attributes: username (str): role (ProjectRole): - suppress_notification (Union[Unset, bool]): Default: False. + suppress_notification (bool | Unset): Default: False. """ username: str role: ProjectRole - suppress_notification: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + suppress_notification: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: username = self.username role = self.role.value suppress_notification = self.suppress_notification - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,8 +47,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) username = d.pop("username") role = ProjectRole(d.pop("role")) @@ -62,5 +65,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return set_user_project_role_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/sftp_credentials.py b/cirro_api_client/v1/models/sftp_credentials.py index 7a85f72..0f108ab 100644 --- a/cirro_api_client/v1/models/sftp_credentials.py +++ b/cirro_api_client/v1/models/sftp_credentials.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class SftpCredentials: password: str project_id: str expires_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: username = self.username password = self.password @@ -33,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: expires_at = self.expires_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,8 +50,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) username = d.pop("username") password = d.pop("password") @@ -68,5 +71,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sftp_credentials @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/share.py b/cirro_api_client/v1/models/share.py index f3d21b0..1d1e630 100644 --- a/cirro_api_client/v1/models/share.py +++ b/cirro_api_client/v1/models/share.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +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 @@ -23,9 +26,9 @@ class Share: description (str): originating_project_id (str): The ID of the project that owns the share share_type (ShareType): - conditions (List['DatasetCondition']): - classification_ids (List[str]): - keywords (List[str]): + conditions (list[DatasetCondition]): + classification_ids (list[str]): + keywords (list[str]): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): @@ -36,15 +39,15 @@ class Share: description: str originating_project_id: str share_type: ShareType - conditions: List["DatasetCondition"] - classification_ids: List[str] - keywords: List[str] + conditions: list[DatasetCondition] + classification_ids: list[str] + keywords: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -70,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,10 +94,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -112,9 +115,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) - keywords = cast(List[str], d.pop("keywords")) + keywords = cast(list[str], d.pop("keywords")) created_by = d.pop("createdBy") @@ -140,5 +143,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/share_detail.py b/cirro_api_client/v1/models/share_detail.py index 8d685ec..e6fde92 100644 --- a/cirro_api_client/v1/models/share_detail.py +++ b/cirro_api_client/v1/models/share_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +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 @@ -24,10 +27,10 @@ class ShareDetail: description (str): originating_project (NamedItem): share_type (ShareType): - shared_projects (List['NamedItem']): - conditions (List['DatasetCondition']): The conditions under which the dataset is shared - keywords (List[str]): - classification_ids (List[str]): + shared_projects (list[NamedItem]): + conditions (list[DatasetCondition]): The conditions under which the dataset is shared + keywords (list[str]): + classification_ids (list[str]): is_view_restricted (bool): created_by (str): created_at (datetime.datetime): @@ -37,19 +40,19 @@ class ShareDetail: id: str name: str description: str - originating_project: "NamedItem" + originating_project: NamedItem share_type: ShareType - shared_projects: List["NamedItem"] - conditions: List["DatasetCondition"] - keywords: List[str] - classification_ids: List[str] + shared_projects: list[NamedItem] + conditions: list[DatasetCondition] + keywords: list[str] + classification_ids: list[str] is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -82,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -105,11 +108,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition from ..models.named_item import NamedItem - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -134,9 +137,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(List[str], d.pop("keywords")) + keywords = cast(list[str], d.pop("keywords")) - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) is_view_restricted = d.pop("isViewRestricted") @@ -166,5 +169,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/share_input.py b/cirro_api_client/v1/models/share_input.py index 99eaba1..ca5fbfa 100644 --- a/cirro_api_client/v1/models/share_input.py +++ b/cirro_api_client/v1/models/share_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -18,24 +21,24 @@ class ShareInput: Attributes: name (str): description (str): - classification_ids (List[str]): Data classification IDs for the share - conditions (List['DatasetCondition']): The conditions under which the dataset is shared - keywords (Union[Unset, List[str]]): Search keywords for the share - shared_project_ids (Union[Unset, List[str]]): The project IDs that can access this share - is_view_restricted (Union[Unset, bool]): Whether files within the share are restricted from viewing or - downloading Default: False. + classification_ids (list[str]): Data classification IDs for the share + conditions (list[DatasetCondition]): The conditions under which the dataset is shared + keywords (list[str] | Unset): Search keywords for the share + shared_project_ids (list[str] | Unset): The project IDs that can access this share + is_view_restricted (bool | Unset): Whether files within the share are restricted from viewing or downloading + Default: False. """ name: str description: str - classification_ids: List[str] - conditions: List["DatasetCondition"] - keywords: Union[Unset, List[str]] = UNSET - shared_project_ids: Union[Unset, List[str]] = UNSET - is_view_restricted: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + classification_ids: list[str] + conditions: list[DatasetCondition] + keywords: list[str] | Unset = UNSET + shared_project_ids: list[str] | Unset = UNSET + is_view_restricted: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -47,17 +50,17 @@ def to_dict(self) -> Dict[str, Any]: conditions_item = conditions_item_data.to_dict() conditions.append(conditions_item) - keywords: Union[Unset, List[str]] = UNSET + keywords: list[str] | Unset = UNSET if not isinstance(self.keywords, Unset): keywords = self.keywords - shared_project_ids: Union[Unset, List[str]] = UNSET + shared_project_ids: list[str] | Unset = UNSET if not isinstance(self.shared_project_ids, Unset): shared_project_ids = self.shared_project_ids is_view_restricted = self.is_view_restricted - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -77,15 +80,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) conditions = [] _conditions = d.pop("conditions") @@ -94,9 +97,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(List[str], d.pop("keywords", UNSET)) + keywords = cast(list[str], d.pop("keywords", UNSET)) - shared_project_ids = cast(List[str], d.pop("sharedProjectIds", UNSET)) + shared_project_ids = cast(list[str], d.pop("sharedProjectIds", UNSET)) is_view_restricted = d.pop("isViewRestricted", UNSET) @@ -114,5 +117,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/share_type.py b/cirro_api_client/v1/models/share_type.py index 576a15e..21ce157 100644 --- a/cirro_api_client/v1/models/share_type.py +++ b/cirro_api_client/v1/models/share_type.py @@ -3,11 +3,8 @@ class ShareType(str, Enum): AVAILABLE = "AVAILABLE" - """ The share is available for subscription """ PUBLISHER = "PUBLISHER" - """ The project owns this share """ SUBSCRIBER = "SUBSCRIBER" - """ The project can view this share """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/status.py b/cirro_api_client/v1/models/status.py index d1cecee..565db14 100644 --- a/cirro_api_client/v1/models/status.py +++ b/cirro_api_client/v1/models/status.py @@ -12,7 +12,6 @@ class Status(str, Enum): RUNNING = "RUNNING" SUSPENDED = "SUSPENDED" UNKNOWN = "UNKNOWN" - """ This is a fallback value for when the value is not known, do not use this value when making requests """ def __str__(self) -> str: return str(self.value) diff --git a/cirro_api_client/v1/models/stop_execution_response.py b/cirro_api_client/v1/models/stop_execution_response.py index b96a290..dfb6a0f 100644 --- a/cirro_api_client/v1/models/stop_execution_response.py +++ b/cirro_api_client/v1/models/stop_execution_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -12,24 +15,24 @@ class StopExecutionResponse: """ Attributes: - success (Union[Unset, List[str]]): List of job IDs that were successful in termination - failed (Union[Unset, List[str]]): List of job IDs that were not successful in termination + success (list[str] | Unset): List of job IDs that were successful in termination + failed (list[str] | Unset): List of job IDs that were not successful in termination """ - success: Union[Unset, List[str]] = UNSET - failed: Union[Unset, List[str]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + success: list[str] | Unset = UNSET + failed: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - success: Union[Unset, List[str]] = UNSET + def to_dict(self) -> dict[str, Any]: + success: list[str] | Unset = UNSET if not isinstance(self.success, Unset): success = self.success - failed: Union[Unset, List[str]] = UNSET + failed: list[str] | Unset = UNSET if not isinstance(self.failed, Unset): failed = self.failed - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if success is not UNSET: @@ -40,11 +43,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - success = cast(List[str], d.pop("success", UNSET)) + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + success = cast(list[str], d.pop("success", UNSET)) - failed = cast(List[str], d.pop("failed", UNSET)) + failed = cast(list[str], d.pop("failed", UNSET)) stop_execution_response = cls( success=success, @@ -55,5 +58,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return stop_execution_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/system_info_response.py b/cirro_api_client/v1/models/system_info_response.py index 6bd661c..6b723f3 100644 --- a/cirro_api_client/v1/models/system_info_response.py +++ b/cirro_api_client/v1/models/system_info_response.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -39,12 +42,12 @@ class SystemInfoResponse: maintenance_mode_enabled: bool commit_hash: str version: str - resources_info: "ResourcesInfo" - tenant_info: "TenantInfo" - auth: "AuthInfo" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + resources_info: ResourcesInfo + tenant_info: TenantInfo + auth: AuthInfo + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: resources_bucket = self.resources_bucket references_bucket = self.references_bucket @@ -69,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: auth = self.auth.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,12 +94,12 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.auth_info import AuthInfo from ..models.resources_info import ResourcesInfo from ..models.tenant_info import TenantInfo - d = src_dict.copy() + d = dict(src_dict) resources_bucket = d.pop("resourcesBucket") references_bucket = d.pop("referencesBucket") @@ -140,5 +143,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return system_info_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/table.py b/cirro_api_client/v1/models/table.py index c83fedc..00a8b16 100644 --- a/cirro_api_client/v1/models/table.py +++ b/cirro_api_client/v1/models/table.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -17,33 +20,33 @@ class Table: """ Attributes: desc (str): - name (Union[Unset, str]): User-friendly name of asset - type (Union[Unset, str]): Type of file Example: parquet. - rows (Union[Unset, int]): Number of rows in table - path (Union[Unset, str]): Relative path to asset - cols (Union[List['ColumnDefinition'], None, Unset]): + name (str | Unset): User-friendly name of asset + type_ (str | Unset): Type of file Example: parquet. + rows (int | Unset): Number of rows in table + path (str | Unset): Relative path to asset + cols (list[ColumnDefinition] | None | Unset): """ desc: str - name: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET - rows: Union[Unset, int] = UNSET - path: Union[Unset, str] = UNSET - cols: Union[List["ColumnDefinition"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + name: str | Unset = UNSET + type_: str | Unset = UNSET + rows: int | Unset = UNSET + path: str | Unset = UNSET + cols: list[ColumnDefinition] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: desc = self.desc name = self.name - type = self.type + type_ = self.type_ rows = self.rows path = self.path - cols: Union[List[Dict[str, Any]], None, Unset] + cols: list[dict[str, Any]] | None | Unset if isinstance(self.cols, Unset): cols = UNSET elif isinstance(self.cols, list): @@ -55,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: else: cols = self.cols - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -64,8 +67,8 @@ def to_dict(self) -> Dict[str, Any]: ) if name is not UNSET: field_dict["name"] = name - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if rows is not UNSET: field_dict["rows"] = rows if path is not UNSET: @@ -76,21 +79,21 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.column_definition import ColumnDefinition - d = src_dict.copy() + d = dict(src_dict) desc = d.pop("desc") name = d.pop("name", UNSET) - type = d.pop("type", UNSET) + type_ = d.pop("type", UNSET) rows = d.pop("rows", UNSET) path = d.pop("path", UNSET) - def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: + def _parse_cols(data: object) -> list[ColumnDefinition] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -106,16 +109,16 @@ def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: cols_type_0.append(cols_type_0_item) return cols_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["ColumnDefinition"], None, Unset], data) + return cast(list[ColumnDefinition] | None | Unset, data) cols = _parse_cols(d.pop("cols", UNSET)) table = cls( desc=desc, name=name, - type=type, + type_=type_, rows=rows, path=path, cols=cols, @@ -125,5 +128,17 @@ def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: return table @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/tag.py b/cirro_api_client/v1/models/tag.py index c5ccf01..6e44148 100644 --- a/cirro_api_client/v1/models/tag.py +++ b/cirro_api_client/v1/models/tag.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -13,27 +16,27 @@ class Tag: """ Attributes: value (str): The value of the tag - editable (Union[Unset, bool]): Whether the tag value is editable Default: True. - key (Union[None, Unset, str]): + editable (bool | Unset): Whether the tag value is editable Default: True. + key (None | str | Unset): """ value: str - editable: Union[Unset, bool] = True - key: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + editable: bool | Unset = True + key: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: value = self.value editable = self.editable - key: Union[None, Unset, str] + key: None | str | Unset if isinstance(self.key, Unset): key = UNSET else: key = self.key - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +51,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) value = d.pop("value") editable = d.pop("editable", UNSET) - def _parse_key(data: object) -> Union[None, Unset, str]: + def _parse_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) key = _parse_key(d.pop("key", UNSET)) @@ -73,5 +76,17 @@ def _parse_key(data: object) -> Union[None, Unset, str]: return tag @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/task.py b/cirro_api_client/v1/models/task.py index 4984050..3dc46dc 100644 --- a/cirro_api_client/v1/models/task.py +++ b/cirro_api_client/v1/models/task.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +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 @@ -15,60 +18,92 @@ class Task: """ Attributes: name (str): - native_job_id (str): status (str): - requested_at (datetime.datetime): - started_at (Union[Unset, datetime.datetime]): - stopped_at (Union[Unset, datetime.datetime]): - container_image (Union[Unset, str]): - command_line (Union[Unset, str]): - log_location (Union[Unset, str]): + native_job_id (None | str | Unset): + requested_at (datetime.datetime | None | Unset): + started_at (datetime.datetime | None | Unset): + stopped_at (datetime.datetime | None | Unset): + container_image (None | str | Unset): + command_line (None | str | Unset): + log_location (None | str | Unset): """ name: str - native_job_id: str status: str - requested_at: datetime.datetime - started_at: Union[Unset, datetime.datetime] = UNSET - stopped_at: Union[Unset, datetime.datetime] = UNSET - container_image: Union[Unset, str] = UNSET - command_line: Union[Unset, str] = UNSET - log_location: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + native_job_id: None | str | Unset = UNSET + requested_at: datetime.datetime | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + stopped_at: datetime.datetime | None | Unset = UNSET + container_image: None | str | Unset = UNSET + command_line: None | str | Unset = UNSET + log_location: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: name = self.name - native_job_id = self.native_job_id - status = self.status - requested_at = self.requested_at.isoformat() + native_job_id: None | str | Unset + if isinstance(self.native_job_id, Unset): + native_job_id = UNSET + else: + native_job_id = self.native_job_id - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): + requested_at: None | str | Unset + if isinstance(self.requested_at, Unset): + requested_at = UNSET + elif isinstance(self.requested_at, datetime.datetime): + requested_at = self.requested_at.isoformat() + else: + requested_at = self.requested_at + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): started_at = self.started_at.isoformat() + else: + started_at = self.started_at - stopped_at: Union[Unset, str] = UNSET - if not isinstance(self.stopped_at, Unset): + stopped_at: None | str | Unset + if isinstance(self.stopped_at, Unset): + stopped_at = UNSET + elif isinstance(self.stopped_at, datetime.datetime): stopped_at = self.stopped_at.isoformat() + else: + stopped_at = self.stopped_at - container_image = self.container_image + container_image: None | str | Unset + if isinstance(self.container_image, Unset): + container_image = UNSET + else: + container_image = self.container_image - command_line = self.command_line + command_line: None | str | Unset + if isinstance(self.command_line, Unset): + command_line = UNSET + else: + command_line = self.command_line - log_location = self.log_location + log_location: None | str | Unset + if isinstance(self.log_location, Unset): + log_location = UNSET + else: + log_location = self.log_location - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, - "nativeJobId": native_job_id, "status": status, - "requestedAt": requested_at, } ) + if native_job_id is not UNSET: + field_dict["nativeJobId"] = native_job_id + if requested_at is not UNSET: + field_dict["requestedAt"] = requested_at if started_at is not UNSET: field_dict["startedAt"] = started_at if stopped_at is not UNSET: @@ -83,40 +118,103 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") - native_job_id = d.pop("nativeJobId") - status = d.pop("status") - requested_at = isoparse(d.pop("requestedAt")) - - _started_at = d.pop("startedAt", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _stopped_at = d.pop("stoppedAt", UNSET) - stopped_at: Union[Unset, datetime.datetime] - if isinstance(_stopped_at, Unset): - stopped_at = UNSET - else: - stopped_at = isoparse(_stopped_at) - - container_image = d.pop("containerImage", UNSET) - - command_line = d.pop("commandLine", UNSET) - - log_location = d.pop("logLocation", UNSET) + def _parse_native_job_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + native_job_id = _parse_native_job_id(d.pop("nativeJobId", UNSET)) + + def _parse_requested_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + requested_at_type_0 = isoparse(data) + + return requested_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + requested_at = _parse_requested_at(d.pop("requestedAt", UNSET)) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("startedAt", UNSET)) + + def _parse_stopped_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + stopped_at_type_0 = isoparse(data) + + return stopped_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + stopped_at = _parse_stopped_at(d.pop("stoppedAt", UNSET)) + + def _parse_container_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_image = _parse_container_image(d.pop("containerImage", UNSET)) + + def _parse_command_line(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + command_line = _parse_command_line(d.pop("commandLine", UNSET)) + + def _parse_log_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + log_location = _parse_log_location(d.pop("logLocation", UNSET)) task = cls( name=name, - native_job_id=native_job_id, status=status, + native_job_id=native_job_id, requested_at=requested_at, started_at=started_at, stopped_at=stopped_at, @@ -129,5 +227,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return task @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/task_cost.py b/cirro_api_client/v1/models/task_cost.py index d3d9653..1f686f0 100644 --- a/cirro_api_client/v1/models/task_cost.py +++ b/cirro_api_client/v1/models/task_cost.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +23,9 @@ class TaskCost: task_id: str status: str cost: float - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name task_id = self.task_id @@ -31,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: cost = self.cost - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,8 +48,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") task_id = d.pop("taskId") @@ -66,5 +69,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return task_cost @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/tenant_info.py b/cirro_api_client/v1/models/tenant_info.py index ff90ca6..fdc9522 100644 --- a/cirro_api_client/v1/models/tenant_info.py +++ b/cirro_api_client/v1/models/tenant_info.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -23,7 +26,7 @@ class TenantInfo: tenant_logo_url (str): terms_of_service_url (str): privacy_policy_url (str): - login_providers (List['LoginProvider']): + login_providers (list[LoginProvider]): features (FeatureFlags): """ @@ -35,11 +38,11 @@ class TenantInfo: tenant_logo_url: str terms_of_service_url: str privacy_policy_url: str - login_providers: List["LoginProvider"] - features: "FeatureFlags" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + login_providers: list[LoginProvider] + features: FeatureFlags + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -63,7 +66,7 @@ def to_dict(self) -> Dict[str, Any]: features = self.features.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,11 +86,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.feature_flags import FeatureFlags from ..models.login_provider import LoginProvider - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -130,5 +133,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return tenant_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/update_dataset_request.py b/cirro_api_client/v1/models/update_dataset_request.py index 48a9c87..877ce8f 100644 --- a/cirro_api_client/v1/models/update_dataset_request.py +++ b/cirro_api_client/v1/models/update_dataset_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -17,16 +20,16 @@ class UpdateDatasetRequest: name (str): description (str): process_id (str): - tags (List['Tag']): + tags (list[Tag]): """ name: str description: str process_id: str - tags: List["Tag"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + tags: list[Tag] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -38,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: tags_item = tags_item_data.to_dict() tags.append(tags_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,10 +55,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") description = d.pop("description") @@ -80,5 +83,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return update_dataset_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/update_user_request.py b/cirro_api_client/v1/models/update_user_request.py index cbfc203..9cd10e9 100644 --- a/cirro_api_client/v1/models/update_user_request.py +++ b/cirro_api_client/v1/models/update_user_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -18,25 +21,25 @@ class UpdateUserRequest: Attributes: name (str): Display name of the user email (str): Email address of the user - phone (Union[Unset, str]): Phone number of the user - department (Union[Unset, str]): Department or lab the user belongs to - job_title (Union[Unset, str]): Job title or role of the user - organization (Union[Unset, str]): The organization the user belongs to, only editable by administrators - settings (Union['UserSettings', None, Unset]): - groups (Union[Unset, List[str]]): Groups the user belongs to, only editable by administrators + phone (str | Unset): Phone number of the user + department (str | Unset): Department or lab the user belongs to + job_title (str | Unset): Job title or role of the user + organization (str | Unset): The organization the user belongs to, only editable by administrators + settings (None | Unset | UserSettings): + groups (list[str] | Unset): Groups the user belongs to, only editable by administrators """ name: str email: str - phone: Union[Unset, str] = UNSET - department: Union[Unset, str] = UNSET - job_title: Union[Unset, str] = UNSET - organization: Union[Unset, str] = UNSET - settings: Union["UserSettings", None, Unset] = UNSET - groups: Union[Unset, List[str]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + phone: str | Unset = UNSET + department: str | Unset = UNSET + job_title: str | Unset = UNSET + organization: str | Unset = UNSET + settings: None | Unset | UserSettings = UNSET + groups: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.user_settings import UserSettings name = self.name @@ -51,7 +54,7 @@ def to_dict(self) -> Dict[str, Any]: organization = self.organization - settings: Union[Dict[str, Any], None, Unset] + settings: dict[str, Any] | None | Unset if isinstance(self.settings, Unset): settings = UNSET elif isinstance(self.settings, UserSettings): @@ -59,11 +62,11 @@ def to_dict(self) -> Dict[str, Any]: else: settings = self.settings - groups: Union[Unset, List[str]] = UNSET + groups: list[str] | Unset = UNSET if not isinstance(self.groups, Unset): groups = self.groups - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,10 +90,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.user_settings import UserSettings - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") email = d.pop("email") @@ -103,7 +106,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: organization = d.pop("organization", UNSET) - def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: + def _parse_settings(data: object) -> None | Unset | UserSettings: if data is None: return data if isinstance(data, Unset): @@ -114,13 +117,13 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: settings_type_1 = UserSettings.from_dict(data) return settings_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UserSettings", None, Unset], data) + return cast(None | Unset | UserSettings, data) settings = _parse_settings(d.pop("settings", UNSET)) - groups = cast(List[str], d.pop("groups", UNSET)) + groups = cast(list[str], d.pop("groups", UNSET)) update_user_request = cls( name=name, @@ -137,5 +140,17 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: return update_user_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/upload_dataset_create_response.py b/cirro_api_client/v1/models/upload_dataset_create_response.py index 9da6238..fbc7578 100644 --- a/cirro_api_client/v1/models/upload_dataset_create_response.py +++ b/cirro_api_client/v1/models/upload_dataset_create_response.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +23,9 @@ class UploadDatasetCreateResponse: message: str upload_path: str bucket: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id message = self.message @@ -31,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: bucket = self.bucket - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,8 +48,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") message = d.pop("message") @@ -66,5 +69,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return upload_dataset_create_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/upload_dataset_request.py b/cirro_api_client/v1/models/upload_dataset_request.py index edce7fc..1c0c2a5 100644 --- a/cirro_api_client/v1/models/upload_dataset_request.py +++ b/cirro_api_client/v1/models/upload_dataset_request.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -18,19 +21,19 @@ class UploadDatasetRequest: Attributes: name (str): Name of the dataset process_id (str): ID of the ingest process Example: paired_dnaseq. - expected_files (List[str]): - description (Union[Unset, str]): Description of the dataset - tags (Union[List['Tag'], None, Unset]): List of tags to apply to the dataset + expected_files (list[str]): + description (str | Unset): Description of the dataset + tags (list[Tag] | None | Unset): List of tags to apply to the dataset """ name: str process_id: str - expected_files: List[str] - description: Union[Unset, str] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + expected_files: list[str] + description: str | Unset = UNSET + tags: list[Tag] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name process_id = self.process_id @@ -39,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -51,7 +54,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -68,19 +71,19 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.tag import Tag - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") process_id = d.pop("processId") - expected_files = cast(List[str], d.pop("expectedFiles")) + expected_files = cast(list[str], d.pop("expectedFiles")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list[Tag] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -96,9 +99,9 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: tags_type_0.append(tags_type_0_item) return tags_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list[Tag] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -114,5 +117,17 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return upload_dataset_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/user.py b/cirro_api_client/v1/models/user.py index 4f02425..7ee1f24 100644 --- a/cirro_api_client/v1/models/user.py +++ b/cirro_api_client/v1/models/user.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +25,9 @@ class User: organization: str department: str job_title: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name username = self.username @@ -35,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: job_title = self.job_title - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,8 +53,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) name = d.pop("name") username = d.pop("username") @@ -74,5 +77,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return user @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/user_detail.py b/cirro_api_client/v1/models/user_detail.py index b78e335..f7d2f59 100644 --- a/cirro_api_client/v1/models/user_detail.py +++ b/cirro_api_client/v1/models/user_detail.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -27,11 +30,11 @@ class UserDetail: job_title (str): department (str): invited_by (str): - project_assignments (List['UserProjectAssignment']): - groups (List[str]): + project_assignments (list[UserProjectAssignment]): + groups (list[str]): settings (UserSettings): Additional settings for the user - sign_up_time (Union[None, Unset, datetime.datetime]): - last_signed_in (Union[None, Unset, datetime.datetime]): + sign_up_time (datetime.datetime | None | Unset): + last_signed_in (datetime.datetime | None | Unset): """ username: str @@ -42,14 +45,14 @@ class UserDetail: job_title: str department: str invited_by: str - project_assignments: List["UserProjectAssignment"] - groups: List[str] - settings: "UserSettings" - sign_up_time: Union[None, Unset, datetime.datetime] = UNSET - last_signed_in: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + project_assignments: list[UserProjectAssignment] + groups: list[str] + settings: UserSettings + sign_up_time: datetime.datetime | None | Unset = UNSET + last_signed_in: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: username = self.username name = self.name @@ -75,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: settings = self.settings.to_dict() - sign_up_time: Union[None, Unset, str] + sign_up_time: None | str | Unset if isinstance(self.sign_up_time, Unset): sign_up_time = UNSET elif isinstance(self.sign_up_time, datetime.datetime): @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: else: sign_up_time = self.sign_up_time - last_signed_in: Union[None, Unset, str] + last_signed_in: None | str | Unset if isinstance(self.last_signed_in, Unset): last_signed_in = UNSET elif isinstance(self.last_signed_in, datetime.datetime): @@ -91,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: else: last_signed_in = self.last_signed_in - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -116,11 +119,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.user_project_assignment import UserProjectAssignment from ..models.user_settings import UserSettings - d = src_dict.copy() + d = dict(src_dict) username = d.pop("username") name = d.pop("name") @@ -144,11 +147,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_assignments.append(project_assignments_item) - groups = cast(List[str], d.pop("groups")) + groups = cast(list[str], d.pop("groups")) settings = UserSettings.from_dict(d.pop("settings")) - def _parse_sign_up_time(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_sign_up_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -159,13 +162,13 @@ def _parse_sign_up_time(data: object) -> Union[None, Unset, datetime.datetime]: sign_up_time_type_0 = isoparse(data) return sign_up_time_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) sign_up_time = _parse_sign_up_time(d.pop("signUpTime", UNSET)) - def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_last_signed_in(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -176,9 +179,9 @@ def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime] last_signed_in_type_0 = isoparse(data) return last_signed_in_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) last_signed_in = _parse_last_signed_in(d.pop("lastSignedIn", UNSET)) @@ -202,5 +205,17 @@ def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime] return user_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/user_project_assignment.py b/cirro_api_client/v1/models/user_project_assignment.py index 8b1f596..f0fa09a 100644 --- a/cirro_api_client/v1/models/user_project_assignment.py +++ b/cirro_api_client/v1/models/user_project_assignment.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -18,23 +21,23 @@ class UserProjectAssignment: project_id (str): role (ProjectRole): created_by (str): - created_at (Union[None, Unset, datetime.datetime]): + created_at (datetime.datetime | None | Unset): """ project_id: str role: ProjectRole created_by: str - created_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + created_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: project_id = self.project_id role = self.role.value created_by = self.created_by - created_at: Union[None, Unset, str] + created_at: None | str | Unset if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -42,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: else: created_at = self.created_at - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -57,15 +60,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) project_id = d.pop("projectId") role = ProjectRole(d.pop("role")) created_by = d.pop("createdBy") - def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_created_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -76,9 +79,9 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: created_at_type_0 = isoparse(data) return created_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) @@ -93,5 +96,17 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: return user_project_assignment @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/user_settings.py b/cirro_api_client/v1/models/user_settings.py index 13a83aa..fe345ff 100644 --- a/cirro_api_client/v1/models/user_settings.py +++ b/cirro_api_client/v1/models/user_settings.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,12 +18,12 @@ class UserSettings: """ analysis_update_notifications_enabled: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: analysis_update_notifications_enabled = self.analysis_update_notifications_enabled - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -31,8 +34,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) analysis_update_notifications_enabled = d.pop("analysisUpdateNotificationsEnabled") user_settings = cls( @@ -43,5 +46,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return user_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/validate_file_name_patterns_request.py b/cirro_api_client/v1/models/validate_file_name_patterns_request.py index 32dfb97..0975ddf 100644 --- a/cirro_api_client/v1/models/validate_file_name_patterns_request.py +++ b/cirro_api_client/v1/models/validate_file_name_patterns_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -10,20 +13,20 @@ class ValidateFileNamePatternsRequest: """ Attributes: - file_names (List[str]): - file_name_patterns (List[str]): + file_names (list[str]): + file_name_patterns (list[str]): """ - file_names: List[str] - file_name_patterns: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_names: list[str] + file_name_patterns: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_names = self.file_names file_name_patterns = self.file_name_patterns - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,11 +38,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - file_names = cast(List[str], d.pop("fileNames")) + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + file_names = cast(list[str], d.pop("fileNames")) - file_name_patterns = cast(List[str], d.pop("fileNamePatterns")) + file_name_patterns = cast(list[str], d.pop("fileNamePatterns")) validate_file_name_patterns_request = cls( file_names=file_names, @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return validate_file_name_patterns_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/validate_file_requirements_request.py b/cirro_api_client/v1/models/validate_file_requirements_request.py index 05957b8..5f97267 100644 --- a/cirro_api_client/v1/models/validate_file_requirements_request.py +++ b/cirro_api_client/v1/models/validate_file_requirements_request.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from __future__ import annotations + +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 @@ -10,20 +13,20 @@ class ValidateFileRequirementsRequest: """ Attributes: - file_names (List[str]): + file_names (list[str]): sample_sheet (str): """ - file_names: List[str] + file_names: list[str] sample_sheet: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_names = self.file_names sample_sheet = self.sample_sheet - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,9 +38,9 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - file_names = cast(List[str], d.pop("fileNames")) + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + file_names = cast(list[str], d.pop("fileNames")) sample_sheet = d.pop("sampleSheet") @@ -50,5 +53,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return validate_file_requirements_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/version_specification.py b/cirro_api_client/v1/models/version_specification.py index e7ef984..8c19ddb 100644 --- a/cirro_api_client/v1/models/version_specification.py +++ b/cirro_api_client/v1/models/version_specification.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +21,16 @@ class VersionSpecification: version: str is_default: bool is_latest: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: version = self.version is_default = self.is_default is_latest = self.is_latest - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,8 +43,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) version = d.pop("version") is_default = d.pop("isDefault") @@ -58,5 +61,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return version_specification @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace.py b/cirro_api_client/v1/models/workspace.py index 4eea83a..9d99692 100644 --- a/cirro_api_client/v1/models/workspace.py +++ b/cirro_api_client/v1/models/workspace.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +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 @@ -25,43 +28,51 @@ class Workspace: id (str): name (str): description (str): + project_id (str): status (Status): status_message (str): environment_id (str): - mounted_datasets (List['MountedDataset']): + mounted_datasets (list[MountedDataset]): compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute environment. sharing_type (SharingType): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): - sessions (Union[List['WorkspaceSession'], None, Unset]): - started_at (Union[None, Unset, datetime.datetime]): + auto_stop_timeout (int | None | Unset): + sessions (list[WorkspaceSession] | None | Unset): + started_at (datetime.datetime | None | Unset): + auto_stop_time (datetime.datetime | None | Unset): """ id: str name: str description: str + project_id: str status: Status status_message: str environment_id: str - mounted_datasets: List["MountedDataset"] - compute_config: "WorkspaceComputeConfig" + mounted_datasets: list[MountedDataset] + compute_config: WorkspaceComputeConfig sharing_type: SharingType created_by: str created_at: datetime.datetime updated_at: datetime.datetime - sessions: Union[List["WorkspaceSession"], None, Unset] = UNSET - started_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + auto_stop_timeout: int | None | Unset = UNSET + sessions: list[WorkspaceSession] | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + auto_stop_time: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name description = self.description + project_id = self.project_id + status = self.status.value status_message = self.status_message @@ -83,7 +94,13 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - sessions: Union[List[Dict[str, Any]], None, Unset] + auto_stop_timeout: int | None | Unset + if isinstance(self.auto_stop_timeout, Unset): + auto_stop_timeout = UNSET + else: + auto_stop_timeout = self.auto_stop_timeout + + sessions: list[dict[str, Any]] | None | Unset if isinstance(self.sessions, Unset): sessions = UNSET elif isinstance(self.sessions, list): @@ -95,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: else: sessions = self.sessions - started_at: Union[None, Unset, str] + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -103,13 +120,22 @@ def to_dict(self) -> Dict[str, Any]: else: started_at = self.started_at - field_dict: Dict[str, Any] = {} + auto_stop_time: None | str | Unset + if isinstance(self.auto_stop_time, Unset): + auto_stop_time = UNSET + elif isinstance(self.auto_stop_time, datetime.datetime): + auto_stop_time = self.auto_stop_time.isoformat() + else: + auto_stop_time = self.auto_stop_time + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "id": id, "name": name, "description": description, + "projectId": project_id, "status": status, "statusMessage": status_message, "environmentId": environment_id, @@ -121,26 +147,32 @@ def to_dict(self) -> Dict[str, Any]: "updatedAt": updated_at, } ) + if auto_stop_timeout is not UNSET: + field_dict["autoStopTimeout"] = auto_stop_timeout if sessions is not UNSET: field_dict["sessions"] = sessions if started_at is not UNSET: field_dict["startedAt"] = started_at + if auto_stop_time is not UNSET: + field_dict["autoStopTime"] = auto_stop_time return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.mounted_dataset import MountedDataset from ..models.workspace_compute_config import WorkspaceComputeConfig from ..models.workspace_session import WorkspaceSession - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") description = d.pop("description") + project_id = d.pop("projectId") + status = Status(d.pop("status")) status_message = d.pop("statusMessage") @@ -164,7 +196,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_sessions(data: object) -> Union[List["WorkspaceSession"], None, Unset]: + def _parse_auto_stop_timeout(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_stop_timeout = _parse_auto_stop_timeout(d.pop("autoStopTimeout", UNSET)) + + def _parse_sessions(data: object) -> list[WorkspaceSession] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -180,13 +221,13 @@ def _parse_sessions(data: object) -> Union[List["WorkspaceSession"], None, Unset sessions_type_0.append(sessions_type_0_item) return sessions_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[List["WorkspaceSession"], None, Unset], data) + return cast(list[WorkspaceSession] | None | Unset, data) sessions = _parse_sessions(d.pop("sessions", UNSET)) - def _parse_started_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -197,16 +238,34 @@ def _parse_started_at(data: object) -> Union[None, Unset, datetime.datetime]: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("startedAt", UNSET)) + def _parse_auto_stop_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + auto_stop_time_type_0 = isoparse(data) + + return auto_stop_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + auto_stop_time = _parse_auto_stop_time(d.pop("autoStopTime", UNSET)) + workspace = cls( id=id, name=name, description=description, + project_id=project_id, status=status, status_message=status_message, environment_id=environment_id, @@ -216,13 +275,27 @@ def _parse_started_at(data: object) -> Union[None, Unset, datetime.datetime]: created_by=created_by, created_at=created_at, updated_at=updated_at, + auto_stop_timeout=auto_stop_timeout, sessions=sessions, started_at=started_at, + auto_stop_time=auto_stop_time, ) workspace.additional_properties = d return workspace @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace_compute_config.py b/cirro_api_client/v1/models/workspace_compute_config.py index 339618e..f6df53c 100644 --- a/cirro_api_client/v1/models/workspace_compute_config.py +++ b/cirro_api_client/v1/models/workspace_compute_config.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -18,25 +21,26 @@ class WorkspaceComputeConfig: Attributes: container_image_uri (str): Fully qualified container image URI (including registry, repository, and tag). - cpu (Union[Unset, int]): Number of vCPU cores allocated to the workspace. Example: 4. - memory_gi_b (Union[Unset, int]): Memory allocated to the workspace container in GiB. Example: 8. - volume_size_gi_b (Union[Unset, int]): Persistent storage volume size allocated to the workspace in GiB. Example: - 50. - environment_variables (Union['WorkspaceComputeConfigEnvironmentVariables', None, Unset]): Map of environment - variables injected into the container at runtime. Keys must be non-blank. Example: {'ENV_MODE': 'production', - 'LOG_LEVEL': 'debug'}. - local_port (Union[Unset, int]): User-facing web server port (http). Example: 8080. + cpu (int | Unset): Number of vCPU cores allocated to the workspace. Example: 4. + memory_gi_b (int | Unset): Memory allocated to the workspace container in GiB. Example: 8. + volume_size_gi_b (int | Unset): Persistent storage volume size allocated to the workspace in GiB. Example: 50. + gpu (int | Unset): Number of GPUs allocated to the workspace Example: 1. + environment_variables (None | Unset | WorkspaceComputeConfigEnvironmentVariables): Map of environment variables + injected into the container at runtime. Keys must be non-blank. Example: {'ENV_MODE': 'production', 'LOG_LEVEL': + 'debug'}. + local_port (int | Unset): User-facing web server port (http). Example: 8080. """ container_image_uri: str - cpu: Union[Unset, int] = UNSET - memory_gi_b: Union[Unset, int] = UNSET - volume_size_gi_b: Union[Unset, int] = UNSET - environment_variables: Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset] = UNSET - local_port: Union[Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + cpu: int | Unset = UNSET + memory_gi_b: int | Unset = UNSET + volume_size_gi_b: int | Unset = UNSET + gpu: int | Unset = UNSET + environment_variables: None | Unset | WorkspaceComputeConfigEnvironmentVariables = UNSET + local_port: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables container_image_uri = self.container_image_uri @@ -47,7 +51,9 @@ def to_dict(self) -> Dict[str, Any]: volume_size_gi_b = self.volume_size_gi_b - environment_variables: Union[Dict[str, Any], None, Unset] + gpu = self.gpu + + environment_variables: dict[str, Any] | None | Unset if isinstance(self.environment_variables, Unset): environment_variables = UNSET elif isinstance(self.environment_variables, WorkspaceComputeConfigEnvironmentVariables): @@ -57,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: local_port = self.local_port - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -70,6 +76,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["memoryGiB"] = memory_gi_b if volume_size_gi_b is not UNSET: field_dict["volumeSizeGiB"] = volume_size_gi_b + if gpu is not UNSET: + field_dict["gpu"] = gpu if environment_variables is not UNSET: field_dict["environmentVariables"] = environment_variables if local_port is not UNSET: @@ -78,10 +86,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables - d = src_dict.copy() + d = dict(src_dict) container_image_uri = d.pop("containerImageUri") cpu = d.pop("cpu", UNSET) @@ -90,9 +98,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: volume_size_gi_b = d.pop("volumeSizeGiB", UNSET) - def _parse_environment_variables( - data: object, - ) -> Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset]: + gpu = d.pop("gpu", UNSET) + + def _parse_environment_variables(data: object) -> None | Unset | WorkspaceComputeConfigEnvironmentVariables: if data is None: return data if isinstance(data, Unset): @@ -103,9 +111,9 @@ def _parse_environment_variables( environment_variables_type_0 = WorkspaceComputeConfigEnvironmentVariables.from_dict(data) return environment_variables_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset], data) + return cast(None | Unset | WorkspaceComputeConfigEnvironmentVariables, data) environment_variables = _parse_environment_variables(d.pop("environmentVariables", UNSET)) @@ -116,6 +124,7 @@ def _parse_environment_variables( cpu=cpu, memory_gi_b=memory_gi_b, volume_size_gi_b=volume_size_gi_b, + gpu=gpu, environment_variables=environment_variables, local_port=local_port, ) @@ -124,5 +133,17 @@ def _parse_environment_variables( return workspace_compute_config @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace_compute_config_environment_variables.py b/cirro_api_client/v1/models/workspace_compute_config_environment_variables.py index e183018..bc97267 100644 --- a/cirro_api_client/v1/models/workspace_compute_config_environment_variables.py +++ b/cirro_api_client/v1/models/workspace_compute_config_environment_variables.py @@ -1,4 +1,7 @@ -from typing import Any, Dict, List, Type, TypeVar +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +18,34 @@ class WorkspaceComputeConfigEnvironmentVariables: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) workspace_compute_config_environment_variables = cls() workspace_compute_config_environment_variables.additional_properties = d return workspace_compute_config_environment_variables @property - def additional_keys(self) -> List[str]: + 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/cirro_api_client/v1/models/workspace_connection_response.py b/cirro_api_client/v1/models/workspace_connection_response.py index e572b9a..4a60e25 100644 --- a/cirro_api_client/v1/models/workspace_connection_response.py +++ b/cirro_api_client/v1/models/workspace_connection_response.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,16 +23,16 @@ class WorkspaceConnectionResponse: connection_url: str expires_at: datetime.datetime message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: connection_url = self.connection_url expires_at = self.expires_at.isoformat() message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,8 +45,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) connection_url = d.pop("connectionUrl") expires_at = isoparse(d.pop("expiresAt")) @@ -60,5 +63,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return workspace_connection_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace_environment.py b/cirro_api_client/v1/models/workspace_environment.py index 78a14ac..f29d8cf 100644 --- a/cirro_api_client/v1/models/workspace_environment.py +++ b/cirro_api_client/v1/models/workspace_environment.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from __future__ import annotations + +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 @@ -21,7 +24,7 @@ class WorkspaceEnvironment: category (str): default_compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute environment. - versions (List['VersionSpecification']): + versions (list[VersionSpecification]): owner (str): """ @@ -29,12 +32,12 @@ class WorkspaceEnvironment: name: str description: str category: str - default_compute_config: "WorkspaceComputeConfig" - versions: List["VersionSpecification"] + default_compute_config: WorkspaceComputeConfig + versions: list[VersionSpecification] owner: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -52,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: owner = self.owner - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -69,11 +72,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.version_specification import VersionSpecification from ..models.workspace_compute_config import WorkspaceComputeConfig - d = src_dict.copy() + d = dict(src_dict) id = d.pop("id") name = d.pop("name") @@ -107,5 +110,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return workspace_environment @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace_input.py b/cirro_api_client/v1/models/workspace_input.py index 8c0ca09..21e3429 100644 --- a/cirro_api_client/v1/models/workspace_input.py +++ b/cirro_api_client/v1/models/workspace_input.py @@ -1,4 +1,7 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from __future__ import annotations + +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 @@ -19,23 +22,25 @@ class WorkspaceInput: """ Attributes: name (str): Name of the workspace. Example: my-workspace. - mounted_datasets (List['MountedDataset']): List of datasets to mount into the workspace. + mounted_datasets (list[MountedDataset]): List of datasets to mount into the workspace. compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute environment. sharing_type (SharingType): - description (Union[Unset, str]): Description of the workspace. - environment_id (Union[None, Unset, str]): ID of the predefined workspace environment to use. + description (str | Unset): Description of the workspace. + environment_id (None | str | Unset): ID of the predefined workspace environment to use. + auto_stop_timeout (int | None | Unset): Time period (in hours) to automatically stop the workspace if running """ name: str - mounted_datasets: List["MountedDataset"] - compute_config: "WorkspaceComputeConfig" + mounted_datasets: list[MountedDataset] + compute_config: WorkspaceComputeConfig sharing_type: SharingType - description: Union[Unset, str] = UNSET - environment_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + description: str | Unset = UNSET + environment_id: None | str | Unset = UNSET + auto_stop_timeout: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name mounted_datasets = [] @@ -49,13 +54,19 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - environment_id: Union[None, Unset, str] + environment_id: None | str | Unset if isinstance(self.environment_id, Unset): environment_id = UNSET else: environment_id = self.environment_id - field_dict: Dict[str, Any] = {} + auto_stop_timeout: int | None | Unset + if isinstance(self.auto_stop_timeout, Unset): + auto_stop_timeout = UNSET + else: + auto_stop_timeout = self.auto_stop_timeout + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -69,15 +80,17 @@ def to_dict(self) -> Dict[str, Any]: field_dict["description"] = description if environment_id is not UNSET: field_dict["environmentId"] = environment_id + if auto_stop_timeout is not UNSET: + field_dict["autoStopTimeout"] = auto_stop_timeout return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.mounted_dataset import MountedDataset from ..models.workspace_compute_config import WorkspaceComputeConfig - d = src_dict.copy() + d = dict(src_dict) name = d.pop("name") mounted_datasets = [] @@ -93,15 +106,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: description = d.pop("description", UNSET) - def _parse_environment_id(data: object) -> Union[None, Unset, str]: + def _parse_environment_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | str | Unset, data) environment_id = _parse_environment_id(d.pop("environmentId", UNSET)) + def _parse_auto_stop_timeout(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_stop_timeout = _parse_auto_stop_timeout(d.pop("autoStopTimeout", UNSET)) + workspace_input = cls( name=name, mounted_datasets=mounted_datasets, @@ -109,11 +131,24 @@ def _parse_environment_id(data: object) -> Union[None, Unset, str]: sharing_type=sharing_type, description=description, environment_id=environment_id, + auto_stop_timeout=auto_stop_timeout, ) workspace_input.additional_properties = d return workspace_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/models/workspace_session.py b/cirro_api_client/v1/models/workspace_session.py index 796b211..790669c 100644 --- a/cirro_api_client/v1/models/workspace_session.py +++ b/cirro_api_client/v1/models/workspace_session.py @@ -1,5 +1,8 @@ +from __future__ import annotations + import datetime -from typing import Any, Dict, List, Type, TypeVar +from collections.abc import Mapping +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,16 +23,16 @@ class WorkspaceSession: id: str user: str created_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id user = self.user created_at = self.created_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,8 +45,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) id = d.pop("id") user = d.pop("user") @@ -60,5 +63,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return workspace_session @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/cirro_api_client/v1/types.py b/cirro_api_client/v1/types.py index 27e9a71..b64af09 100644 --- a/cirro_api_client/v1/types.py +++ b/cirro_api_client/v1/types.py @@ -1,8 +1,8 @@ """Contains some shared types for properties""" -from collections.abc import MutableMapping +from collections.abc import Mapping, MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, Optional, Tuple, TypeVar +from typing import IO, BinaryIO, Generic, Literal, TypeVar from attrs import define @@ -14,7 +14,15 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +# The types that `httpx.Client(files=)` can accept, copied from that library. +FileContent = IO[bytes] | bytes | str +FileTypes = ( + # (filename, file (or bytes), content_type) + tuple[str | None, FileContent, str | None] + # (filename, file (or bytes), content_type, headers) + | tuple[str | None, FileContent, str | None, Mapping[str, str]] +) +RequestFiles = list[tuple[str, FileTypes]] @define @@ -22,10 +30,10 @@ class File: """Contains information for file uploads""" payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None + file_name: str | None = None + mime_type: str | None = None - def to_tuple(self) -> FileJsonType: + 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 @@ -40,7 +48,7 @@ class Response(Generic[T]): status_code: HTTPStatus content: bytes headers: MutableMapping[str, str] - parsed: Optional[T] + parsed: T | None -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/config.yml b/config.yml index 66dd098..54fd01d 100644 --- a/config.yml +++ b/config.yml @@ -1,4 +1,4 @@ -package_version_override: 0.0.10 +package_version_override: 1.3.0 project_name_override: cirro_api_client package_name_override: v1 post_hooks: diff --git a/poetry.lock b/poetry.lock index c9d68a3..e4c0f2b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -14,69 +14,58 @@ files = [ [[package]] name = "anyio" -version = "4.9.0" -description = "High level compatibility layer for multiple asynchronous event loop implementations" +version = "4.12.0" +description = "High-level concurrency and networking framework on top of asyncio or Trio" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, - {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, + {file = "anyio-4.12.0-py3-none-any.whl", hash = "sha256:dad2376a628f98eeca4881fc56cd06affd18f659b17a747d3ff0307ced94b1bb"}, + {file = "anyio-4.12.0.tar.gz", hash = "sha256:73c693b567b0c55130c104d0b43a9baf3aa6a31fc6110116509f27bf75e21ec0"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" -sniffio = ">=1.1" typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] -trio = ["trio (>=0.26.1)"] +trio = ["trio (>=0.31.0) ; python_version < \"3.10\"", "trio (>=0.32.0) ; python_version >= \"3.10\""] [[package]] name = "attrs" -version = "25.3.0" +version = "25.4.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, - {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, + {file = "attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373"}, + {file = "attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11"}, ] -[package.extras] -benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] -tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] - [[package]] name = "certifi" -version = "2025.7.14" +version = "2026.1.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2"}, - {file = "certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995"}, + {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"}, + {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"}, ] [[package]] name = "click" -version = "8.1.8" +version = "8.3.1" description = "Composable command line interface toolkit" optional = false -python-versions = ">=3.7" +python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, - {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, + {file = "click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6"}, + {file = "click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a"}, ] [package.dependencies] @@ -97,15 +86,15 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.3.0" +version = "1.3.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ - {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, - {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, + {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, + {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, ] [package.dependencies] @@ -150,14 +139,14 @@ trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httpx" -version = "0.26.0" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"}, - {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -165,24 +154,24 @@ anyio = "*" certifi = "*" httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.10" +version = "3.11" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, + {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, ] [package.extras] @@ -190,14 +179,14 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "iniconfig" -version = "2.1.0" +version = "2.3.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, - {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, + {file = "iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"}, + {file = "iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"}, ] [[package]] @@ -218,101 +207,325 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "librt" +version = "0.7.7" +description = "Mypyc runtime library" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "platform_python_implementation != \"PyPy\"" +files = [ + {file = "librt-0.7.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e4836c5645f40fbdc275e5670819bde5ab5f2e882290d304e3c6ddab1576a6d0"}, + {file = "librt-0.7.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ae8aec43117a645a31e5f60e9e3a0797492e747823b9bda6972d521b436b4e8"}, + {file = "librt-0.7.7-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:aea05f701ccd2a76b34f0daf47ca5068176ff553510b614770c90d76ac88df06"}, + {file = "librt-0.7.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7b16ccaeff0ed4355dfb76fe1ea7a5d6d03b5ad27f295f77ee0557bc20a72495"}, + {file = "librt-0.7.7-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c48c7e150c095d5e3cea7452347ba26094be905d6099d24f9319a8b475fcd3e0"}, + {file = "librt-0.7.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4dcee2f921a8632636d1c37f1bbdb8841d15666d119aa61e5399c5268e7ce02e"}, + {file = "librt-0.7.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:14ef0f4ac3728ffd85bfc58e2f2f48fb4ef4fa871876f13a73a7381d10a9f77c"}, + {file = "librt-0.7.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e4ab69fa37f8090f2d971a5d2bc606c7401170dbdae083c393d6cbf439cb45b8"}, + {file = "librt-0.7.7-cp310-cp310-win32.whl", hash = "sha256:4bf3cc46d553693382d2abf5f5bd493d71bb0f50a7c0beab18aa13a5545c8900"}, + {file = "librt-0.7.7-cp310-cp310-win_amd64.whl", hash = "sha256:f0c8fe5aeadd8a0e5b0598f8a6ee3533135ca50fd3f20f130f9d72baf5c6ac58"}, + {file = "librt-0.7.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a487b71fbf8a9edb72a8c7a456dda0184642d99cd007bc819c0b7ab93676a8ee"}, + {file = "librt-0.7.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f4d4efb218264ecf0f8516196c9e2d1a0679d9fb3bb15df1155a35220062eba8"}, + {file = "librt-0.7.7-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:b8bb331aad734b059c4b450cd0a225652f16889e286b2345af5e2c3c625c3d85"}, + {file = "librt-0.7.7-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:467dbd7443bda08338fc8ad701ed38cef48194017554f4c798b0a237904b3f99"}, + {file = "librt-0.7.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50d1d1ee813d2d1a3baf2873634ba506b263032418d16287c92ec1cc9c1a00cb"}, + {file = "librt-0.7.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c7e5070cf3ec92d98f57574da0224f8c73faf1ddd6d8afa0b8c9f6e86997bc74"}, + {file = "librt-0.7.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bdb9f3d865b2dafe7f9ad7f30ef563c80d0ddd2fdc8cc9b8e4f242f475e34d75"}, + {file = "librt-0.7.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8185c8497d45164e256376f9da5aed2bb26ff636c798c9dabe313b90e9f25b28"}, + {file = "librt-0.7.7-cp311-cp311-win32.whl", hash = "sha256:44d63ce643f34a903f09ff7ca355aae019a3730c7afd6a3c037d569beeb5d151"}, + {file = "librt-0.7.7-cp311-cp311-win_amd64.whl", hash = "sha256:7d13cc340b3b82134f8038a2bfe7137093693dcad8ba5773da18f95ad6b77a8a"}, + {file = "librt-0.7.7-cp311-cp311-win_arm64.whl", hash = "sha256:983de36b5a83fe9222f4f7dcd071f9b1ac6f3f17c0af0238dadfb8229588f890"}, + {file = "librt-0.7.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2a85a1fc4ed11ea0eb0a632459ce004a2d14afc085a50ae3463cd3dfe1ce43fc"}, + {file = "librt-0.7.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c87654e29a35938baead1c4559858f346f4a2a7588574a14d784f300ffba0efd"}, + {file = "librt-0.7.7-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:c9faaebb1c6212c20afd8043cd6ed9de0a47d77f91a6b5b48f4e46ed470703fe"}, + {file = "librt-0.7.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1908c3e5a5ef86b23391448b47759298f87f997c3bd153a770828f58c2bb4630"}, + {file = "librt-0.7.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dbc4900e95a98fc0729523be9d93a8fedebb026f32ed9ffc08acd82e3e181503"}, + {file = "librt-0.7.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a7ea4e1fbd253e5c68ea0fe63d08577f9d288a73f17d82f652ebc61fa48d878d"}, + {file = "librt-0.7.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ef7699b7a5a244b1119f85c5bbc13f152cd38240cbb2baa19b769433bae98e50"}, + {file = "librt-0.7.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:955c62571de0b181d9e9e0a0303c8bc90d47670a5eff54cf71bf5da61d1899cf"}, + {file = "librt-0.7.7-cp312-cp312-win32.whl", hash = "sha256:1bcd79be209313b270b0e1a51c67ae1af28adad0e0c7e84c3ad4b5cb57aaa75b"}, + {file = "librt-0.7.7-cp312-cp312-win_amd64.whl", hash = "sha256:4353ee891a1834567e0302d4bd5e60f531912179578c36f3d0430f8c5e16b456"}, + {file = "librt-0.7.7-cp312-cp312-win_arm64.whl", hash = "sha256:a76f1d679beccccdf8c1958e732a1dfcd6e749f8821ee59d7bec009ac308c029"}, + {file = "librt-0.7.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f4a0b0a3c86ba9193a8e23bb18f100d647bf192390ae195d84dfa0a10fb6244"}, + {file = "librt-0.7.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5335890fea9f9e6c4fdf8683061b9ccdcbe47c6dc03ab8e9b68c10acf78be78d"}, + {file = "librt-0.7.7-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9b4346b1225be26def3ccc6c965751c74868f0578cbcba293c8ae9168483d811"}, + {file = "librt-0.7.7-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a10b8eebdaca6e9fdbaf88b5aefc0e324b763a5f40b1266532590d5afb268a4c"}, + {file = "librt-0.7.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:067be973d90d9e319e6eb4ee2a9b9307f0ecd648b8a9002fa237289a4a07a9e7"}, + {file = "librt-0.7.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:23d2299ed007812cccc1ecef018db7d922733382561230de1f3954db28433977"}, + {file = "librt-0.7.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6b6f8ea465524aa4c7420c7cc4ca7d46fe00981de8debc67b1cc2e9957bb5b9d"}, + {file = "librt-0.7.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f8df32a99cc46eb0ee90afd9ada113ae2cafe7e8d673686cf03ec53e49635439"}, + {file = "librt-0.7.7-cp313-cp313-win32.whl", hash = "sha256:86f86b3b785487c7760247bcdac0b11aa8bf13245a13ed05206286135877564b"}, + {file = "librt-0.7.7-cp313-cp313-win_amd64.whl", hash = "sha256:4862cb2c702b1f905c0503b72d9d4daf65a7fdf5a9e84560e563471e57a56949"}, + {file = "librt-0.7.7-cp313-cp313-win_arm64.whl", hash = "sha256:0996c83b1cb43c00e8c87835a284f9057bc647abd42b5871e5f941d30010c832"}, + {file = "librt-0.7.7-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:23daa1ab0512bafdd677eb1bfc9611d8ffbe2e328895671e64cb34166bc1b8c8"}, + {file = "librt-0.7.7-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:558a9e5a6f3cc1e20b3168fb1dc802d0d8fa40731f6e9932dcc52bbcfbd37111"}, + {file = "librt-0.7.7-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2567cb48dc03e5b246927ab35cbb343376e24501260a9b5e30b8e255dca0d1d2"}, + {file = "librt-0.7.7-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6066c638cdf85ff92fc6f932d2d73c93a0e03492cdfa8778e6d58c489a3d7259"}, + {file = "librt-0.7.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a609849aca463074c17de9cda173c276eb8fee9e441053529e7b9e249dc8b8ee"}, + {file = "librt-0.7.7-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:add4e0a000858fe9bb39ed55f31085506a5c38363e6eb4a1e5943a10c2bfc3d1"}, + {file = "librt-0.7.7-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a3bfe73a32bd0bdb9a87d586b05a23c0a1729205d79df66dee65bb2e40d671ba"}, + {file = "librt-0.7.7-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0ecce0544d3db91a40f8b57ae26928c02130a997b540f908cefd4d279d6c5848"}, + {file = "librt-0.7.7-cp314-cp314-win32.whl", hash = "sha256:8f7a74cf3a80f0c3b0ec75b0c650b2f0a894a2cec57ef75f6f72c1e82cdac61d"}, + {file = "librt-0.7.7-cp314-cp314-win_amd64.whl", hash = "sha256:3d1fe2e8df3268dd6734dba33ededae72ad5c3a859b9577bc00b715759c5aaab"}, + {file = "librt-0.7.7-cp314-cp314-win_arm64.whl", hash = "sha256:2987cf827011907d3dfd109f1be0d61e173d68b1270107bb0e89f2fca7f2ed6b"}, + {file = "librt-0.7.7-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8e92c8de62b40bfce91d5e12c6e8b15434da268979b1af1a6589463549d491e6"}, + {file = "librt-0.7.7-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f683dcd49e2494a7535e30f779aa1ad6e3732a019d80abe1309ea91ccd3230e3"}, + {file = "librt-0.7.7-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9b15e5d17812d4d629ff576699954f74e2cc24a02a4fc401882dd94f81daba45"}, + {file = "librt-0.7.7-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c084841b879c4d9b9fa34e5d5263994f21aea7fd9c6add29194dbb41a6210536"}, + {file = "librt-0.7.7-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10c8fb9966f84737115513fecbaf257f9553d067a7dd45a69c2c7e5339e6a8dc"}, + {file = "librt-0.7.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:9b5fb1ecb2c35362eab2dbd354fd1efa5a8440d3e73a68be11921042a0edc0ff"}, + {file = "librt-0.7.7-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:d1454899909d63cc9199a89fcc4f81bdd9004aef577d4ffc022e600c412d57f3"}, + {file = "librt-0.7.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:7ef28f2e7a016b29792fe0a2dd04dec75725b32a1264e390c366103f834a9c3a"}, + {file = "librt-0.7.7-cp314-cp314t-win32.whl", hash = "sha256:5e419e0db70991b6ba037b70c1d5bbe92b20ddf82f31ad01d77a347ed9781398"}, + {file = "librt-0.7.7-cp314-cp314t-win_amd64.whl", hash = "sha256:d6b7d93657332c817b8d674ef6bf1ab7796b4f7ce05e420fd45bd258a72ac804"}, + {file = "librt-0.7.7-cp314-cp314t-win_arm64.whl", hash = "sha256:142c2cd91794b79fd0ce113bd658993b7ede0fe93057668c2f98a45ca00b7e91"}, + {file = "librt-0.7.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c8ffe3431d98cc043a14e88b21288b5ec7ee12cb01260e94385887f285ef9389"}, + {file = "librt-0.7.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e40d20ae1722d6b8ea6acf4597e789604649dcd9c295eb7361a28225bc2e9e12"}, + {file = "librt-0.7.7-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f2cb63c49bc96847c3bb8dca350970e4dcd19936f391cfdfd057dcb37c4fa97e"}, + {file = "librt-0.7.7-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8f2f8dcf5ab9f80fb970c6fd780b398efb2f50c1962485eb8d3ab07788595a48"}, + {file = "librt-0.7.7-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a1f5cc41a570269d1be7a676655875e3a53de4992a9fa38efb7983e97cf73d7c"}, + {file = "librt-0.7.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ff1fb2dfef035549565a4124998fadcb7a3d4957131ddf004a56edeb029626b3"}, + {file = "librt-0.7.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ab2a2a9cd7d044e1a11ca64a86ad3361d318176924bbe5152fbc69f99be20b8c"}, + {file = "librt-0.7.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ad3fc2d859a709baf9dd9607bb72f599b1cfb8a39eafd41307d0c3c4766763cb"}, + {file = "librt-0.7.7-cp39-cp39-win32.whl", hash = "sha256:f83c971eb9d2358b6a18da51dc0ae00556ac7c73104dde16e9e14c15aaf685ca"}, + {file = "librt-0.7.7-cp39-cp39-win_amd64.whl", hash = "sha256:264720fc288c86039c091a4ad63419a5d7cabbf1c1c9933336a957ed2483e570"}, + {file = "librt-0.7.7.tar.gz", hash = "sha256:81d957b069fed1890953c3b9c3895c7689960f233eea9a1d9607f71ce7f00b2c"}, +] + +[[package]] +name = "markdown-it-py" +version = "4.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147"}, + {file = "markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "markdown-it-pyrs", "mistletoe (>=1.0,<2.0)", "mistune (>=3.0,<4.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins (>=0.5.0)"] +profiling = ["gprof2dot"] +rtd = ["ipykernel", "jupyter_sphinx", "mdit-py-plugins (>=0.5.0)", "myst-parser", "pyyaml", "sphinx", "sphinx-book-theme (>=1.0,<2.0)", "sphinx-copybutton", "sphinx-design"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions", "requests"] + [[package]] name = "markupsafe" -version = "3.0.2" +version = "3.0.3" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, - {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, + {file = "markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559"}, + {file = "markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1"}, + {file = "markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa"}, + {file = "markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8"}, + {file = "markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1"}, + {file = "markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad"}, + {file = "markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a"}, + {file = "markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19"}, + {file = "markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01"}, + {file = "markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c"}, + {file = "markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e"}, + {file = "markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b"}, + {file = "markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d"}, + {file = "markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c"}, + {file = "markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f"}, + {file = "markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795"}, + {file = "markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12"}, + {file = "markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed"}, + {file = "markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5"}, + {file = "markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485"}, + {file = "markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73"}, + {file = "markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287"}, + {file = "markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe"}, + {file = "markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe"}, + {file = "markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9"}, + {file = "markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581"}, + {file = "markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4"}, + {file = "markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab"}, + {file = "markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa"}, + {file = "markupsafe-3.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26"}, + {file = "markupsafe-3.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d"}, + {file = "markupsafe-3.0.3-cp39-cp39-win32.whl", hash = "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7"}, + {file = "markupsafe-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e"}, + {file = "markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8"}, + {file = "markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"}, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + +[[package]] +name = "mypy" +version = "1.19.1" +description = "Optional static typing for Python" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "mypy-1.19.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f05aa3d375b385734388e844bc01733bd33c644ab48e9684faa54e5389775ec"}, + {file = "mypy-1.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:022ea7279374af1a5d78dfcab853fe6a536eebfda4b59deab53cd21f6cd9f00b"}, + {file = "mypy-1.19.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee4c11e460685c3e0c64a4c5de82ae143622410950d6be863303a1c4ba0e36d6"}, + {file = "mypy-1.19.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de759aafbae8763283b2ee5869c7255391fbc4de3ff171f8f030b5ec48381b74"}, + {file = "mypy-1.19.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ab43590f9cd5108f41aacf9fca31841142c786827a74ab7cc8a2eacb634e09a1"}, + {file = "mypy-1.19.1-cp310-cp310-win_amd64.whl", hash = "sha256:2899753e2f61e571b3971747e302d5f420c3fd09650e1951e99f823bc3089dac"}, + {file = "mypy-1.19.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d8dfc6ab58ca7dda47d9237349157500468e404b17213d44fc1cb77bce532288"}, + {file = "mypy-1.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e3f276d8493c3c97930e354b2595a44a21348b320d859fb4a2b9f66da9ed27ab"}, + {file = "mypy-1.19.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2abb24cf3f17864770d18d673c85235ba52456b36a06b6afc1e07c1fdcd3d0e6"}, + {file = "mypy-1.19.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a009ffa5a621762d0c926a078c2d639104becab69e79538a494bcccb62cc0331"}, + {file = "mypy-1.19.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f7cee03c9a2e2ee26ec07479f38ea9c884e301d42c6d43a19d20fb014e3ba925"}, + {file = "mypy-1.19.1-cp311-cp311-win_amd64.whl", hash = "sha256:4b84a7a18f41e167f7995200a1d07a4a6810e89d29859df936f1c3923d263042"}, + {file = "mypy-1.19.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8174a03289288c1f6c46d55cef02379b478bfbc8e358e02047487cad44c6ca1"}, + {file = "mypy-1.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffcebe56eb09ff0c0885e750036a095e23793ba6c2e894e7e63f6d89ad51f22e"}, + {file = "mypy-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b64d987153888790bcdb03a6473d321820597ab8dd9243b27a92153c4fa50fd2"}, + {file = "mypy-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c35d298c2c4bba75feb2195655dfea8124d855dfd7343bf8b8c055421eaf0cf8"}, + {file = "mypy-1.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:34c81968774648ab5ac09c29a375fdede03ba253f8f8287847bd480782f73a6a"}, + {file = "mypy-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:b10e7c2cd7870ba4ad9b2d8a6102eb5ffc1f16ca35e3de6bfa390c1113029d13"}, + {file = "mypy-1.19.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e3157c7594ff2ef1634ee058aafc56a82db665c9438fd41b390f3bde1ab12250"}, + {file = "mypy-1.19.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdb12f69bcc02700c2b47e070238f42cb87f18c0bc1fc4cdb4fb2bc5fd7a3b8b"}, + {file = "mypy-1.19.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f859fb09d9583a985be9a493d5cfc5515b56b08f7447759a0c5deaf68d80506e"}, + {file = "mypy-1.19.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9a6538e0415310aad77cb94004ca6482330fece18036b5f360b62c45814c4ef"}, + {file = "mypy-1.19.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:da4869fc5e7f62a88f3fe0b5c919d1d9f7ea3cef92d3689de2823fd27e40aa75"}, + {file = "mypy-1.19.1-cp313-cp313-win_amd64.whl", hash = "sha256:016f2246209095e8eda7538944daa1d60e1e8134d98983b9fc1e92c1fc0cb8dd"}, + {file = "mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1"}, + {file = "mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718"}, + {file = "mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b"}, + {file = "mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045"}, + {file = "mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957"}, + {file = "mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f"}, + {file = "mypy-1.19.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7bcfc336a03a1aaa26dfce9fff3e287a3ba99872a157561cbfcebe67c13308e3"}, + {file = "mypy-1.19.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b7951a701c07ea584c4fe327834b92a30825514c868b1f69c30445093fdd9d5a"}, + {file = "mypy-1.19.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b13cfdd6c87fc3efb69ea4ec18ef79c74c3f98b4e5498ca9b85ab3b2c2329a67"}, + {file = "mypy-1.19.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f28f99c824ecebcdaa2e55d82953e38ff60ee5ec938476796636b86afa3956e"}, + {file = "mypy-1.19.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c608937067d2fc5a4dd1a5ce92fd9e1398691b8c5d012d66e1ddd430e9244376"}, + {file = "mypy-1.19.1-cp39-cp39-win_amd64.whl", hash = "sha256:409088884802d511ee52ca067707b90c883426bd95514e8cfda8281dc2effe24"}, + {file = "mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247"}, + {file = "mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba"}, +] + +[package.dependencies] +librt = {version = ">=0.6.2", markers = "platform_python_implementation != \"PyPy\""} +mypy_extensions = ">=1.0.0" +pathspec = ">=0.9.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing_extensions = ">=4.6.0" + +[package.extras] +dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] +install-types = ["pip"] +mypyc = ["setuptools (>=50)"] +reports = ["lxml"] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +description = "Type system extensions for programs checked with the mypy type checker." +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, + {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, ] [[package]] name = "openapi-python-client" -version = "0.17.3" +version = "0.28.0" description = "Generate modern Python clients from OpenAPI" optional = false -python-versions = "<4.0,>=3.8" +python-versions = "<4.0,>=3.10" groups = ["dev"] files = [ - {file = "openapi_python_client-0.17.3-py3-none-any.whl", hash = "sha256:b09811136d516402944764aa6d210315db0ab9cad9367acc653fac4a96d9736a"}, - {file = "openapi_python_client-0.17.3.tar.gz", hash = "sha256:ff6d404e72d316d2a4ebfac72be69156028824f19d257aa3e8c7db5d766982dc"}, + {file = "openapi_python_client-0.28.0-py3-none-any.whl", hash = "sha256:d2c2f4dabb7fe12377cb0f0f6c50ad5ade3922cae7940510422ca844cae4dca4"}, + {file = "openapi_python_client-0.28.0.tar.gz", hash = "sha256:e0162b17bfee9b990d4dc38b256af129e0035e551a33dac8e4d5d4abfdb7c3d2"}, ] [package.dependencies] -attrs = ">=21.3.0" +attrs = ">=22.2.0" colorama = {version = ">=0.4.3", markers = "sys_platform == \"win32\""} -httpx = ">=0.20.0,<0.27.0" +httpx = ">=0.23.0,<0.29.0" jinja2 = ">=3.0.0,<4.0.0" -pydantic = ">=2.1.1,<3.0.0" +pydantic = ">=2.10,<3.0.0" python-dateutil = ">=2.8.1,<3.0.0" -pyyaml = ">=6.0,<7.0" -ruff = ">=0.1.2,<1.0.0" +ruamel-yaml = ">=0.18.6,<0.19.0" +ruff = ">=0.2" shellingham = ">=1.3.2,<2.0.0" -typer = ">0.6,<0.10" -typing-extensions = ">=4.8.0,<5.0.0" +typer = ">0.16,<0.21" [[package]] name = "packaging" @@ -326,6 +539,18 @@ files = [ {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + [[package]] name = "pluggy" version = "1.6.0" @@ -344,21 +569,21 @@ testing = ["coverage", "pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.11.7" +version = "2.12.5" description = "Data validation using Python type hints" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pydantic-2.11.7-py3-none-any.whl", hash = "sha256:dde5df002701f6de26248661f6835bbe296a47bf73990135c7d07ce741b9623b"}, - {file = "pydantic-2.11.7.tar.gz", hash = "sha256:d989c3c6cb79469287b1569f7447a17848c998458d49ebe294e975b9baf0f0db"}, + {file = "pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d"}, + {file = "pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.33.2" -typing-extensions = ">=4.12.2" -typing-inspection = ">=0.4.0" +pydantic-core = "2.41.5" +typing-extensions = ">=4.14.1" +typing-inspection = ">=0.4.2" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -366,115 +591,137 @@ timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows [[package]] name = "pydantic-core" -version = "2.33.2" +version = "2.41.5" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pydantic_core-2.33.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2b3d326aaef0c0399d9afffeb6367d5e26ddc24d351dbc9c636840ac355dc5d8"}, - {file = "pydantic_core-2.33.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e5b2671f05ba48b94cb90ce55d8bdcaaedb8ba00cc5359f6810fc918713983d"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0069c9acc3f3981b9ff4cdfaf088e98d83440a4c7ea1bc07460af3d4dc22e72d"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d53b22f2032c42eaaf025f7c40c2e3b94568ae077a606f006d206a463bc69572"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0405262705a123b7ce9f0b92f123334d67b70fd1f20a9372b907ce1080c7ba02"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b25d91e288e2c4e0662b8038a28c6a07eaac3e196cfc4ff69de4ea3db992a1b"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bdfe4b3789761f3bcb4b1ddf33355a71079858958e3a552f16d5af19768fef2"}, - {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:efec8db3266b76ef9607c2c4c419bdb06bf335ae433b80816089ea7585816f6a"}, - {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:031c57d67ca86902726e0fae2214ce6770bbe2f710dc33063187a68744a5ecac"}, - {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:f8de619080e944347f5f20de29a975c2d815d9ddd8be9b9b7268e2e3ef68605a"}, - {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73662edf539e72a9440129f231ed3757faab89630d291b784ca99237fb94db2b"}, - {file = "pydantic_core-2.33.2-cp310-cp310-win32.whl", hash = "sha256:0a39979dcbb70998b0e505fb1556a1d550a0781463ce84ebf915ba293ccb7e22"}, - {file = "pydantic_core-2.33.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0379a2b24882fef529ec3b4987cb5d003b9cda32256024e6fe1586ac45fc640"}, - {file = "pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7"}, - {file = "pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef"}, - {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e"}, - {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d"}, - {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30"}, - {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf"}, - {file = "pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51"}, - {file = "pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab"}, - {file = "pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65"}, - {file = "pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc"}, - {file = "pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1"}, - {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b"}, - {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1"}, - {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6"}, - {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea"}, - {file = "pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290"}, - {file = "pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2"}, - {file = "pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab"}, - {file = "pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f"}, - {file = "pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d"}, - {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56"}, - {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5"}, - {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e"}, - {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162"}, - {file = "pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849"}, - {file = "pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9"}, - {file = "pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9"}, - {file = "pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac"}, - {file = "pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5"}, - {file = "pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9"}, - {file = "pydantic_core-2.33.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a2b911a5b90e0374d03813674bf0a5fbbb7741570dcd4b4e85a2e48d17def29d"}, - {file = "pydantic_core-2.33.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fa6dfc3e4d1f734a34710f391ae822e0a8eb8559a85c6979e14e65ee6ba2954"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c54c939ee22dc8e2d545da79fc5381f1c020d6d3141d3bd747eab59164dc89fb"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53a57d2ed685940a504248187d5685e49eb5eef0f696853647bf37c418c538f7"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09fb9dd6571aacd023fe6aaca316bd01cf60ab27240d7eb39ebd66a3a15293b4"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0e6116757f7959a712db11f3e9c0a99ade00a5bbedae83cb801985aa154f071b"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d55ab81c57b8ff8548c3e4947f119551253f4e3787a7bbc0b6b3ca47498a9d3"}, - {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c20c462aa4434b33a2661701b861604913f912254e441ab8d78d30485736115a"}, - {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44857c3227d3fb5e753d5fe4a3420d6376fa594b07b621e220cd93703fe21782"}, - {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:eb9b459ca4df0e5c87deb59d37377461a538852765293f9e6ee834f0435a93b9"}, - {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9fcd347d2cc5c23b06de6d3b7b8275be558a0c90549495c699e379a80bf8379e"}, - {file = "pydantic_core-2.33.2-cp39-cp39-win32.whl", hash = "sha256:83aa99b1285bc8f038941ddf598501a86f1536789740991d7d8756e34f1e74d9"}, - {file = "pydantic_core-2.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:f481959862f57f29601ccced557cc2e817bce7533ab8e01a797a48b49c9692b3"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c4aa4e82353f65e548c476b37e64189783aa5384903bfea4f41580f255fddfa"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d946c8bf0d5c24bf4fe333af284c59a19358aa3ec18cb3dc4370080da1e8ad29"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87b31b6846e361ef83fedb187bb5b4372d0da3f7e28d85415efa92d6125d6e6d"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa9d91b338f2df0508606f7009fde642391425189bba6d8c653afd80fd6bb64e"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2058a32994f1fde4ca0480ab9d1e75a0e8c87c22b53a3ae66554f9af78f2fe8c"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:0e03262ab796d986f978f79c943fc5f620381be7287148b8010b4097f79a39ec"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1a8695a8d00c73e50bff9dfda4d540b7dee29ff9b8053e38380426a85ef10052"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa754d1850735a0b0e03bcffd9d4b4343eb417e47196e4485d9cca326073a42c"}, - {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a11c8d26a50bfab49002947d3d237abe4d9e4b5bdc8846a63537b6488e197808"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb"}, - {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:87acbfcf8e90ca885206e98359d7dca4bcbb35abdc0ff66672a293e1d7a19101"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f92c15cd1e97d4b12acd1cc9004fa092578acfa57b67ad5e43a197175d01a64"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f26877a748dc4251cfcfda9dfb5f13fcb034f5308388066bcfe9031b63ae7d"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac89aea9af8cd672fa7b510e7b8c33b0bba9a43186680550ccf23020f32d535"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:970919794d126ba8645f3837ab6046fb4e72bbc057b3709144066204c19a455d"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3eb3fe62804e8f859c49ed20a8451342de53ed764150cb14ca71357c765dc2a6"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:3abcd9392a36025e3bd55f9bd38d908bd17962cc49bc6da8e7e96285336e2bca"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3a1c81334778f9e3af2f8aeb7a960736e5cab1dfebfb26aabca09afd2906c039"}, - {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2807668ba86cb38c6817ad9bc66215ab8584d1d304030ce4f0887336f28a5e27"}, - {file = "pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc"}, + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146"}, + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51"}, + {file = "pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e"}, ] [package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +typing-extensions = ">=4.14.1" [[package]] name = "pygments" @@ -493,21 +740,21 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.4.1" +version = "9.0.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "pytest-8.4.1-py3-none-any.whl", hash = "sha256:539c70ba6fcead8e78eebbf1115e8b589e7565830d7d006a8723f19ac8a0afb7"}, - {file = "pytest-8.4.1.tar.gz", hash = "sha256:7c67fd69174877359ed9371ec3af8a3d2b04741818c51e5e99cc1742251fa93c"}, + {file = "pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b"}, + {file = "pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11"}, ] [package.dependencies] colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} -iniconfig = ">=1" -packaging = ">=20" +iniconfig = ">=1.0.1" +packaging = ">=22" pluggy = ">=1.5,<2" pygments = ">=2.7.2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} @@ -531,94 +778,142 @@ files = [ six = ">=1.5" [[package]] -name = "pyyaml" -version = "6.0.2" -description = "YAML parser and emitter for Python" +name = "rich" +version = "14.2.0" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false -python-versions = ">=3.8" +python-versions = ">=3.8.0" +groups = ["dev"] +files = [ + {file = "rich-14.2.0-py3-none-any.whl", hash = "sha256:76bc51fe2e57d2b1be1f96c524b890b816e334ab4c1e45888799bfaab0021edd"}, + {file = "rich-14.2.0.tar.gz", hash = "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + +[[package]] +name = "ruamel-yaml" +version = "0.18.17" +description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" +optional = false +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, - {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, - {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, - {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, - {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, - {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, - {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, - {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, - {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, - {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, - {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, - {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, - {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, - {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, - {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, - {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, - {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, + {file = "ruamel_yaml-0.18.17-py3-none-any.whl", hash = "sha256:9c8ba9eb3e793efdf924b60d521820869d5bf0cb9c6f1b82d82de8295e290b9d"}, + {file = "ruamel_yaml-0.18.17.tar.gz", hash = "sha256:9091cd6e2d93a3a4b157ddb8fabf348c3de7f1fb1381346d985b6b247dcd8d3c"}, +] + +[package.dependencies] +"ruamel.yaml.clib" = {version = ">=0.2.15", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.15\""} + +[package.extras] +docs = ["mercurial (>5.7)", "ryd"] +jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] + +[[package]] +name = "ruamel-yaml-clib" +version = "0.2.15" +description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "platform_python_implementation == \"CPython\" and python_version < \"3.15\"" +files = [ + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:88eea8baf72f0ccf232c22124d122a7f26e8a24110a0273d9bcddcb0f7e1fa03"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9b6f7d74d094d1f3a4e157278da97752f16ee230080ae331fcc219056ca54f77"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4be366220090d7c3424ac2b71c90d1044ea34fca8c0b88f250064fd06087e614"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f66f600833af58bea694d5892453f2270695b92200280ee8c625ec5a477eed3"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:da3d6adadcf55a93c214d23941aef4abfd45652110aed6580e814152f385b862"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e9fde97ecb7bb9c41261c2ce0da10323e9227555c674989f8d9eb7572fc2098d"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:05c70f7f86be6f7bee53794d80050a28ae7e13e4a0087c1839dcdefd68eb36b6"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6f1d38cbe622039d111b69e9ca945e7e3efebb30ba998867908773183357f3ed"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-win32.whl", hash = "sha256:fe239bdfdae2302e93bd6e8264bd9b71290218fff7084a9db250b55caaccf43f"}, + {file = "ruamel_yaml_clib-0.2.15-cp310-cp310-win_amd64.whl", hash = "sha256:468858e5cbde0198337e6a2a78eda8c3fb148bdf4c6498eaf4bc9ba3f8e780bd"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c583229f336682b7212a43d2fa32c30e643d3076178fb9f7a6a14dde85a2d8bd"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56ea19c157ed8c74b6be51b5fa1c3aff6e289a041575f0556f66e5fb848bb137"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5fea0932358e18293407feb921d4f4457db837b67ec1837f87074667449f9401"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef71831bd61fbdb7aa0399d5c4da06bea37107ab5c79ff884cc07f2450910262"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:617d35dc765715fa86f8c3ccdae1e4229055832c452d4ec20856136acc75053f"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b45498cc81a4724a2d42273d6cfc243c0547ad7c6b87b4f774cb7bcc131c98d"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:def5663361f6771b18646620fca12968aae730132e104688766cf8a3b1d65922"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:014181cdec565c8745b7cbc4de3bf2cc8ced05183d986e6d1200168e5bb59490"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-win32.whl", hash = "sha256:d290eda8f6ada19e1771b54e5706b8f9807e6bb08e873900d5ba114ced13e02c"}, + {file = "ruamel_yaml_clib-0.2.15-cp311-cp311-win_amd64.whl", hash = "sha256:bdc06ad71173b915167702f55d0f3f027fc61abd975bd308a0968c02db4a4c3e"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb15a2e2a90c8475df45c0949793af1ff413acfb0a716b8b94e488ea95ce7cff"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:64da03cbe93c1e91af133f5bec37fd24d0d4ba2418eaf970d7166b0a26a148a2"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f6d3655e95a80325b84c4e14c080b2470fe4f33b6846f288379ce36154993fb1"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71845d377c7a47afc6592aacfea738cc8a7e876d586dfba814501d8c53c1ba60"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11e5499db1ccbc7f4b41f0565e4f799d863ea720e01d3e99fa0b7b5fcd7802c9"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4b293a37dc97e2b1e8a1aec62792d1e52027087c8eea4fc7b5abd2bdafdd6642"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:512571ad41bba04eac7268fe33f7f4742210ca26a81fe0c75357fa682636c690"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5e9f630c73a490b758bf14d859a39f375e6999aea5ddd2e2e9da89b9953486a"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-win32.whl", hash = "sha256:f4421ab780c37210a07d138e56dd4b51f8642187cdfb433eb687fe8c11de0144"}, + {file = "ruamel_yaml_clib-0.2.15-cp312-cp312-win_amd64.whl", hash = "sha256:2b216904750889133d9222b7b873c199d48ecbb12912aca78970f84a5aa1a4bc"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dcec721fddbb62e60c2801ba08c87010bd6b700054a09998c4d09c08147b8fb"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:65f48245279f9bb301d1276f9679b82e4c080a1ae25e679f682ac62446fac471"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:46895c17ead5e22bea5e576f1db7e41cb273e8d062c04a6a49013d9f60996c25"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3eb199178b08956e5be6288ee0b05b2fb0b5c1f309725ad25d9c6ea7e27f962a"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d1032919280ebc04a80e4fb1e93f7a738129857eaec9448310e638c8bccefcf"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ab0df0648d86a7ecbd9c632e8f8d6b21bb21b5fc9d9e095c796cacf32a728d2d"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:331fb180858dd8534f0e61aa243b944f25e73a4dae9962bd44c46d1761126bbf"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fd4c928ddf6bce586285daa6d90680b9c291cfd045fc40aad34e445d57b1bf51"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-win32.whl", hash = "sha256:bf0846d629e160223805db9fe8cc7aec16aaa11a07310c50c8c7164efa440aec"}, + {file = "ruamel_yaml_clib-0.2.15-cp313-cp313-win_amd64.whl", hash = "sha256:45702dfbea1420ba3450bb3dd9a80b33f0badd57539c6aac09f42584303e0db6"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:753faf20b3a5906faf1fc50e4ddb8c074cb9b251e00b14c18b28492f933ac8ef"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:480894aee0b29752560a9de46c0e5f84a82602f2bc5c6cde8db9a345319acfdf"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4d3b58ab2454b4747442ac76fab66739c72b1e2bb9bd173d7694b9f9dbc9c000"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bfd309b316228acecfa30670c3887dcedf9b7a44ea39e2101e75d2654522acd4"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2812ff359ec1f30129b62372e5f22a52936fac13d5d21e70373dbca5d64bb97c"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7e74ea87307303ba91073b63e67f2c667e93f05a8c63079ee5b7a5c8d0d7b043"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:713cd68af9dfbe0bb588e144a61aad8dcc00ef92a82d2e87183ca662d242f524"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:542d77b72786a35563f97069b9379ce762944e67055bea293480f7734b2c7e5e"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-win32.whl", hash = "sha256:424ead8cef3939d690c4b5c85ef5b52155a231ff8b252961b6516ed7cf05f6aa"}, + {file = "ruamel_yaml_clib-0.2.15-cp314-cp314-win_amd64.whl", hash = "sha256:ac9b8d5fa4bb7fd2917ab5027f60d4234345fd366fe39aa711d5dca090aa1467"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:923816815974425fbb1f1bf57e85eca6e14d8adc313c66db21c094927ad01815"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dcc7f3162d3711fd5d52e2267e44636e3e566d1e5675a5f0b30e98f2c4af7974"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5d3c9210219cbc0f22706f19b154c9a798ff65a6beeafbf77fc9c057ec806f7d"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bb7b728fd9f405aa00b4a0b17ba3f3b810d0ccc5f77f7373162e9b5f0ff75d5"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3cb75a3c14f1d6c3c2a94631e362802f70e83e20d1f2b2ef3026c05b415c4900"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:badd1d7283f3e5894779a6ea8944cc765138b96804496c91812b2829f70e18a7"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0ba6604bbc3dfcef844631932d06a1a4dcac3fee904efccf582261948431628a"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a8220fd4c6f98485e97aea65e1df76d4fed1678ede1fe1d0eed2957230d287c4"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-win32.whl", hash = "sha256:04d21dc9c57d9608225da28285900762befbb0165ae48482c15d8d4989d4af14"}, + {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-win_amd64.whl", hash = "sha256:27dc656e84396e6d687f97c6e65fb284d100483628f02d95464fd731743a4afe"}, + {file = "ruamel_yaml_clib-0.2.15.tar.gz", hash = "sha256:46e4cc8c43ef6a94885f72512094e482114a8a706d3c555a34ed4b0d20200600"}, ] [[package]] name = "ruff" -version = "0.12.7" +version = "0.14.10" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "ruff-0.12.7-py3-none-linux_armv6l.whl", hash = "sha256:76e4f31529899b8c434c3c1dede98c4483b89590e15fb49f2d46183801565303"}, - {file = "ruff-0.12.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:789b7a03e72507c54fb3ba6209e4bb36517b90f1a3569ea17084e3fd295500fb"}, - {file = "ruff-0.12.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:2e1c2a3b8626339bb6369116e7030a4cf194ea48f49b64bb505732a7fce4f4e3"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32dec41817623d388e645612ec70d5757a6d9c035f3744a52c7b195a57e03860"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47ef751f722053a5df5fa48d412dbb54d41ab9b17875c6840a58ec63ff0c247c"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a828a5fc25a3efd3e1ff7b241fd392686c9386f20e5ac90aa9234a5faa12c423"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5726f59b171111fa6a69d82aef48f00b56598b03a22f0f4170664ff4d8298efb"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:74e6f5c04c4dd4aba223f4fe6e7104f79e0eebf7d307e4f9b18c18362124bccd"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d0bfe4e77fba61bf2ccadf8cf005d6133e3ce08793bbe870dd1c734f2699a3e"}, - {file = "ruff-0.12.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06bfb01e1623bf7f59ea749a841da56f8f653d641bfd046edee32ede7ff6c606"}, - {file = "ruff-0.12.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e41df94a957d50083fd09b916d6e89e497246698c3f3d5c681c8b3e7b9bb4ac8"}, - {file = "ruff-0.12.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:4000623300563c709458d0ce170c3d0d788c23a058912f28bbadc6f905d67afa"}, - {file = "ruff-0.12.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:69ffe0e5f9b2cf2b8e289a3f8945b402a1b19eff24ec389f45f23c42a3dd6fb5"}, - {file = "ruff-0.12.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a07a5c8ffa2611a52732bdc67bf88e243abd84fe2d7f6daef3826b59abbfeda4"}, - {file = "ruff-0.12.7-py3-none-win32.whl", hash = "sha256:c928f1b2ec59fb77dfdf70e0419408898b63998789cc98197e15f560b9e77f77"}, - {file = "ruff-0.12.7-py3-none-win_amd64.whl", hash = "sha256:9c18f3d707ee9edf89da76131956aba1270c6348bfee8f6c647de841eac7194f"}, - {file = "ruff-0.12.7-py3-none-win_arm64.whl", hash = "sha256:dfce05101dbd11833a0776716d5d1578641b7fddb537fe7fa956ab85d1769b69"}, - {file = "ruff-0.12.7.tar.gz", hash = "sha256:1fc3193f238bc2d7968772c82831a4ff69252f673be371fb49663f0068b7ec71"}, + {file = "ruff-0.14.10-py3-none-linux_armv6l.whl", hash = "sha256:7a3ce585f2ade3e1f29ec1b92df13e3da262178df8c8bdf876f48fa0e8316c49"}, + {file = "ruff-0.14.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:674f9be9372907f7257c51f1d4fc902cb7cf014b9980152b802794317941f08f"}, + {file = "ruff-0.14.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d85713d522348837ef9df8efca33ccb8bd6fcfc86a2cde3ccb4bc9d28a18003d"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6987ebe0501ae4f4308d7d24e2d0fe3d7a98430f5adfd0f1fead050a740a3a77"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16a01dfb7b9e4eee556fbfd5392806b1b8550c9b4a9f6acd3dbe6812b193c70a"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7165d31a925b7a294465fa81be8c12a0e9b60fb02bf177e79067c867e71f8b1f"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c561695675b972effb0c0a45db233f2c816ff3da8dcfbe7dfc7eed625f218935"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4bb98fcbbc61725968893682fd4df8966a34611239c9fd07a1f6a07e7103d08e"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f24b47993a9d8cb858429e97bdf8544c78029f09b520af615c1d261bf827001d"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59aabd2e2c4fd614d2862e7939c34a532c04f1084476d6833dddef4afab87e9f"}, + {file = "ruff-0.14.10-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:213db2b2e44be8625002dbea33bb9c60c66ea2c07c084a00d55732689d697a7f"}, + {file = "ruff-0.14.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b914c40ab64865a17a9a5b67911d14df72346a634527240039eb3bd650e5979d"}, + {file = "ruff-0.14.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1484983559f026788e3a5c07c81ef7d1e97c1c78ed03041a18f75df104c45405"}, + {file = "ruff-0.14.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c70427132db492d25f982fffc8d6c7535cc2fd2c83fc8888f05caaa248521e60"}, + {file = "ruff-0.14.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5bcf45b681e9f1ee6445d317ce1fa9d6cba9a6049542d1c3d5b5958986be8830"}, + {file = "ruff-0.14.10-py3-none-win32.whl", hash = "sha256:104c49fc7ab73f3f3a758039adea978869a918f31b73280db175b43a2d9b51d6"}, + {file = "ruff-0.14.10-py3-none-win_amd64.whl", hash = "sha256:466297bd73638c6bdf06485683e812db1c00c7ac96d4ddd0294a338c62fdc154"}, + {file = "ruff-0.14.10-py3-none-win_arm64.whl", hash = "sha256:e51d046cf6dda98a4633b8a8a771451107413b0f07183b2bef03f075599e44e6"}, + {file = "ruff-0.14.10.tar.gz", hash = "sha256:9a2e830f075d1a42cd28420d7809ace390832a490ed0966fe373ba288e77aaf4"}, ] [[package]] @@ -645,106 +940,100 @@ files = [ {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] -[[package]] -name = "sniffio" -version = "1.3.1" -description = "Sniff out which async library your code is running under" -optional = false -python-versions = ">=3.7" -groups = ["main", "dev"] -files = [ - {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, - {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, -] - [[package]] name = "tomli" -version = "2.2.1" +version = "2.3.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version < \"3.11\"" -files = [ - {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, - {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, - {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, - {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, - {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, - {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, - {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, - {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, - {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, - {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, +markers = "python_version == \"3.10\"" +files = [ + {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"}, + {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"}, + {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"}, + {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"}, + {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"}, + {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"}, + {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"}, + {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"}, + {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"}, + {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"}, + {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"}, + {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"}, + {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"}, ] [[package]] name = "typer" -version = "0.9.4" +version = "0.20.1" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "typer-0.9.4-py3-none-any.whl", hash = "sha256:aa6c4a4e2329d868b80ecbaf16f807f2b54e192209d7ac9dd42691d63f7a54eb"}, - {file = "typer-0.9.4.tar.gz", hash = "sha256:f714c2d90afae3a7929fcd72a3abb08df305e1ff61719381384211c4070af57f"}, + {file = "typer-0.20.1-py3-none-any.whl", hash = "sha256:4b3bde918a67c8e03d861aa02deca90a95bbac572e71b1b9be56ff49affdb5a8"}, + {file = "typer-0.20.1.tar.gz", hash = "sha256:68585eb1b01203689c4199bc440d6be616f0851e9f0eb41e4a778845c5a0fd5b"}, ] [package.dependencies] -click = ">=7.1.1,<9.0.0" +click = ">=8.0.0" +rich = ">=10.11.0" +shellingham = ">=1.3.0" typing-extensions = ">=3.7.4.3" -[package.extras] -all = ["colorama (>=0.4.3,<0.5.0)", "rich (>=10.11.0,<14.0.0)", "shellingham (>=1.3.0,<2.0.0)"] -dev = ["autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "pre-commit (>=2.17.0,<3.0.0)"] -doc = ["cairosvg (>=2.5.2,<3.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pillow (>=9.3.0,<10.0.0)"] -test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.971)", "pytest (>=4.4.0,<8.0.0)", "pytest-cov (>=2.10.0,<5.0.0)", "pytest-sugar (>=0.9.4,<0.10.0)", "pytest-xdist (>=1.32.0,<4.0.0)", "rich (>=10.11.0,<14.0.0)", "shellingham (>=1.3.0,<2.0.0)"] - [[package]] name = "typing-extensions" -version = "4.14.1" +version = "4.15.0" description = "Backported and Experimental Type Hints for Python 3.9+" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76"}, - {file = "typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36"}, + {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, + {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, ] markers = {main = "python_version < \"3.13\""} [[package]] name = "typing-inspection" -version = "0.4.1" +version = "0.4.2" description = "Runtime typing introspection tools" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "typing_inspection-0.4.1-py3-none-any.whl", hash = "sha256:389055682238f53b04f7badcb49b989835495a96700ced5dab2d8feae4b26f51"}, - {file = "typing_inspection-0.4.1.tar.gz", hash = "sha256:6ae134cc0203c33377d43188d4064e9b357dba58cff3185f22924610e70a9d28"}, + {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"}, + {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"}, ] [package.dependencies] @@ -752,5 +1041,5 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" -python-versions = "^3.9" -content-hash = "e5bc43e711a1a016019e7b47d68adcd73dc57c9ae68f8901d86428f22adadbc3" +python-versions = "^3.10" +content-hash = "ebb9ca1e9685420bd2d1c82b88cde23f3aaba191d73ac5dc9c03286b43bf9c6e" diff --git a/pyproject.toml b/pyproject.toml index 9480c02..b46a3c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cirro_api_client" -version = "1.2.2" +version = "1.3.0" description = "A client library for accessing Cirro" authors = ["Cirro "] license = "MIT" @@ -10,20 +10,24 @@ keywords = ["Cirro"] include = ["cirro_api_client/py.typed"] [tool.poetry.dependencies] -python = "^3.9" -httpx = ">=0.20.0,<0.27.0" -attrs = ">=21.3.0" +python = "^3.10" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" [tool.poetry.group.dev.dependencies] pytest = ">=7.2.1" ruff = ">=0.1.14" -openapi-python-client = "0.17.3" +openapi-python-client = "0.28.0" +mypy = "1.19.1" [build-system] -requires = ["poetry-core>=1.0.0"] +requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" [tool.ruff] lint.select = ["F", "I", "UP"] line-length = 120 + +[tool.mypy] +disable_error_code = ["return", "import-untyped", "var-annotated"] diff --git a/templates/client.py.jinja b/templates/client.py.jinja index 34704d8..4e3831a 100644 --- a/templates/client.py.jinja +++ b/templates/client.py.jinja @@ -1,10 +1,35 @@ import ssl -from typing import Any, Dict, Union, Optional +from typing import Any from attrs import define, field, evolve import httpx +{% set attrs_info = { + "raise_on_unexpected_status": namespace( + type="bool", + default="field(default=False, kw_only=True)", + docstring="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": namespace(type="str", default="", docstring="The token to use for authentication"), + "prefix": namespace(type="str", default='"Bearer"', docstring="The prefix to use for the Authorization header"), + "auth_header_name": namespace(type="str", default='"Authorization"', docstring="The name of the Authorization header"), +} %} + +{% macro attr_in_class_docstring(name) %} +{{ name }}: {{ attrs_info[name].docstring }} +{%- endmacro %} + +{% macro declare_attr(name) %} +{% set attr = attrs_info[name] %} +{{ name }}: {{ attr.type }}{% if attr.default %} = {{ attr.default }}{% endif %} +{% if attr.docstring and config.docstrings_on_attributes +%} +"""{{ attr.docstring }}""" +{%- endif %} +{% endmacro %} + @define class Client: """A class for keeping track of data related to the API @@ -38,23 +63,23 @@ class Client: auth_method: Optionally provide a method used to authenticate API requests. """ {% macro attributes() %} - raise_on_unexpected_status: bool = field(default=False, kw_only=True) + {{ declare_attr("raise_on_unexpected_status") | indent(4) }} auth_method: httpx.Auth = field(default=None, kw_only=True) - _base_url: str - _cookies: Dict[str, str] = field(factory=dict, kw_only=True) - _headers: Dict[str, str] = field(factory=dict, kw_only=True) - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) - _follow_redirects: bool = field(default=False, kw_only=True) - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + _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: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: 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: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) {% endmacro %}{{ attributes() }} {% macro builders(self) %} def get_auth(self): return self.auth_method - def with_headers(self, headers: Dict[str, str]) -> "{{ self }}": + def with_headers(self, headers: dict[str, str]) -> "{{ self }}": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -62,7 +87,7 @@ class Client: self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "{{ self }}": + def with_cookies(self, cookies: dict[str, str]) -> "{{ self }}": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) @@ -80,7 +105,7 @@ class Client: {% endmacro %}{{ builders("Client") }} {% macro httpx_stuff(name, custom_constructor=None) %} def set_httpx_client(self, client: httpx.Client) -> "{{ name }}": - """Manually the underlying httpx.Client + """Manually set the underlying httpx.Client **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. """ diff --git a/templates/endpoint_macros.py.jinja b/templates/endpoint_macros.py.jinja index 9d38490..11d5ee5 100644 --- a/templates/endpoint_macros.py.jinja +++ b/templates/endpoint_macros.py.jinja @@ -3,7 +3,7 @@ {% macro header_params(endpoint) %} {% if endpoint.header_parameters or endpoint.bodies | length > 0 %} -headers: Dict[str, Any] = {} +headers: dict[str, Any] = {} {% if endpoint.header_parameters %} {% for parameter in endpoint.header_parameters.values() %} {% import "property_templates/" + parameter.template as param_template %} @@ -37,9 +37,9 @@ if {{ parameter.python_name }} is not UNSET: {% macro query_params(endpoint) %} {% if endpoint.query_parameters %} -params: Dict[str, Any] = {} +params: dict[str, Any] = {} -{% for property in endpoint.query_parameters.values() %} +{% for property in endpoint.query_parameters %} {% set destination = property.python_name %} {% import "property_templates/" + property.template as prop_template %} {% if prop_template.transform %} @@ -58,15 +58,15 @@ params = {k: v for k, v in params.items() if v is not UNSET and v is not None} {% endif %} {% endmacro %} -{% macro body_to_kwarg(body, destination) %} +{% macro body_to_kwarg(body) %} {% if body.body_type == "data" %} -{{ destination }} = body.to_dict() +_kwargs["data"] = body.to_dict() {% elif body.body_type == "files"%} -{{ multipart_body(body, destination) }} +{{ multipart_body(body) }} {% elif body.body_type == "json" %} -{{ json_body(body, destination) }} +{{ json_body(body) }} {% elif body.body_type == "content" %} -{{ destination }} = body.payload +_kwargs["content"] = body.payload {% endif %} {% endmacro %} @@ -74,7 +74,7 @@ params = {k: v for k, v in params.items() if v is not UNSET and v is not None} {% set property = body.prop %} {% import "property_templates/" + property.template as prop_template %} {% if prop_template.transform %} -{{ prop_template.transform(property, property.python_name, destination) }} +{{ prop_template.transform(property, property.python_name, "_kwargs[\"json\"]") }} {% else %} {{ destination }} = {{ property.python_name }} {% endif %} @@ -84,14 +84,14 @@ params = {k: v for k, v in params.items() if v is not UNSET and v is not None} {% set property = body.prop %} {% import "property_templates/" + property.template as prop_template %} {% if prop_template.transform_multipart %} -{{ prop_template.transform_multipart(property, property.python_name, destination) }} +{{ prop_template.transform_multipart_body(property) }} {% endif %} {% endmacro %} {# The all the kwargs passed into an endpoint (and variants thereof)) #} {% macro arguments(endpoint, include_client=True) %} {# path parameters #} -{% for parameter in endpoint.path_parameters.values() %} +{% for parameter in endpoint.path_parameters %} {{ parameter.to_string() }}, {% endfor %} {% if include_client or ((endpoint.list_all_parameters() | length) > (endpoint.path_parameters | length)) %} @@ -105,28 +105,28 @@ client: Client, {% if endpoint.bodies | length == 1 %} body: {{ endpoint.bodies[0].prop.get_type_string() }}, {% elif endpoint.bodies | length > 1 %} -body: Union[ - {% for body in endpoint.bodies %} - {{ body.prop.get_type_string() }}, - {% endfor %} -], +body: + {%- for body in endpoint.bodies -%} + {{ body.prop.get_type_string() }} {% if not loop.last %} | {% endif %} + {%- endfor -%} +, {% endif %} {# query parameters #} -{% for parameter in endpoint.query_parameters.values() %} +{% for parameter in endpoint.query_parameters %} {{ parameter.to_string() }}, {% endfor %} -{% for parameter in endpoint.header_parameters.values() %} +{% for parameter in endpoint.header_parameters %} {{ parameter.to_string() }}, {% endfor %} {# cookie parameters #} -{% for parameter in endpoint.cookie_parameters.values() %} +{% for parameter in endpoint.cookie_parameters %} {{ parameter.to_string() }}, {% endfor %} {% endmacro %} {# Just lists all kwargs to endpoints as name=name for passing to other functions #} {% macro kwargs(endpoint, include_client=True) %} -{% for parameter in endpoint.path_parameters.values() %} +{% for parameter in endpoint.path_parameters %} {{ parameter.python_name }}={{ parameter.python_name }}, {% endfor %} {% if include_client %} @@ -135,13 +135,13 @@ client=client, {% if endpoint.bodies | length > 0 %} body=body, {% endif %} -{% for parameter in endpoint.query_parameters.values() %} +{% for parameter in endpoint.query_parameters %} {{ parameter.python_name }}={{ parameter.python_name }}, {% endfor %} -{% for parameter in endpoint.header_parameters.values() %} +{% for parameter in endpoint.header_parameters %} {{ parameter.python_name }}={{ parameter.python_name }}, {% endfor %} -{% for parameter in endpoint.cookie_parameters.values() %} +{% for parameter in endpoint.cookie_parameters %} {{ parameter.python_name }}={{ parameter.python_name }}, {% endfor %} {% endmacro %} @@ -178,6 +178,22 @@ Returns: {% endif %} {% endmacro %} + {% macro docstring(endpoint, return_string, is_detailed) %} {{ safe_docstring(docstring_content(endpoint, return_string, is_detailed)) }} -{% endmacro %} \ No newline at end of file +{% endmacro %} + +{% macro parse_response(parsed_responses, response) %} +{% if parsed_responses %}{% import "property_templates/" + response.prop.template as prop_template %} +{% if prop_template.construct %} +{{ prop_template.construct(response.prop, response.source.attribute) }} +{% elif response.source.return_type == response.prop.get_type_string() %} +{{ response.prop.python_name }} = {{ response.source.attribute }} +{% else %} +{{ response.prop.python_name }} = cast({{ response.prop.get_type_string() }}, {{ response.source.attribute }}) +{% endif %} +return {{ response.prop.python_name }} +{% else %} +return None +{% endif %} +{% endmacro %} diff --git a/templates/endpoint_module.py.jinja b/templates/endpoint_module.py.jinja index 92f3480..2a45912 100644 --- a/templates/endpoint_module.py.jinja +++ b/templates/endpoint_module.py.jinja @@ -1,5 +1,6 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, cast +from urllib.parse import quote import httpx @@ -7,7 +8,7 @@ from ...client import Client from ...types import Response, UNSET from ... import errors -{% for relative in endpoint.relative_imports %} +{% for relative in endpoint.relative_imports | sort %} {{ relative }} {% endfor %} @@ -19,19 +20,19 @@ from ... import errors def _get_kwargs( {{ arguments(endpoint, include_client=False) | indent(4) }} -) -> Dict[str, Any]: +) -> dict[str, Any]: {{ header_params(endpoint) | indent(4) }} {{ cookie_params(endpoint) | indent(4) }} {{ query_params(endpoint) | indent(4) }} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "{{ endpoint.method }}", {% if endpoint.path_parameters %} "url": "{{ endpoint.path }}".format( - {%- for parameter in endpoint.path_parameters.values() -%} - {{parameter.name}}={{parameter.python_name}}, + {%- for parameter in endpoint.path_parameters -%} + {{parameter.python_name}}=quote(str({{parameter.python_name}}), safe=""), {%- endfor -%} ), {% else %} @@ -48,15 +49,12 @@ def _get_kwargs( {% if endpoint.bodies | length > 1 %} {% for body in endpoint.bodies %} if isinstance(body, {{body.prop.get_type_string() }}): - {% set destination = "_" + body.body_type + "_body" %} - {{ body_to_kwarg(body, destination) | indent(8) }} - _kwargs["{{ body.body_type.value }}"] = {{ destination }} + {{ body_to_kwarg(body) | indent(8) }} headers["Content-Type"] = "{{ body.content_type }}" {% endfor %} {% elif endpoint.bodies | length == 1 %} {% set body = endpoint.bodies[0] %} - {{ body_to_kwarg(body, "_body") | indent(4) }} - _kwargs["{{ body.body_type.value }}"] = _body + {{ body_to_kwarg(body) | indent(4) }} {% if body.content_type != "multipart/form-data" %}{# Need httpx to set the boundary automatically #} headers["Content-Type"] = "{{ body.content_type }}" {% endif %} @@ -67,25 +65,28 @@ def _get_kwargs( {% endif %} return _kwargs +{% if endpoint.responses.default %} + {% set return_type = return_string %} +{% else %} + {% set return_type = return_string + " | None" %} +{% endif %} -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[{{ return_string }}]: - {% for response in endpoint.responses %} - if response.status_code == HTTPStatus.{{ response.status_code.name }}: - {% if parsed_responses %}{% import "property_templates/" + response.prop.template as prop_template %} - {% if prop_template.construct %} - {{ prop_template.construct(response.prop, response.source.attribute) | indent(8) }} - {% elif response.source.return_type == response.prop.get_type_string() %} - {{ response.prop.python_name }} = {{ response.source.attribute }} - {% else %} - {{ response.prop.python_name }} = cast({{ response.prop.get_type_string() }}, {{ response.source.attribute }}) - {% endif %} - return {{ response.prop.python_name }} - {% else %} - return None - {% endif %} - {% endfor %} +def _parse_response(*, client: Client, response: httpx.Response) -> {{ return_type }}: + {% for response in endpoint.responses.patterns %} + {% set code_range = response.status_code.range %} + {% if code_range[0] == code_range[1] %} + if response.status_code == {{ code_range[0] }}: + {% else %} + if {{ code_range[0] }} <= response.status_code <= {{ code_range[1] }}: + {% endif %} + {{ parse_response(parsed_responses, response) | indent(8) }} + {% endfor %} + {% if endpoint.responses.default %} + {{ parse_response(parsed_responses, endpoint.responses.default) | indent(4) }} + {% else %} errors.handle_error_response(response, client.raise_on_unexpected_status) + {% endif %} def _build_response(*, client: Client, response: httpx.Response) -> Response[{{ return_string }}]: @@ -116,7 +117,7 @@ def sync_detailed( {% if parsed_responses %} def sync( {{ arguments(endpoint) | indent(4) }} -) -> Optional[{{ return_string }}]: +) -> {{ return_string }} | None: {{ docstring(endpoint, return_string, is_detailed=false) | indent(4) }} try: return sync_detailed( @@ -145,7 +146,7 @@ async def asyncio_detailed( {% if parsed_responses %} async def asyncio( {{ arguments(endpoint) | indent(4) }} -) -> Optional[{{ return_string }}]: +) -> {{ return_string }} | None: {{ docstring(endpoint, return_string, is_detailed=false) | indent(4) }} try: diff --git a/templates/model.py.jinja b/templates/model.py.jinja index ac1bd2d..5b7165a 100644 --- a/templates/model.py.jinja +++ b/templates/model.py.jinja @@ -1,19 +1,18 @@ -from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING +from __future__ import annotations -{% if model.additional_properties %} -from typing import List - -{% endif %} +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field {% if model.is_multipart_body %} import json +from .. import types {% endif %} from ..types import UNSET, Unset -{% for relative in model.relative_imports %} +{% for relative in model.relative_imports | sort %} {{ relative }} {% endfor %} @@ -26,7 +25,8 @@ if TYPE_CHECKING: {% if model.additional_properties %} -{% set additional_property_type = 'Any' if model.additional_properties == True else model.additional_properties.get_type_string(quoted=not model.additional_properties.is_base_type) %} +{% set additional_property_type = 'Any' if model.additional_properties == True else +model.additional_properties.get_type_string() %} {% endif %} {% set class_name = model.class_info.name %} @@ -52,63 +52,81 @@ T = TypeVar("T", bound="{{ class_name }}") {{ model.example | string | wordwrap(112) | indent(12) }} {% endif %} - {% if model.required_properties or model.optional_properties %} + {% if (not config.docstrings_on_attributes) and (model.required_properties or model.optional_properties) %} Attributes: {% for property in model.required_properties + model.optional_properties %} {{ property.to_docstring() | wordwrap(112) | indent(12) }} {% endfor %}{% endif %} {% endmacro %} +{% macro declare_property(property) %} +{%- if config.docstrings_on_attributes and property.description -%} +{{ property.to_string() }} +{{ safe_docstring(property.description, omit_if_empty=True) | wordwrap(112) }} +{%- else -%} +{{ property.to_string() }} +{%- endif -%} +{% endmacro %} + @_attrs_define class {{ class_name }}: - {{ safe_docstring(class_docstring_content(model)) | indent(4) }} + {{ safe_docstring(class_docstring_content(model), +omit_if_empty=config.docstrings_on_attributes) | indent(4) }} {% for property in model.required_properties + model.optional_properties %} {% if property.default is none and property.required %} - {{ property.to_string() }} + {{ declare_property(property) | indent(4) }} {% endif %} {% endfor %} {% for property in model.required_properties + model.optional_properties %} {% if property.default is not none or not property.required %} - {{ property.to_string() }} + {{ declare_property(property) | indent(4) }} {% endif %} {% endfor %} {% if model.additional_properties %} - additional_properties: Dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict) {% endif %} -{% macro _to_dict(multipart=False) %} -{% for property in model.required_properties + model.optional_properties %} +{% macro _transform_property(property, content) %} {% import "property_templates/" + property.template as prop_template %} -{% if prop_template.transform %} -{{ prop_template.transform(property, "self." + property.python_name, property.python_name, multipart=multipart) }} -{% elif multipart %} -{{ property.python_name }} = self.{{ property.python_name }} if isinstance(self.{{ property.python_name }}, Unset) else (None, str(self.{{ property.python_name }}).encode(), "text/plain") +{%- if prop_template.transform -%} +{{ prop_template.transform(property=property, source=content, destination=property.python_name) }} +{%- else -%} +{{ property.python_name }} = {{ content }} +{%- endif -%} +{% endmacro %} + +{% macro multipart(property, source, destination) %} +{% import "property_templates/" + property.template as prop_template %} +{% if not property.required %} +if not isinstance({{source}}, Unset): + {{ prop_template.multipart(property, source, destination) | indent(4) }} {% else %} -{{ property.python_name }} = self.{{ property.python_name }} +{{ prop_template.multipart(property, source, destination) }} {% endif %} +{% endmacro %} -{% endfor %} - -field_dict: Dict[str, Any] = {} +{% macro _prepare_field_dict() %} +field_dict: dict[str, Any] = {} {% if model.additional_properties %} -{% if model.additional_properties.template %}{# Can be a bool instead of an object #} - {% import "property_templates/" + model.additional_properties.template as prop_template %} -{% else %} - {% set prop_template = None %} -{% endif %} -{% if prop_template and prop_template.transform %} +{% import "property_templates/" + model.additional_properties.template as prop_template %} +{% if prop_template.transform %} for prop_name, prop in self.additional_properties.items(): - {{ prop_template.transform(model.additional_properties, "prop", "field_dict[prop_name]", multipart=multipart, declare_type=false) | indent(4) }} -{% elif multipart %} -field_dict.update({ - key: (None, str(value).encode(), "text/plain") - for key, value in self.additional_properties.items() -}) + {{ prop_template.transform(model.additional_properties, "prop", "field_dict[prop_name]", declare_type=false) | indent(4) }} {% else %} field_dict.update(self.additional_properties) -{% endif %} -{% endif %} +{%- endif -%} +{%- endif -%} +{% endmacro %} + +{% macro _to_dict() %} +{% for property in model.required_properties + model.optional_properties -%} +{{ _transform_property(property, "self." + property.python_name) }} + +{% endfor %} + +{{ _prepare_field_dict() }} +{% if model.required_properties | length > 0 or model.optional_properties | length > 0 %} field_dict.update({ {% for property in model.required_properties + model.optional_properties %} {% if property.required %} @@ -116,6 +134,7 @@ field_dict.update({ {% endif %} {% endfor %} }) +{% endif %} {% for property in model.optional_properties %} {% if not property.required %} if {{ property.python_name }} is not UNSET: @@ -126,23 +145,38 @@ if {{ property.python_name }} is not UNSET: return field_dict {% endmacro %} - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: {% for lazy_import in model.lazy_imports %} {{ lazy_import }} {% endfor %} {{ _to_dict() | indent(8) }} {% if model.is_multipart_body %} - def to_multipart(self) -> Dict[str, Any]: - {{ _to_dict(multipart=True) | indent(8) }} + def to_multipart(self) -> types.RequestFiles: + files: types.RequestFiles = [] + + {% for property in model.required_properties + model.optional_properties %} + {% set destination = "\"" + property.name + "\"" %} + {{ multipart(property, "self." + property.python_name, destination) | indent(8) }} + + {% endfor %} + + {% if model.additional_properties %} + for prop_name, prop in self.additional_properties.items(): + {{ multipart(model.additional_properties, "prop", "prop_name") | indent(4) }} + {% endif %} + + return files + {% endif %} @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: {% for lazy_import in model.lazy_imports %} {{ lazy_import }} {% endfor %} - d = src_dict.copy() + {% if (model.required_properties or model.optional_properties or model.additional_properties) %} + d = dict(src_dict) {% for property in model.required_properties + model.optional_properties %} {% if property.required %} {% set property_source = 'd.pop("' + property.name + '")' %} @@ -157,6 +191,7 @@ return field_dict {% endif %} {% endfor %} +{% endif %} {{ module_name }} = cls( {% for property in model.required_properties + model.optional_properties %} {{ property.python_name }}={{ property.python_name }}, @@ -190,6 +225,18 @@ return field_dict {% if model.additional_properties %} @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - {% endif %} \ No newline at end of file + + def __getitem__(self, key: str) -> {{ additional_property_type }}: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: {{ additional_property_type }}) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + {% endif %} diff --git a/templates/str_enum.py.jinja b/templates/str_enum.py.jinja index 5055bb5..2339d8c 100644 --- a/templates/str_enum.py.jinja +++ b/templates/str_enum.py.jinja @@ -4,8 +4,10 @@ class {{ enum.class_info.name }}(str, Enum): {% for key, value in enum.values|dictsort(true) %} {{ key }} = "{{ value }}" {% endfor %} + {% if "UNKNOWN" not in enum.values %} UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ + {% endif %} def __str__(self) -> str: return str(self.value) diff --git a/tests/test_client.py b/tests/test_client.py index 6ac5998..6261312 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -32,7 +32,16 @@ def test_import_models(self): def test_import_api_methods(self): from cirro_api_client.v1.api.users import list_users - mock_client = _generate_mock_client({'data': [Mock()], 'nextToken': None}) + mock_client = _generate_mock_client({ + 'data': [{ + 'name': 'Test User', + 'username': 'testuser', + 'organization': 'test-org', + 'department': 'test-dept', + 'jobTitle': 'test-title' + }], + 'nextToken': None + }) response = list_users.sync(client=mock_client, limit=1) self.assertIsNotNone(response)