Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def _get_kwargs(
def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, Board]]:
if response.status_code == HTTPStatus.CREATED:
if response.status_code == 201:
response_201 = Board.from_dict(response.json())

return response_201
if response.status_code == HTTPStatus.CONFLICT:
if response.status_code == 409:
response_409 = cast(Any, None)
return response_409
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
if response.status_code == 422:
response_422 = cast(Any, None)
return response_422
if client.raise_on_unexpected_status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from http import HTTPStatus
from typing import Any, Dict, Optional, Union, cast
from uuid import UUID

import httpx

Expand All @@ -10,7 +11,7 @@


def _get_kwargs(
id: str,
id: UUID,
) -> Dict[str, Any]:
_kwargs: Dict[str, Any] = {
"method": "get",
Expand All @@ -23,11 +24,11 @@ def _get_kwargs(
def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, Board]]:
if response.status_code == HTTPStatus.OK:
if response.status_code == 200:
response_200 = Board.from_dict(response.json())

return response_200
if response.status_code == HTTPStatus.NOT_FOUND:
if response.status_code == 404:
response_404 = cast(Any, None)
return response_404
if client.raise_on_unexpected_status:
Expand All @@ -48,14 +49,14 @@ def _build_response(


def sync_detailed(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
) -> Response[Union[Any, Board]]:
"""Get a board by ID

Args:
id (str):
id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -77,14 +78,14 @@ def sync_detailed(


def sync(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[Union[Any, Board]]:
"""Get a board by ID

Args:
id (str):
id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -101,14 +102,14 @@ def sync(


async def asyncio_detailed(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
) -> Response[Union[Any, Board]]:
"""Get a board by ID

Args:
id (str):
id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -128,14 +129,14 @@ async def asyncio_detailed(


async def asyncio(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[Union[Any, Board]]:
"""Get a board by ID

Args:
id (str):
id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Union
from uuid import UUID

import httpx

Expand All @@ -11,11 +12,12 @@

def _get_kwargs(
*,
organisation_id: str,
organisation_id: UUID,
) -> Dict[str, Any]:
params: Dict[str, Any] = {}

params["organisationId"] = organisation_id
json_organisation_id = str(organisation_id)
params["organisationId"] = json_organisation_id

params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

Expand All @@ -29,7 +31,7 @@ def _get_kwargs(


def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List["Board"]]:
if response.status_code == HTTPStatus.OK:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
Expand All @@ -56,12 +58,12 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
def sync_detailed(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: str,
organisation_id: UUID,
) -> Response[List["Board"]]:
"""Get all boards in an organisation

Args:
organisation_id (str):
organisation_id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -85,12 +87,12 @@ def sync_detailed(
def sync(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: str,
organisation_id: UUID,
) -> Optional[List["Board"]]:
"""Get all boards in an organisation

Args:
organisation_id (str):
organisation_id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -109,12 +111,12 @@ def sync(
async def asyncio_detailed(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: str,
organisation_id: UUID,
) -> Response[List["Board"]]:
"""Get all boards in an organisation

Args:
organisation_id (str):
organisation_id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -136,12 +138,12 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: str,
organisation_id: UUID,
) -> Optional[List["Board"]]:
"""Get all boards in an organisation

Args:
organisation_id (str):
organisation_id (UUID):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Union, cast
from uuid import UUID

import httpx

Expand All @@ -10,7 +11,7 @@


def _get_kwargs(
id: str,
id: UUID,
*,
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
Expand All @@ -35,7 +36,7 @@ def _get_kwargs(
def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, List["Device"]]]:
if response.status_code == HTTPStatus.OK:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
Expand All @@ -44,7 +45,7 @@ def _parse_response(
response_200.append(response_200_item)

return response_200
if response.status_code == HTTPStatus.NOT_FOUND:
if response.status_code == 404:
response_404 = cast(Any, None)
return response_404
if client.raise_on_unexpected_status:
Expand All @@ -65,7 +66,7 @@ def _build_response(


def sync_detailed(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
Expand All @@ -74,7 +75,7 @@ def sync_detailed(
"""Get devices by board id and optional metadata field

Args:
id (str):
id (UUID):
metadata_name (Union[Unset, str]):
metadata_value (Union[Unset, str]):

Expand All @@ -100,7 +101,7 @@ def sync_detailed(


def sync(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
Expand All @@ -109,7 +110,7 @@ def sync(
"""Get devices by board id and optional metadata field

Args:
id (str):
id (UUID):
metadata_name (Union[Unset, str]):
metadata_value (Union[Unset, str]):

Expand All @@ -130,7 +131,7 @@ def sync(


async def asyncio_detailed(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
Expand All @@ -139,7 +140,7 @@ async def asyncio_detailed(
"""Get devices by board id and optional metadata field

Args:
id (str):
id (UUID):
metadata_name (Union[Unset, str]):
metadata_value (Union[Unset, str]):

Expand All @@ -163,7 +164,7 @@ async def asyncio_detailed(


async def asyncio(
id: str,
id: UUID,
*,
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
Expand All @@ -172,7 +173,7 @@ async def asyncio(
"""Get devices by board id and optional metadata field

Args:
id (str):
id (UUID):
metadata_name (Union[Unset, str]):
metadata_value (Union[Unset, str]):

Expand Down
2 changes: 1 addition & 1 deletion src/infuse_iot/api_client/api/default/get_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _get_kwargs() -> Dict[str, Any]:


def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[HealthCheck]:
if response.status_code == HTTPStatus.OK:
if response.status_code == 200:
response_200 = HealthCheck.from_dict(response.json())

return response_200
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def _get_kwargs(
def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, Device]]:
if response.status_code == HTTPStatus.CREATED:
if response.status_code == 201:
response_201 = Device.from_dict(response.json())

return response_201
if response.status_code == HTTPStatus.CONFLICT:
if response.status_code == 409:
response_409 = cast(Any, None)
return response_409
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
if response.status_code == 422:
response_422 = cast(Any, None)
return response_422
if client.raise_on_unexpected_status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def _get_kwargs(
def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, Device]]:
if response.status_code == HTTPStatus.OK:
if response.status_code == 200:
response_200 = Device.from_dict(response.json())

return response_200
if response.status_code == HTTPStatus.NOT_FOUND:
if response.status_code == 404:
response_404 = cast(Any, None)
return response_404
if client.raise_on_unexpected_status:
Expand Down
Loading
Loading