regenerate ory-hydra-client

This commit is contained in:
TuxCoder 2023-01-13 15:52:38 +01:00
parent 1947a6f24a
commit cba6cb75e5
93 changed files with 3705 additions and 1430 deletions

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.accept_consent_request import AcceptConsentRequest from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.completed_request import CompletedRequest from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from ...models.accept_consent_request import AcceptConsentRequest
def _get_kwargs( def _get_kwargs(
@ -14,19 +18,32 @@ def _get_kwargs(
_client: Client, _client: Client,
json_body: AcceptConsentRequest, json_body: AcceptConsentRequest,
consent_challenge: str, consent_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent/accept".format(_client.base_url) url = "{}/oauth2/auth/requests/consent/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -39,17 +56,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json()) response_200 = CompletedRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -68,6 +91,7 @@ def sync_detailed(
_client: Client, _client: Client,
json_body: AcceptConsentRequest, json_body: AcceptConsentRequest,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request """Accept a Consent Request
@ -105,10 +129,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
response = httpx.request( response = httpx.request(
@ -118,12 +144,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: AcceptConsentRequest, json_body: AcceptConsentRequest,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request """Accept a Consent Request
@ -161,18 +187,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: AcceptConsentRequest, json_body: AcceptConsentRequest,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request """Accept a Consent Request
@ -210,23 +238,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: AcceptConsentRequest, json_body: AcceptConsentRequest,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request """Accept a Consent Request
@ -264,10 +296,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
)
).parsed )).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.accept_login_request import AcceptLoginRequest from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.completed_request import CompletedRequest from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from ...models.accept_login_request import AcceptLoginRequest
def _get_kwargs( def _get_kwargs(
@ -14,19 +18,32 @@ def _get_kwargs(
_client: Client, _client: Client,
json_body: AcceptLoginRequest, json_body: AcceptLoginRequest,
login_challenge: str, login_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login/accept".format(_client.base_url) url = "{}/oauth2/auth/requests/login/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -39,25 +56,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json()) response_200 = CompletedRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -76,6 +103,7 @@ def sync_detailed(
_client: Client, _client: Client,
json_body: AcceptLoginRequest, json_body: AcceptLoginRequest,
login_challenge: str, login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request """Accept a Login Request
@ -108,10 +136,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
response = httpx.request( response = httpx.request(
@ -121,12 +151,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: AcceptLoginRequest, json_body: AcceptLoginRequest,
login_challenge: str, login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request """Accept a Login Request
@ -159,18 +189,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: AcceptLoginRequest, json_body: AcceptLoginRequest,
login_challenge: str, login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request """Accept a Login Request
@ -203,23 +235,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: AcceptLoginRequest, json_body: AcceptLoginRequest,
login_challenge: str, login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request """Accept a Login Request
@ -252,10 +288,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
)
).parsed )).parsed

View file

@ -1,28 +1,45 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.completed_request import CompletedRequest from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from typing import cast
from ...models.completed_request import CompletedRequest
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout/accept".format(_client.base_url) url = "{}/oauth2/auth/requests/logout/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -34,17 +51,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json()) response_200 = CompletedRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -62,6 +85,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request """Accept a Logout Request
@ -78,9 +102,11 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
response = httpx.request( response = httpx.request(
@ -90,11 +116,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request """Accept a Logout Request
@ -111,16 +137,18 @@ def sync(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request """Accept a Logout Request
@ -137,21 +165,25 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request """Accept a Logout Request
@ -168,9 +200,10 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
)
).parsed )).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet from ...models.json_web_key_set import JSONWebKeySet
from ...models.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest from ...models.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest
from ...types import Response
def _get_kwargs( def _get_kwargs(
@ -14,14 +18,26 @@ def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: JsonWebKeySetGeneratorRequest, json_body: JsonWebKeySetGeneratorRequest,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_) url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -33,21 +49,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 201: if response.status_code == HTTPStatus.CREATED:
response_201 = JSONWebKeySet.from_dict(response.json()) response_201 = JSONWebKeySet.from_dict(response.json())
return response_201 return response_201
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -66,6 +90,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: JsonWebKeySetGeneratorRequest, json_body: JsonWebKeySetGeneratorRequest,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key """Generate a New JSON Web Key
@ -87,10 +112,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -100,12 +127,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JsonWebKeySetGeneratorRequest, json_body: JsonWebKeySetGeneratorRequest,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key """Generate a New JSON Web Key
@ -127,18 +154,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JsonWebKeySetGeneratorRequest, json_body: JsonWebKeySetGeneratorRequest,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key """Generate a New JSON Web Key
@ -160,23 +189,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JsonWebKeySetGeneratorRequest, json_body: JsonWebKeySetGeneratorRequest,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key """Generate a New JSON Web Key
@ -198,10 +231,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,25 +1,41 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client from ...models.o_auth_2_client import OAuth2Client
from ...types import Response from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/clients".format(_client.base_url) url = "{}/clients".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -31,21 +47,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 201: if response.status_code == HTTPStatus.CREATED:
response_201 = OAuth2Client.from_dict(response.json()) response_201 = OAuth2Client.from_dict(response.json())
return response_201 return response_201
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 409: if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json()) response_409 = GenericError.from_dict(response.json())
return response_409 return response_409
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -63,6 +87,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client """Create an OAuth 2.0 Client
@ -82,9 +107,11 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -94,11 +121,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client """Create an OAuth 2.0 Client
@ -118,16 +145,18 @@ def sync(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client """Create an OAuth 2.0 Client
@ -147,21 +176,25 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client """Create an OAuth 2.0 Client
@ -181,9 +214,10 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,10 +1,14 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
@ -12,12 +16,24 @@ def _get_kwargs(
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid) url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -28,20 +44,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -60,6 +82,7 @@ def sync_detailed(
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key """Delete a JSON Web Key
@ -79,10 +102,12 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -92,12 +117,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key """Delete a JSON Web Key
@ -117,18 +142,20 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key """Delete a JSON Web Key
@ -148,23 +175,27 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key """Delete a JSON Web Key
@ -184,10 +215,11 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_) url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -27,20 +43,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -58,6 +80,7 @@ def sync_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set """Delete a JSON Web Key Set
@ -76,9 +99,11 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -88,11 +113,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set """Delete a JSON Web Key Set
@ -111,16 +136,18 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set """Delete a JSON Web Key Set
@ -139,21 +166,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set """Delete a JSON Web Key Set
@ -172,9 +203,10 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id) url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -27,16 +43,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -54,6 +74,7 @@ def sync_detailed(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client """Deletes an OAuth 2.0 Client
@ -71,9 +92,11 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -83,11 +106,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client """Deletes an OAuth 2.0 Client
@ -105,16 +128,18 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
id=id, id=id,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client """Deletes an OAuth 2.0 Client
@ -132,21 +157,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client """Deletes an OAuth 2.0 Client
@ -164,9 +193,10 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
id=id, id=id,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,27 +1,44 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
client_id: str, client_id: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/tokens".format(_client.base_url) url = "{}/oauth2/tokens".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["client_id"] = client_id params["client_id"] = client_id
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -33,16 +50,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -60,6 +81,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
client_id: str, client_id: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client """Delete OAuth2 Access Tokens from a Client
@ -72,9 +94,11 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
client_id=client_id, client_id=client_id,
) )
response = httpx.request( response = httpx.request(
@ -84,11 +108,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
client_id: str, client_id: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client """Delete OAuth2 Access Tokens from a Client
@ -101,16 +125,18 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
client_id=client_id, client_id=client_id,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
client_id: str, client_id: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client """Delete OAuth2 Access Tokens from a Client
@ -123,21 +149,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
client_id=client_id, client_id=client_id,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
client_id: str, client_id: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client """Delete OAuth2 Access Tokens from a Client
@ -150,9 +180,10 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
client_id=client_id, client_id=client_id,
)
).parsed )).parsed

View file

@ -1,25 +1,41 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.flush_inactive_o_auth_2_tokens_request import FlushInactiveOAuth2TokensRequest from ...models.flush_inactive_o_auth_2_tokens_request import FlushInactiveOAuth2TokensRequest
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: FlushInactiveOAuth2TokensRequest, json_body: FlushInactiveOAuth2TokensRequest,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/flush".format(_client.base_url) url = "{}/oauth2/flush".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -31,16 +47,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -58,6 +78,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: FlushInactiveOAuth2TokensRequest, json_body: FlushInactiveOAuth2TokensRequest,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens """Flush Expired OAuth2 Access Tokens
@ -74,9 +95,11 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -86,11 +109,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: FlushInactiveOAuth2TokensRequest, json_body: FlushInactiveOAuth2TokensRequest,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens """Flush Expired OAuth2 Access Tokens
@ -107,16 +130,18 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: FlushInactiveOAuth2TokensRequest, json_body: FlushInactiveOAuth2TokensRequest,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens """Flush Expired OAuth2 Access Tokens
@ -133,21 +158,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: FlushInactiveOAuth2TokensRequest, json_body: FlushInactiveOAuth2TokensRequest,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens """Flush Expired OAuth2 Access Tokens
@ -164,9 +193,10 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,28 +1,45 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.consent_request import ConsentRequest from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from ...models.consent_request import ConsentRequest
from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
consent_challenge: str, consent_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent".format(_client.base_url) url = "{}/oauth2/auth/requests/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -34,21 +51,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[ConsentRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[ConsentRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = ConsentRequest.from_dict(response.json()) response_200 = ConsentRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 409: if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json()) response_409 = GenericError.from_dict(response.json())
return response_409 return response_409
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -66,6 +91,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[ConsentRequest, GenericError]]: ) -> Response[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information """Get Consent Request Information
@ -94,9 +120,11 @@ def sync_detailed(
Response[Union[ConsentRequest, GenericError]] Response[Union[ConsentRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
response = httpx.request( response = httpx.request(
@ -106,11 +134,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[ConsentRequest, GenericError]]: ) -> Optional[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information """Get Consent Request Information
@ -139,16 +167,18 @@ def sync(
Response[Union[ConsentRequest, GenericError]] Response[Union[ConsentRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[ConsentRequest, GenericError]]: ) -> Response[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information """Get Consent Request Information
@ -177,21 +207,25 @@ async def asyncio_detailed(
Response[Union[ConsentRequest, GenericError]] Response[Union[ConsentRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[ConsentRequest, GenericError]]: ) -> Optional[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information """Get Consent Request Information
@ -220,9 +254,10 @@ async def asyncio(
Response[Union[ConsentRequest, GenericError]] Response[Union[ConsentRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
)
).parsed )).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
@ -13,12 +17,24 @@ def _get_kwargs(
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid) url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -29,17 +45,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json()) response_200 = JSONWebKeySet.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -58,6 +80,7 @@ def sync_detailed(
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key """Fetch a JSON Web Key
@ -71,10 +94,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -84,12 +109,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key """Fetch a JSON Web Key
@ -103,18 +128,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key """Fetch a JSON Web Key
@ -128,23 +155,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key """Fetch a JSON Web Key
@ -158,10 +189,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,23 +1,39 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_) url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -28,21 +44,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json()) response_200 = JSONWebKeySet.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -60,6 +84,7 @@ def sync_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set """Retrieve a JSON Web Key Set
@ -78,9 +103,11 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -90,11 +117,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set """Retrieve a JSON Web Key Set
@ -113,16 +140,18 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set """Retrieve a JSON Web Key Set
@ -141,21 +170,25 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set """Retrieve a JSON Web Key Set
@ -174,9 +207,10 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,28 +1,45 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.generic_error import GenericError from ...types import Response, UNSET
from ...models.login_request import LoginRequest from ...models.login_request import LoginRequest
from ...types import UNSET, Response from ...models.generic_error import GenericError
from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
login_challenge: str, login_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login".format(_client.base_url) url = "{}/oauth2/auth/requests/login".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -34,25 +51,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LoginRequest]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LoginRequest]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = LoginRequest.from_dict(response.json()) response_200 = LoginRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 409: if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json()) response_409 = GenericError.from_dict(response.json())
return response_409 return response_409
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -70,6 +97,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
login_challenge: str, login_challenge: str,
) -> Response[Union[GenericError, LoginRequest]]: ) -> Response[Union[GenericError, LoginRequest]]:
"""Get a Login Request """Get a Login Request
@ -93,9 +121,11 @@ def sync_detailed(
Response[Union[GenericError, LoginRequest]] Response[Union[GenericError, LoginRequest]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
response = httpx.request( response = httpx.request(
@ -105,11 +135,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
login_challenge: str, login_challenge: str,
) -> Optional[Union[GenericError, LoginRequest]]: ) -> Optional[Union[GenericError, LoginRequest]]:
"""Get a Login Request """Get a Login Request
@ -133,16 +163,18 @@ def sync(
Response[Union[GenericError, LoginRequest]] Response[Union[GenericError, LoginRequest]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
login_challenge=login_challenge, login_challenge=login_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
login_challenge: str, login_challenge: str,
) -> Response[Union[GenericError, LoginRequest]]: ) -> Response[Union[GenericError, LoginRequest]]:
"""Get a Login Request """Get a Login Request
@ -166,21 +198,25 @@ async def asyncio_detailed(
Response[Union[GenericError, LoginRequest]] Response[Union[GenericError, LoginRequest]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
login_challenge: str, login_challenge: str,
) -> Optional[Union[GenericError, LoginRequest]]: ) -> Optional[Union[GenericError, LoginRequest]]:
"""Get a Login Request """Get a Login Request
@ -204,9 +240,10 @@ async def asyncio(
Response[Union[GenericError, LoginRequest]] Response[Union[GenericError, LoginRequest]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
login_challenge=login_challenge, login_challenge=login_challenge,
)
).parsed )).parsed

View file

@ -1,28 +1,45 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.logout_request import LogoutRequest from ...models.logout_request import LogoutRequest
from ...types import UNSET, Response from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout".format(_client.base_url) url = "{}/oauth2/auth/requests/logout".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -34,17 +51,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LogoutRequest]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LogoutRequest]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = LogoutRequest.from_dict(response.json()) response_200 = LogoutRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -62,6 +85,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[GenericError, LogoutRequest]]: ) -> Response[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request """Get a Logout Request
@ -74,9 +98,11 @@ def sync_detailed(
Response[Union[GenericError, LogoutRequest]] Response[Union[GenericError, LogoutRequest]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
response = httpx.request( response = httpx.request(
@ -86,11 +112,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[GenericError, LogoutRequest]]: ) -> Optional[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request """Get a Logout Request
@ -103,16 +129,18 @@ def sync(
Response[Union[GenericError, LogoutRequest]] Response[Union[GenericError, LogoutRequest]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[GenericError, LogoutRequest]]: ) -> Response[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request """Get a Logout Request
@ -125,21 +153,25 @@ async def asyncio_detailed(
Response[Union[GenericError, LogoutRequest]] Response[Union[GenericError, LogoutRequest]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[GenericError, LogoutRequest]]: ) -> Optional[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request """Get a Logout Request
@ -152,9 +184,10 @@ async def asyncio(
Response[Union[GenericError, LogoutRequest]] Response[Union[GenericError, LogoutRequest]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
)
).parsed )).parsed

View file

@ -1,23 +1,39 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client from ...models.o_auth_2_client import OAuth2Client
from ...types import Response from typing import Dict
def _get_kwargs( def _get_kwargs(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id) url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -28,17 +44,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = OAuth2Client.from_dict(response.json()) response_200 = OAuth2Client.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -56,6 +78,7 @@ def sync_detailed(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client. """Get an OAuth 2.0 Client.
@ -73,9 +96,11 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -85,11 +110,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client. """Get an OAuth 2.0 Client.
@ -107,16 +132,18 @@ def sync(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return sync_detailed( return sync_detailed(
id=id, id=id,
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client. """Get an OAuth 2.0 Client.
@ -134,21 +161,25 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
id: str, id: str,
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client. """Get an OAuth 2.0 Client.
@ -166,9 +197,10 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
id=id, id=id,
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,21 +1,37 @@
from typing import Any, Dict, Optional from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.version import Version from ...models.version import Version
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/version".format(_client.base_url) url = "{}/version".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -26,9 +42,11 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Version]: def _parse_response(*, response: httpx.Response) -> Optional[Version]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = Version.from_dict(response.json()) response_200 = Version.from_dict(response.json())
return response_200 return response_200
return None return None
@ -45,6 +63,7 @@ def _build_response(*, response: httpx.Response) -> Response[Version]:
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Version]: ) -> Response[Version]:
"""Get Service Version """Get Service Version
@ -57,8 +76,10 @@ def sync_detailed(
Response[Version] Response[Version]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -68,10 +89,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Version]: ) -> Optional[Version]:
"""Get Service Version """Get Service Version
@ -84,14 +105,16 @@ def sync(
Response[Version] Response[Version]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Version]: ) -> Response[Version]:
"""Get Service Version """Get Service Version
@ -104,19 +127,23 @@ async def asyncio_detailed(
Response[Version] Response[Version]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Version]: ) -> Optional[Version]:
"""Get Service Version """Get Service Version
@ -129,8 +156,9 @@ async def asyncio(
Response[Version] Response[Version]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,39 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.generic_error import GenericError from ...types import Response, UNSET
from ...models.introspect_o_auth_2_token_data import IntrospectOAuth2TokenData
from ...models.o_auth_2_token_introspection import OAuth2TokenIntrospection from ...models.o_auth_2_token_introspection import OAuth2TokenIntrospection
from ...types import Response from typing import Dict
from typing import cast
from ...models.generic_error import GenericError
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/introspect".format(_client.base_url) url = "{}/oauth2/introspect".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -27,17 +44,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = OAuth2TokenIntrospection.from_dict(response.json()) response_200 = OAuth2TokenIntrospection.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -54,6 +77,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]: ) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens """Introspect OAuth2 Tokens
@ -70,8 +94,10 @@ def sync_detailed(
Response[Union[GenericError, OAuth2TokenIntrospection]] Response[Union[GenericError, OAuth2TokenIntrospection]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -81,10 +107,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]: ) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens """Introspect OAuth2 Tokens
@ -101,14 +127,16 @@ def sync(
Response[Union[GenericError, OAuth2TokenIntrospection]] Response[Union[GenericError, OAuth2TokenIntrospection]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]: ) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens """Introspect OAuth2 Tokens
@ -125,19 +153,23 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2TokenIntrospection]] Response[Union[GenericError, OAuth2TokenIntrospection]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]: ) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens """Introspect OAuth2 Tokens
@ -154,8 +186,9 @@ async def asyncio(
Response[Union[GenericError, OAuth2TokenIntrospection]] Response[Union[GenericError, OAuth2TokenIntrospection]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.health_status import HealthStatus from ...models.health_status import HealthStatus
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/health/alive".format(_client.base_url) url = "{}/health/alive".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, HealthStatus]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, HealthStatus]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = HealthStatus.from_dict(response.json()) response_200 = HealthStatus.from_dict(response.json())
return response_200 return response_200
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, HealthStatus]]: ) -> Response[Union[GenericError, HealthStatus]]:
"""Check Alive Status """Check Alive Status
@ -66,8 +87,10 @@ def sync_detailed(
Response[Union[GenericError, HealthStatus]] Response[Union[GenericError, HealthStatus]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -77,10 +100,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, HealthStatus]]: ) -> Optional[Union[GenericError, HealthStatus]]:
"""Check Alive Status """Check Alive Status
@ -97,14 +120,16 @@ def sync(
Response[Union[GenericError, HealthStatus]] Response[Union[GenericError, HealthStatus]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, HealthStatus]]: ) -> Response[Union[GenericError, HealthStatus]]:
"""Check Alive Status """Check Alive Status
@ -121,19 +146,23 @@ async def asyncio_detailed(
Response[Union[GenericError, HealthStatus]] Response[Union[GenericError, HealthStatus]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, HealthStatus]]: ) -> Optional[Union[GenericError, HealthStatus]]:
"""Check Alive Status """Check Alive Status
@ -150,8 +179,9 @@ async def asyncio(
Response[Union[GenericError, HealthStatus]] Response[Union[GenericError, HealthStatus]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,11 +1,19 @@
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import Union
from typing import cast
from ...types import UNSET, Unset
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast, List
from ...models.o_auth_2_client import OAuth2Client from ...models.o_auth_2_client import OAuth2Client
from ...types import UNSET, Response, Unset from typing import Optional
def _get_kwargs( def _get_kwargs(
@ -13,19 +21,33 @@ def _get_kwargs(
_client: Client, _client: Client,
limit: Union[Unset, None, int] = UNSET, limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/clients".format(_client.base_url) url = "{}/clients".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["limit"] = limit params["limit"] = limit
params["offset"] = offset params["offset"] = offset
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -36,24 +58,28 @@ def _get_kwargs(
} }
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List[OAuth2Client]]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List['OAuth2Client']]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = [] response_200 = []
_response_200 = response.json() _response_200 = response.json()
for response_200_item_data in _response_200: for response_200_item_data in (_response_200):
response_200_item = OAuth2Client.from_dict(response_200_item_data) response_200_item = OAuth2Client.from_dict(response_200_item_data)
response_200.append(response_200_item) response_200.append(response_200_item)
return response_200 return response_200
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List[OAuth2Client]]]: def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List['OAuth2Client']]]:
return Response( return Response(
status_code=response.status_code, status_code=response.status_code,
content=response.content, content=response.content,
@ -67,7 +93,8 @@ def sync_detailed(
_client: Client, _client: Client,
limit: Union[Unset, None, int] = UNSET, limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET,
) -> Response[Union[GenericError, List[OAuth2Client]]]:
) -> Response[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients """List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -89,13 +116,15 @@ def sync_detailed(
offset (Union[Unset, None, int]): offset (Union[Unset, None, int]):
Returns: Returns:
Response[Union[GenericError, List[OAuth2Client]]] Response[Union[GenericError, List['OAuth2Client']]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
limit=limit, limit=limit,
offset=offset, offset=offset,
) )
response = httpx.request( response = httpx.request(
@ -105,13 +134,13 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
limit: Union[Unset, None, int] = UNSET, limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET,
) -> Optional[Union[GenericError, List[OAuth2Client]]]:
) -> Optional[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients """List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -133,22 +162,24 @@ def sync(
offset (Union[Unset, None, int]): offset (Union[Unset, None, int]):
Returns: Returns:
Response[Union[GenericError, List[OAuth2Client]]] Response[Union[GenericError, List['OAuth2Client']]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
limit=limit, limit=limit,
offset=offset, offset=offset,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
limit: Union[Unset, None, int] = UNSET, limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET,
) -> Response[Union[GenericError, List[OAuth2Client]]]:
) -> Response[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients """List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -170,27 +201,31 @@ async def asyncio_detailed(
offset (Union[Unset, None, int]): offset (Union[Unset, None, int]):
Returns: Returns:
Response[Union[GenericError, List[OAuth2Client]]] Response[Union[GenericError, List['OAuth2Client']]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
limit=limit, limit=limit,
offset=offset, offset=offset,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
limit: Union[Unset, None, int] = UNSET, limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET,
) -> Optional[Union[GenericError, List[OAuth2Client]]]:
) -> Optional[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients """List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -212,13 +247,14 @@ async def asyncio(
offset (Union[Unset, None, int]): offset (Union[Unset, None, int]):
Returns: Returns:
Response[Union[GenericError, List[OAuth2Client]]] Response[Union[GenericError, List['OAuth2Client']]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
limit=limit, limit=limit,
offset=offset, offset=offset,
)
).parsed )).parsed

View file

@ -1,28 +1,46 @@
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.generic_error import GenericError from ...types import Response, UNSET
from typing import Dict
from ...models.previous_consent_session import PreviousConsentSession from ...models.previous_consent_session import PreviousConsentSession
from ...types import UNSET, Response from typing import cast
from ...models.generic_error import GenericError
from typing import cast, List
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/consent".format(_client.base_url) url = "{}/oauth2/auth/sessions/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["subject"] = subject params["subject"] = subject
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -33,28 +51,34 @@ def _get_kwargs(
} }
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List[PreviousConsentSession]]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = [] response_200 = []
_response_200 = response.json() _response_200 = response.json()
for response_200_item_data in _response_200: for response_200_item_data in (_response_200):
response_200_item = PreviousConsentSession.from_dict(response_200_item_data) response_200_item = PreviousConsentSession.from_dict(response_200_item_data)
response_200.append(response_200_item) response_200.append(response_200_item)
return response_200 return response_200
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List[PreviousConsentSession]]]: def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
return Response( return Response(
status_code=response.status_code, status_code=response.status_code,
content=response.content, content=response.content,
@ -67,7 +91,8 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Response[Union[GenericError, List[PreviousConsentSession]]]:
) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject """Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope. This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -86,12 +111,14 @@ def sync_detailed(
subject (str): subject (str):
Returns: Returns:
Response[Union[GenericError, List[PreviousConsentSession]]] Response[Union[GenericError, List['PreviousConsentSession']]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
) )
response = httpx.request( response = httpx.request(
@ -101,12 +128,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Optional[Union[GenericError, List[PreviousConsentSession]]]:
) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject """Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope. This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -125,20 +152,22 @@ def sync(
subject (str): subject (str):
Returns: Returns:
Response[Union[GenericError, List[PreviousConsentSession]]] Response[Union[GenericError, List['PreviousConsentSession']]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Response[Union[GenericError, List[PreviousConsentSession]]]:
) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject """Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope. This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -157,25 +186,29 @@ async def asyncio_detailed(
subject (str): subject (str):
Returns: Returns:
Response[Union[GenericError, List[PreviousConsentSession]]] Response[Union[GenericError, List['PreviousConsentSession']]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Optional[Union[GenericError, List[PreviousConsentSession]]]:
) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject """Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope. This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -194,12 +227,13 @@ async def asyncio(
subject (str): subject (str):
Returns: Returns:
Response[Union[GenericError, List[PreviousConsentSession]]] Response[Union[GenericError, List['PreviousConsentSession']]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
)
).parsed )).parsed

View file

@ -1,20 +1,34 @@
from typing import Any, Dict from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response from ...types import Response, UNSET
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/metrics/prometheus".format(_client.base_url) url = "{}/metrics/prometheus".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -24,6 +38,8 @@ def _get_kwargs(
} }
def _build_response(*, response: httpx.Response) -> Response[Any]: def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response( return Response(
status_code=response.status_code, status_code=response.status_code,
@ -36,6 +52,7 @@ def _build_response(*, response: httpx.Response) -> Response[Any]:
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Any]: ) -> Response[Any]:
"""Get Snapshot Metrics from the Hydra Service. """Get Snapshot Metrics from the Hydra Service.
@ -55,8 +72,10 @@ def sync_detailed(
Response[Any] Response[Any]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -70,6 +89,7 @@ def sync_detailed(
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Any]: ) -> Response[Any]:
"""Get Snapshot Metrics from the Hydra Service. """Get Snapshot Metrics from the Hydra Service.
@ -89,11 +109,17 @@ async def asyncio_detailed(
Response[Any] Response[Any]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.reject_request import RejectRequest
from ...models.completed_request import CompletedRequest from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.reject_request import RejectRequest
from ...types import UNSET, Response
def _get_kwargs( def _get_kwargs(
@ -14,19 +18,32 @@ def _get_kwargs(
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
consent_challenge: str, consent_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent/reject".format(_client.base_url) url = "{}/oauth2/auth/requests/consent/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -39,17 +56,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json()) response_200 = CompletedRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -68,6 +91,7 @@ def sync_detailed(
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request """Reject a Consent Request
@ -103,10 +127,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
response = httpx.request( response = httpx.request(
@ -116,12 +142,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request """Reject a Consent Request
@ -157,18 +183,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
consent_challenge: str, consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request """Reject a Consent Request
@ -204,23 +232,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
consent_challenge: str, consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request """Reject a Consent Request
@ -256,10 +288,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
consent_challenge=consent_challenge, consent_challenge=consent_challenge,
)
).parsed )).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.reject_request import RejectRequest
from ...models.completed_request import CompletedRequest from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.reject_request import RejectRequest
from ...types import UNSET, Response
def _get_kwargs( def _get_kwargs(
@ -14,19 +18,32 @@ def _get_kwargs(
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
login_challenge: str, login_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login/reject".format(_client.base_url) url = "{}/oauth2/auth/requests/login/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -39,25 +56,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json()) response_200 = CompletedRequest.from_dict(response.json())
return response_200 return response_200
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -76,6 +103,7 @@ def sync_detailed(
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
login_challenge: str, login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request """Reject a Login Request
@ -106,10 +134,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
response = httpx.request( response = httpx.request(
@ -119,12 +149,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
login_challenge: str, login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request """Reject a Login Request
@ -155,18 +185,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
login_challenge: str, login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]: ) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request """Reject a Login Request
@ -197,23 +229,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
json_body: RejectRequest, json_body: RejectRequest,
login_challenge: str, login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]: ) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request """Reject a Login Request
@ -244,10 +280,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]] Response[Union[CompletedRequest, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
login_challenge=login_challenge, login_challenge=login_challenge,
)
).parsed )).parsed

View file

@ -1,31 +1,47 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.reject_request import RejectRequest from ...models.reject_request import RejectRequest
from ...types import UNSET, Response from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
form_data: RejectRequest,
json_body: RejectRequest, json_body: RejectRequest,
logout_challenge: str, logout_challenge: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout/reject".format(_client.base_url) url = "{}/oauth2/auth/requests/logout/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_body.to_dict()
json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
@ -33,22 +49,26 @@ def _get_kwargs(
"headers": headers, "headers": headers,
"cookies": cookies, "cookies": cookies,
"timeout": _client.get_timeout(), "timeout": _client.get_timeout(),
"data": form_data.to_dict(), "json": json_json_body,
"params": params, "params": params,
} }
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -65,9 +85,9 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
form_data: RejectRequest,
json_body: RejectRequest, json_body: RejectRequest,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Reject a Logout Request """Reject a Logout Request
@ -85,11 +105,12 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
form_data=form_data,
json_body=json_body, json_body=json_body,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
response = httpx.request( response = httpx.request(
@ -99,13 +120,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
form_data: RejectRequest,
json_body: RejectRequest, json_body: RejectRequest,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Reject a Logout Request """Reject a Logout Request
@ -123,20 +143,20 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
form_data=form_data,
json_body=json_body, json_body=json_body,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
form_data: RejectRequest,
json_body: RejectRequest, json_body: RejectRequest,
logout_challenge: str, logout_challenge: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Reject a Logout Request """Reject a Logout Request
@ -154,25 +174,27 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
form_data=form_data,
json_body=json_body, json_body=json_body,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
form_data: RejectRequest,
json_body: RejectRequest, json_body: RejectRequest,
logout_challenge: str, logout_challenge: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Reject a Logout Request """Reject a Logout Request
@ -190,11 +212,11 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
form_data=form_data,
json_body=json_body, json_body=json_body,
logout_challenge=logout_challenge, logout_challenge=logout_challenge,
)
).parsed )).parsed

View file

@ -1,27 +1,44 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/login".format(_client.base_url) url = "{}/oauth2/auth/sessions/login".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["subject"] = subject params["subject"] = subject
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -33,20 +50,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -64,6 +87,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User """Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session Invalidates a Subject's Authentication Session
@ -81,9 +105,11 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
) )
response = httpx.request( response = httpx.request(
@ -93,11 +119,11 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User """Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session Invalidates a Subject's Authentication Session
@ -115,16 +141,18 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User """Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session Invalidates a Subject's Authentication Session
@ -142,21 +170,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User """Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session Invalidates a Subject's Authentication Session
@ -174,9 +206,10 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
)
).parsed )).parsed

View file

@ -1,10 +1,17 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import Union
from typing import cast
from ...types import UNSET, Unset
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import UNSET, Response, Unset from typing import Optional
def _get_kwargs( def _get_kwargs(
@ -13,21 +20,36 @@ def _get_kwargs(
subject: str, subject: str,
client: Union[Unset, None, str] = UNSET, client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET, all_: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/consent".format(_client.base_url) url = "{}/oauth2/auth/sessions/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {} params: Dict[str, Any] = {}
params["subject"] = subject params["subject"] = subject
params["client"] = client params["client"] = client
params["all"] = all_ params["all"] = all_
params = {k: v for k, v in params.items() if v is not UNSET and v is not None} params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return { return {
"method": "delete", "method": "delete",
"url": url, "url": url,
@ -39,20 +61,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204: if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None) response_204 = cast(Any, None)
return response_204 return response_204
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 404: if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json()) response_404 = GenericError.from_dict(response.json())
return response_404 return response_404
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -72,6 +100,7 @@ def sync_detailed(
subject: str, subject: str,
client: Union[Unset, None, str] = UNSET, client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET, all_: Union[Unset, None, bool] = UNSET,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client """Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -88,11 +117,13 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
client=client, client=client,
all_=all_, all_=all_,
) )
response = httpx.request( response = httpx.request(
@ -102,13 +133,13 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
client: Union[Unset, None, str] = UNSET, client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET, all_: Union[Unset, None, bool] = UNSET,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client """Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -125,13 +156,14 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
client=client, client=client,
all_=all_, all_=all_,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
@ -139,6 +171,7 @@ async def asyncio_detailed(
subject: str, subject: str,
client: Union[Unset, None, str] = UNSET, client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET, all_: Union[Unset, None, bool] = UNSET,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client """Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -155,25 +188,29 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
subject=subject, subject=subject,
client=client, client=client,
all_=all_, all_=all_,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
subject: str, subject: str,
client: Union[Unset, None, str] = UNSET, client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET, all_: Union[Unset, None, bool] = UNSET,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client """Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -190,11 +227,12 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
subject=subject, subject=subject,
client=client, client=client,
all_=all_, all_=all_,
)
).parsed )).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.json_web_key import JSONWebKey from ...models.json_web_key import JSONWebKey
from ...types import Response from typing import Dict
def _get_kwargs( def _get_kwargs(
@ -14,14 +18,26 @@ def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: JSONWebKey, json_body: JSONWebKey,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid) url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -33,21 +49,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKey]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKey]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKey.from_dict(response.json()) response_200 = JSONWebKey.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -67,6 +91,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: JSONWebKey, json_body: JSONWebKey,
) -> Response[Union[GenericError, JSONWebKey]]: ) -> Response[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key """Update a JSON Web Key
@ -90,11 +115,13 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKey]] Response[Union[GenericError, JSONWebKey]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -104,13 +131,13 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
json_body: JSONWebKey, json_body: JSONWebKey,
) -> Optional[Union[GenericError, JSONWebKey]]: ) -> Optional[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key """Update a JSON Web Key
@ -134,13 +161,14 @@ def sync(
Response[Union[GenericError, JSONWebKey]] Response[Union[GenericError, JSONWebKey]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
@ -148,6 +176,7 @@ async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
json_body: JSONWebKey, json_body: JSONWebKey,
) -> Response[Union[GenericError, JSONWebKey]]: ) -> Response[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key """Update a JSON Web Key
@ -171,25 +200,29 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKey]] Response[Union[GenericError, JSONWebKey]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
kid: str, kid: str,
*, *,
_client: Client, _client: Client,
json_body: JSONWebKey, json_body: JSONWebKey,
) -> Optional[Union[GenericError, JSONWebKey]]: ) -> Optional[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key """Update a JSON Web Key
@ -213,11 +246,12 @@ async def asyncio(
Response[Union[GenericError, JSONWebKey]] Response[Union[GenericError, JSONWebKey]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
kid=kid, kid=kid,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import Dict
from typing import cast
from ...models.json_web_key_set import JSONWebKeySet from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response
def _get_kwargs( def _get_kwargs(
@ -13,14 +17,26 @@ def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: JSONWebKeySet, json_body: JSONWebKeySet,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_) url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -32,21 +48,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json()) response_200 = JSONWebKeySet.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 403: if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json()) response_403 = GenericError.from_dict(response.json())
return response_403 return response_403
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -65,6 +89,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: JSONWebKeySet, json_body: JSONWebKeySet,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set """Update a JSON Web Key Set
@ -90,10 +115,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -103,12 +130,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JSONWebKeySet, json_body: JSONWebKeySet,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set """Update a JSON Web Key Set
@ -134,18 +161,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return sync_detailed( return sync_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JSONWebKeySet, json_body: JSONWebKeySet,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set """Update a JSON Web Key Set
@ -171,23 +200,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
set_: str, set_: str,
*, *,
_client: Client, _client: Client,
json_body: JSONWebKeySet, json_body: JSONWebKeySet,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set """Update a JSON Web Key Set
@ -213,10 +246,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
set_=set_, set_=set_,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client from ...models.o_auth_2_client import OAuth2Client
from ...types import Response from typing import Dict
def _get_kwargs( def _get_kwargs(
@ -13,14 +17,26 @@ def _get_kwargs(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id) url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict() json_json_body = json_body.to_dict()
return { return {
"method": "put", "method": "put",
"url": url, "url": url,
@ -32,13 +48,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = OAuth2Client.from_dict(response.json()) response_200 = OAuth2Client.from_dict(response.json())
return response_200 return response_200
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -57,6 +77,7 @@ def sync_detailed(
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client """Update an OAuth 2.0 Client
@ -77,10 +98,12 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
response = httpx.request( response = httpx.request(
@ -90,12 +113,12 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
id: str, id: str,
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client """Update an OAuth 2.0 Client
@ -116,18 +139,20 @@ def sync(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return sync_detailed( return sync_detailed(
id=id, id=id,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
id: str, id: str,
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]: ) -> Response[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client """Update an OAuth 2.0 Client
@ -148,23 +173,27 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
id=id, id=id,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
id: str, id: str,
*, *,
_client: Client, _client: Client,
json_body: OAuth2Client, json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]: ) -> Optional[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client """Update an OAuth 2.0 Client
@ -185,10 +214,11 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]] Response[Union[GenericError, OAuth2Client]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
id=id, id=id,
_client=_client, _client=_client,
json_body=json_body, json_body=json_body,
)
).parsed )).parsed

View file

@ -1,20 +1,34 @@
from typing import Any, Dict from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response from ...types import Response, UNSET
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/sessions/logout".format(_client.base_url) url = "{}/oauth2/sessions/logout".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -24,6 +38,8 @@ def _get_kwargs(
} }
def _build_response(*, response: httpx.Response) -> Response[Any]: def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response( return Response(
status_code=response.status_code, status_code=response.status_code,
@ -36,6 +52,7 @@ def _build_response(*, response: httpx.Response) -> Response[Any]:
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Any]: ) -> Response[Any]:
"""OpenID Connect Front-Backchannel Enabled Logout """OpenID Connect Front-Backchannel Enabled Logout
@ -49,8 +66,10 @@ def sync_detailed(
Response[Any] Response[Any]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -64,6 +83,7 @@ def sync_detailed(
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Any]: ) -> Response[Any]:
"""OpenID Connect Front-Backchannel Enabled Logout """OpenID Connect Front-Backchannel Enabled Logout
@ -77,11 +97,17 @@ async def asyncio_detailed(
Response[Any] Response[Any]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from typing import Dict
from typing import cast
from ...models.well_known import WellKnown from ...models.well_known import WellKnown
from ...types import Response
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/.well-known/openid-configuration".format(_client.base_url) url = "{}/.well-known/openid-configuration".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -27,17 +43,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, WellKnown]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, WellKnown]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = WellKnown.from_dict(response.json()) response_200 = WellKnown.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -54,6 +76,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, WellKnown]]: ) -> Response[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery """OpenID Connect Discovery
@ -71,8 +94,10 @@ def sync_detailed(
Response[Union[GenericError, WellKnown]] Response[Union[GenericError, WellKnown]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -82,10 +107,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, WellKnown]]: ) -> Optional[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery """OpenID Connect Discovery
@ -103,14 +128,16 @@ def sync(
Response[Union[GenericError, WellKnown]] Response[Union[GenericError, WellKnown]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, WellKnown]]: ) -> Response[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery """OpenID Connect Discovery
@ -128,19 +155,23 @@ async def asyncio_detailed(
Response[Union[GenericError, WellKnown]] Response[Union[GenericError, WellKnown]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, WellKnown]]: ) -> Optional[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery """OpenID Connect Discovery
@ -158,8 +189,9 @@ async def asyncio(
Response[Union[GenericError, WellKnown]] Response[Union[GenericError, WellKnown]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...models.health_not_ready_status import HealthNotReadyStatus from ...types import Response, UNSET
from ...models.health_status import HealthStatus from ...models.health_status import HealthStatus
from ...types import Response from typing import cast
from ...models.health_not_ready_status import HealthNotReadyStatus
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/health/ready".format(_client.base_url) url = "{}/health/ready".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = HealthStatus.from_dict(response.json()) response_200 = HealthStatus.from_dict(response.json())
return response_200 return response_200
if response.status_code == 503: if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE:
response_503 = HealthNotReadyStatus.from_dict(response.json()) response_503 = HealthNotReadyStatus.from_dict(response.json())
return response_503 return response_503
return None return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[HealthNotRead
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]: ) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status """Check Readiness Status
@ -67,8 +88,10 @@ def sync_detailed(
Response[Union[HealthNotReadyStatus, HealthStatus]] Response[Union[HealthNotReadyStatus, HealthStatus]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -78,10 +101,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]: ) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status """Check Readiness Status
@ -99,14 +122,16 @@ def sync(
Response[Union[HealthNotReadyStatus, HealthStatus]] Response[Union[HealthNotReadyStatus, HealthStatus]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]: ) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status """Check Readiness Status
@ -124,19 +149,23 @@ async def asyncio_detailed(
Response[Union[HealthNotReadyStatus, HealthStatus]] Response[Union[HealthNotReadyStatus, HealthStatus]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]: ) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status """Check Readiness Status
@ -154,8 +183,9 @@ async def asyncio(
Response[Union[HealthNotReadyStatus, HealthStatus]] Response[Union[HealthNotReadyStatus, HealthStatus]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,39 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import AuthenticatedClient from ...client import AuthenticatedClient, Client
from ...models.generic_error import GenericError from ...types import Response, UNSET
from typing import Dict
from ...models.oauth_2_token_response import Oauth2TokenResponse from ...models.oauth_2_token_response import Oauth2TokenResponse
from ...types import Response from typing import cast
from ...models.oauth_2_token_data import Oauth2TokenData
from ...models.generic_error import GenericError
def _get_kwargs( def _get_kwargs(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/token".format(_client.base_url) url = "{}/oauth2/token".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -27,21 +44,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, Oauth2TokenResponse]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = Oauth2TokenResponse.from_dict(response.json()) response_200 = Oauth2TokenResponse.from_dict(response.json())
return response_200 return response_200
if response.status_code == 400: if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json()) response_400 = GenericError.from_dict(response.json())
return response_400 return response_400
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -58,6 +83,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[GenericError, Oauth2TokenResponse]]: ) -> Response[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint """The OAuth 2.0 Token Endpoint
@ -76,8 +102,10 @@ def sync_detailed(
Response[Union[GenericError, Oauth2TokenResponse]] Response[Union[GenericError, Oauth2TokenResponse]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -87,10 +115,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[GenericError, Oauth2TokenResponse]]: ) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint """The OAuth 2.0 Token Endpoint
@ -109,14 +137,16 @@ def sync(
Response[Union[GenericError, Oauth2TokenResponse]] Response[Union[GenericError, Oauth2TokenResponse]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[GenericError, Oauth2TokenResponse]]: ) -> Response[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint """The OAuth 2.0 Token Endpoint
@ -135,19 +165,23 @@ async def asyncio_detailed(
Response[Union[GenericError, Oauth2TokenResponse]] Response[Union[GenericError, Oauth2TokenResponse]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[GenericError, Oauth2TokenResponse]]: ) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint """The OAuth 2.0 Token Endpoint
@ -166,8 +200,9 @@ async def asyncio(
Response[Union[GenericError, Oauth2TokenResponse]] Response[Union[GenericError, Oauth2TokenResponse]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,21 +1,37 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/auth".format(_client.base_url) url = "{}/oauth2/auth".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -26,16 +42,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 302: if response.status_code == HTTPStatus.FOUND:
response_302 = cast(Any, None) response_302 = cast(Any, None)
return response_302 return response_302
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -52,6 +72,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint """The OAuth 2.0 Authorize Endpoint
@ -65,8 +86,10 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -76,10 +99,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint """The OAuth 2.0 Authorize Endpoint
@ -93,14 +116,16 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint """The OAuth 2.0 Authorize Endpoint
@ -114,19 +139,23 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint """The OAuth 2.0 Authorize Endpoint
@ -140,8 +169,9 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,21 +1,38 @@
from typing import Any, Dict, Optional, Union, cast from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import AuthenticatedClient from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...types import Response from ...models.revoke_o_auth_2_token_data import RevokeOAuth2TokenData
from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/oauth2/revoke".format(_client.base_url) url = "{}/oauth2/revoke".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "post", "method": "post",
"url": url, "url": url,
@ -26,16 +43,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = cast(Any, None) response_200 = cast(Any, None)
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -52,6 +73,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed( def sync_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens """Revoke OAuth2 Tokens
@ -67,8 +89,10 @@ def sync_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -78,10 +102,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens """Revoke OAuth2 Tokens
@ -97,14 +121,16 @@ def sync(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[Any, GenericError]]: ) -> Response[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens """Revoke OAuth2 Tokens
@ -120,19 +146,23 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[Any, GenericError]]: ) -> Optional[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens """Revoke OAuth2 Tokens
@ -148,8 +178,9 @@ async def asyncio(
Response[Union[Any, GenericError]] Response[Union[Any, GenericError]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import AuthenticatedClient from ...client import AuthenticatedClient, Client
from ...models.generic_error import GenericError from ...types import Response, UNSET
from ...models.userinfo_response import UserinfoResponse from ...models.userinfo_response import UserinfoResponse
from ...types import Response from ...models.generic_error import GenericError
from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/userinfo".format(_client.base_url) url = "{}/userinfo".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -27,17 +43,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, UserinfoResponse]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, UserinfoResponse]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = UserinfoResponse.from_dict(response.json()) response_200 = UserinfoResponse.from_dict(response.json())
return response_200 return response_200
if response.status_code == 401: if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json()) response_401 = GenericError.from_dict(response.json())
return response_401 return response_401
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -54,6 +76,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[GenericError, UserinfoResponse]]: ) -> Response[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo """OpenID Connect Userinfo
@ -67,8 +90,10 @@ def sync_detailed(
Response[Union[GenericError, UserinfoResponse]] Response[Union[GenericError, UserinfoResponse]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -78,10 +103,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[GenericError, UserinfoResponse]]: ) -> Optional[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo """OpenID Connect Userinfo
@ -95,14 +120,16 @@ def sync(
Response[Union[GenericError, UserinfoResponse]] Response[Union[GenericError, UserinfoResponse]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Response[Union[GenericError, UserinfoResponse]]: ) -> Response[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo """OpenID Connect Userinfo
@ -116,19 +143,23 @@ async def asyncio_detailed(
Response[Union[GenericError, UserinfoResponse]] Response[Union[GenericError, UserinfoResponse]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: AuthenticatedClient, _client: AuthenticatedClient,
) -> Optional[Union[GenericError, UserinfoResponse]]: ) -> Optional[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo """OpenID Connect Userinfo
@ -142,8 +173,9 @@ async def asyncio(
Response[Union[GenericError, UserinfoResponse]] Response[Union[GenericError, UserinfoResponse]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,22 +1,38 @@
from typing import Any, Dict, Optional, Union from typing import Any, Dict, List, Optional, Union, cast
import httpx import httpx
from ...client import Client from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response from typing import cast
from typing import Dict
def _get_kwargs( def _get_kwargs(
*, *,
_client: Client, _client: Client,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
url = "{}/.well-known/jwks.json".format(_client.base_url) url = "{}/.well-known/jwks.json".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers() headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies() cookies: Dict[str, Any] = _client.get_cookies()
return { return {
"method": "get", "method": "get",
"url": url, "url": url,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]: def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200: if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json()) response_200 = JSONWebKeySet.from_dict(response.json())
return response_200 return response_200
if response.status_code == 500: if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json()) response_500 = GenericError.from_dict(response.json())
return response_500 return response_500
return None return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed( def sync_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery """JSON Web Keys Discovery
@ -62,8 +83,10 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
response = httpx.request( response = httpx.request(
@ -73,10 +96,10 @@ def sync_detailed(
return _build_response(response=response) return _build_response(response=response)
def sync( def sync(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery """JSON Web Keys Discovery
@ -89,14 +112,16 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return sync_detailed( return sync_detailed(
_client=_client, _client=_client,
).parsed
).parsed
async def asyncio_detailed( async def asyncio_detailed(
*, *,
_client: Client, _client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]: ) -> Response[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery """JSON Web Keys Discovery
@ -109,19 +134,23 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
kwargs = _get_kwargs( kwargs = _get_kwargs(
_client=_client, _client=_client,
) )
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client: async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs) response = await __client.request(
**kwargs
)
return _build_response(response=response) return _build_response(response=response)
async def asyncio( async def asyncio(
*, *,
_client: Client, _client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]: ) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery """JSON Web Keys Discovery
@ -134,8 +163,9 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]] Response[Union[GenericError, JSONWebKeySet]]
""" """
return (
await asyncio_detailed( return (await asyncio_detailed(
_client=_client, _client=_client,
)
).parsed )).parsed

View file

@ -1,9 +1,7 @@
import ssl import ssl
from typing import Dict, Union from typing import Dict, Union
import attr import attr
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class Client: class Client:
""" A class for keeping track of data related to the API """ """ A class for keeping track of data related to the API """
@ -36,7 +34,6 @@ class Client:
""" Get a new client matching this one with a new timeout (in seconds) """ """ Get a new client matching this one with a new timeout (in seconds) """
return attr.evolve(self, timeout=timeout) return attr.evolve(self, timeout=timeout)
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class AuthenticatedClient(Client): class AuthenticatedClient(Client):
""" A Client which has been authenticated for use on secured endpoints """ """ A Client which has been authenticated for use on secured endpoints """

View file

@ -0,0 +1,7 @@
""" Contains shared errors types that can be raised from API functions """
class UnexpectedStatus(Exception):
""" Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True """
...
__all__ = ["UnexpectedStatus"]

View file

@ -13,6 +13,7 @@ from .generic_error import GenericError
from .health_not_ready_status import HealthNotReadyStatus from .health_not_ready_status import HealthNotReadyStatus
from .health_not_ready_status_errors import HealthNotReadyStatusErrors from .health_not_ready_status_errors import HealthNotReadyStatusErrors
from .health_status import HealthStatus from .health_status import HealthStatus
from .introspect_o_auth_2_token_data import IntrospectOAuth2TokenData
from .jose_json_web_key_set import JoseJSONWebKeySet from .jose_json_web_key_set import JoseJSONWebKeySet
from .json_raw_message import JSONRawMessage from .json_raw_message import JSONRawMessage
from .json_web_key import JSONWebKey from .json_web_key import JSONWebKey
@ -23,6 +24,7 @@ from .logout_request import LogoutRequest
from .o_auth_2_client import OAuth2Client from .o_auth_2_client import OAuth2Client
from .o_auth_2_token_introspection import OAuth2TokenIntrospection from .o_auth_2_token_introspection import OAuth2TokenIntrospection
from .o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt from .o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from .oauth_2_token_data import Oauth2TokenData
from .oauth_2_token_response import Oauth2TokenResponse from .oauth_2_token_response import Oauth2TokenResponse
from .open_id_connect_context import OpenIDConnectContext from .open_id_connect_context import OpenIDConnectContext
from .open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims from .open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
@ -40,6 +42,7 @@ from .plugin_mount import PluginMount
from .plugin_settings import PluginSettings from .plugin_settings import PluginSettings
from .previous_consent_session import PreviousConsentSession from .previous_consent_session import PreviousConsentSession
from .reject_request import RejectRequest from .reject_request import RejectRequest
from .revoke_o_auth_2_token_data import RevokeOAuth2TokenData
from .userinfo_response import UserinfoResponse from .userinfo_response import UserinfoResponse
from .version import Version from .version import Version
from .volume_usage_data import VolumeUsageData from .volume_usage_data import VolumeUsageData

View file

@ -1,15 +1,25 @@
import datetime from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import List
import attr import attr
from dateutil.parser import isoparse
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptConsentRequest") from dateutil.parser import isoparse
from typing import Dict
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="AcceptConsentRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class AcceptConsentRequest: class AcceptConsentRequest:
""" """
@ -31,18 +41,25 @@ class AcceptConsentRequest:
handled_at: Union[Unset, datetime.datetime] = UNSET handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET session: Union[Unset, 'ConsentRequestSession'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
grant_access_token_audience: Union[Unset, List[str]] = UNSET grant_access_token_audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_access_token_audience, Unset): if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset): if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset): if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat() handled_at = self.handled_at.isoformat()
@ -53,9 +70,11 @@ class AcceptConsentRequest:
if not isinstance(self.session, Unset): if not isinstance(self.session, Unset):
session = self.session.to_dict() session = self.session.to_dict()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if grant_access_token_audience is not UNSET: if grant_access_token_audience is not UNSET:
field_dict["grant_access_token_audience"] = grant_access_token_audience field_dict["grant_access_token_audience"] = grant_access_token_audience
if grant_scope is not UNSET: if grant_scope is not UNSET:
@ -71,13 +90,17 @@ class AcceptConsentRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET)) grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET)) grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET) _handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime] handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset): if isinstance(_handled_at, Unset):
@ -85,6 +108,9 @@ class AcceptConsentRequest:
else: else:
handled_at = isoparse(_handled_at) handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET) remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET) remember_for = _d.pop("remember_for", UNSET)
@ -96,6 +122,9 @@ class AcceptConsentRequest:
else: else:
session = ConsentRequestSession.from_dict(_session) session = ConsentRequestSession.from_dict(_session)
accept_consent_request = cls( accept_consent_request = cls(
grant_access_token_audience=grant_access_token_audience, grant_access_token_audience=grant_access_token_audience,
grant_scope=grant_scope, grant_scope=grant_scope,

View file

@ -1,13 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptLoginRequest") from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="AcceptLoginRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class AcceptLoginRequest: class AcceptLoginRequest:
""" """
@ -49,12 +58,13 @@ class AcceptLoginRequest:
subject: str subject: str
acr: Union[Unset, str] = UNSET acr: Union[Unset, str] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET context: Union[Unset, 'JSONRawMessage'] = UNSET
force_subject_identifier: Union[Unset, str] = UNSET force_subject_identifier: Union[Unset, str] = UNSET
remember: Union[Unset, bool] = UNSET remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET remember_for: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
subject = self.subject subject = self.subject
acr = self.acr acr = self.acr
@ -68,11 +78,9 @@ class AcceptLoginRequest:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"subject": subject, "subject": subject,
} })
)
if acr is not UNSET: if acr is not UNSET:
field_dict["acr"] = acr field_dict["acr"] = acr
if context is not UNSET: if context is not UNSET:
@ -86,6 +94,8 @@ class AcceptLoginRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -100,6 +110,9 @@ class AcceptLoginRequest:
else: else:
context = JSONRawMessage.from_dict(_context) context = JSONRawMessage.from_dict(_context)
force_subject_identifier = _d.pop("force_subject_identifier", UNSET) force_subject_identifier = _d.pop("force_subject_identifier", UNSET)
remember = _d.pop("remember", UNSET) remember = _d.pop("remember", UNSET)

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="CompletedRequest") from ..types import UNSET, Unset
T = TypeVar("T", bound="CompletedRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class CompletedRequest: class CompletedRequest:
""" """
@ -16,19 +24,20 @@ class CompletedRequest:
redirect_to: str redirect_to: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
redirect_to = self.redirect_to redirect_to = self.redirect_to
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"redirect_to": redirect_to, "redirect_to": redirect_to,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,15 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.json_raw_message import JSONRawMessage
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequest") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="ConsentRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class ConsentRequest: class ConsentRequest:
""" """
@ -50,11 +58,11 @@ class ConsentRequest:
challenge: str challenge: str
acr: Union[Unset, str] = UNSET acr: Union[Unset, str] = UNSET
client: Union[Unset, OAuth2Client] = UNSET client: Union[Unset, 'OAuth2Client'] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET context: Union[Unset, 'JSONRawMessage'] = UNSET
login_challenge: Union[Unset, str] = UNSET login_challenge: Union[Unset, str] = UNSET
login_session_id: Union[Unset, str] = UNSET login_session_id: Union[Unset, str] = UNSET
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET oidc_context: Union[Unset, 'OpenIDConnectContext'] = UNSET
request_url: Union[Unset, str] = UNSET request_url: Union[Unset, str] = UNSET
requested_access_token_audience: Union[Unset, List[str]] = UNSET requested_access_token_audience: Union[Unset, List[str]] = UNSET
requested_scope: Union[Unset, List[str]] = UNSET requested_scope: Union[Unset, List[str]] = UNSET
@ -62,6 +70,7 @@ class ConsentRequest:
subject: Union[Unset, str] = UNSET subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge challenge = self.challenge
acr = self.acr acr = self.acr
@ -84,20 +93,24 @@ class ConsentRequest:
if not isinstance(self.requested_access_token_audience, Unset): if not isinstance(self.requested_access_token_audience, Unset):
requested_access_token_audience = self.requested_access_token_audience requested_access_token_audience = self.requested_access_token_audience
requested_scope: Union[Unset, List[str]] = UNSET requested_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.requested_scope, Unset): if not isinstance(self.requested_scope, Unset):
requested_scope = self.requested_scope requested_scope = self.requested_scope
skip = self.skip skip = self.skip
subject = self.subject subject = self.subject
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"challenge": challenge, "challenge": challenge,
} })
)
if acr is not UNSET: if acr is not UNSET:
field_dict["acr"] = acr field_dict["acr"] = acr
if client is not UNSET: if client is not UNSET:
@ -123,6 +136,8 @@ class ConsentRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -137,6 +152,9 @@ class ConsentRequest:
else: else:
client = OAuth2Client.from_dict(_client) client = OAuth2Client.from_dict(_client)
_context = _d.pop("context", UNSET) _context = _d.pop("context", UNSET)
context: Union[Unset, JSONRawMessage] context: Union[Unset, JSONRawMessage]
if isinstance(_context, Unset): if isinstance(_context, Unset):
@ -144,6 +162,9 @@ class ConsentRequest:
else: else:
context = JSONRawMessage.from_dict(_context) context = JSONRawMessage.from_dict(_context)
login_challenge = _d.pop("login_challenge", UNSET) login_challenge = _d.pop("login_challenge", UNSET)
login_session_id = _d.pop("login_session_id", UNSET) login_session_id = _d.pop("login_session_id", UNSET)
@ -155,12 +176,17 @@ class ConsentRequest:
else: else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context) oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
request_url = _d.pop("request_url", UNSET) request_url = _d.pop("request_url", UNSET)
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience", UNSET)) requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience", UNSET))
requested_scope = cast(List[str], _d.pop("requested_scope", UNSET)) requested_scope = cast(List[str], _d.pop("requested_scope", UNSET))
skip = _d.pop("skip", UNSET) skip = _d.pop("skip", UNSET)
subject = _d.pop("subject", UNSET) subject = _d.pop("subject", UNSET)

View file

@ -1,14 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.consent_request_session_access_token import ConsentRequestSessionAccessToken
from ..models.consent_request_session_id_token import ConsentRequestSessionIdToken
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSession") from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="ConsentRequestSession")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class ConsentRequestSession: class ConsentRequestSession:
""" """
@ -24,10 +32,11 @@ class ConsentRequestSession:
by anyone that has access to the ID Challenge. Use with care! by anyone that has access to the ID Challenge. Use with care!
""" """
access_token: Union[Unset, ConsentRequestSessionAccessToken] = UNSET access_token: Union[Unset, 'ConsentRequestSessionAccessToken'] = UNSET
id_token: Union[Unset, ConsentRequestSessionIdToken] = UNSET id_token: Union[Unset, 'ConsentRequestSessionIdToken'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
access_token: Union[Unset, Dict[str, Any]] = UNSET access_token: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.access_token, Unset): if not isinstance(self.access_token, Unset):
@ -37,9 +46,11 @@ class ConsentRequestSession:
if not isinstance(self.id_token, Unset): if not isinstance(self.id_token, Unset):
id_token = self.id_token.to_dict() id_token = self.id_token.to_dict()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if access_token is not UNSET: if access_token is not UNSET:
field_dict["access_token"] = access_token field_dict["access_token"] = access_token
if id_token is not UNSET: if id_token is not UNSET:
@ -47,6 +58,8 @@ class ConsentRequestSession:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -57,6 +70,9 @@ class ConsentRequestSession:
else: else:
access_token = ConsentRequestSessionAccessToken.from_dict(_access_token) access_token = ConsentRequestSessionAccessToken.from_dict(_access_token)
_id_token = _d.pop("id_token", UNSET) _id_token = _d.pop("id_token", UNSET)
id_token: Union[Unset, ConsentRequestSessionIdToken] id_token: Union[Unset, ConsentRequestSessionIdToken]
if isinstance(_id_token, Unset): if isinstance(_id_token, Unset):
@ -64,6 +80,9 @@ class ConsentRequestSession:
else: else:
id_token = ConsentRequestSessionIdToken.from_dict(_id_token) id_token = ConsentRequestSessionIdToken.from_dict(_id_token)
consent_request_session = cls( consent_request_session = cls(
access_token=access_token, access_token=access_token,
id_token=id_token, id_token=id_token,

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="ConsentRequestSessionAccessToken") from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSessionAccessToken")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class ConsentRequestSessionAccessToken: class ConsentRequestSessionAccessToken:
"""AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the """AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the
@ -16,18 +24,23 @@ class ConsentRequestSessionAccessToken:
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
consent_request_session_access_token = cls() consent_request_session_access_token = cls(
)
consent_request_session_access_token.additional_properties = _d consent_request_session_access_token.additional_properties = _d
return consent_request_session_access_token return consent_request_session_access_token

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="ConsentRequestSessionIdToken") from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSessionIdToken")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class ConsentRequestSessionIdToken: class ConsentRequestSessionIdToken:
"""IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable """IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable
@ -14,18 +22,23 @@ class ConsentRequestSessionIdToken:
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
consent_request_session_id_token = cls() consent_request_session_id_token = cls(
)
consent_request_session_id_token.additional_properties = _d consent_request_session_id_token.additional_properties = _d
return consent_request_session_id_token return consent_request_session_id_token

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="ContainerWaitOKBodyError") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="ContainerWaitOKBodyError")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class ContainerWaitOKBodyError: class ContainerWaitOKBodyError:
"""ContainerWaitOKBodyError container waiting error, if any """ContainerWaitOKBodyError container waiting error, if any
@ -18,17 +26,21 @@ class ContainerWaitOKBodyError:
message: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
message = self.message message = self.message
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if message is not UNSET: if message is not UNSET:
field_dict["Message"] = message field_dict["Message"] = message
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,14 +1,23 @@
import datetime from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import List
import attr import attr
from dateutil.parser import isoparse
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="FlushInactiveOAuth2TokensRequest") from dateutil.parser import isoparse
from typing import Union
from typing import cast
from ..types import UNSET, Unset
import datetime
T = TypeVar("T", bound="FlushInactiveOAuth2TokensRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class FlushInactiveOAuth2TokensRequest: class FlushInactiveOAuth2TokensRequest:
""" """
@ -21,19 +30,24 @@ class FlushInactiveOAuth2TokensRequest:
not_after: Union[Unset, datetime.datetime] = UNSET not_after: Union[Unset, datetime.datetime] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
not_after: Union[Unset, str] = UNSET not_after: Union[Unset, str] = UNSET
if not isinstance(self.not_after, Unset): if not isinstance(self.not_after, Unset):
not_after = self.not_after.isoformat() not_after = self.not_after.isoformat()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if not_after is not UNSET: if not_after is not UNSET:
field_dict["notAfter"] = not_after field_dict["notAfter"] = not_after
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -44,6 +58,9 @@ class FlushInactiveOAuth2TokensRequest:
else: else:
not_after = isoparse(_not_after) not_after = isoparse(_not_after)
flush_inactive_o_auth_2_tokens_request = cls( flush_inactive_o_auth_2_tokens_request = cls(
not_after=not_after, not_after=not_after,
) )

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="GenericError") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="GenericError")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class GenericError: class GenericError:
"""Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. """Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
@ -26,6 +34,7 @@ class GenericError:
status_code: Union[Unset, int] = UNSET status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
error = self.error error = self.error
debug = self.debug debug = self.debug
@ -34,11 +43,9 @@ class GenericError:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"error": error, "error": error,
} })
)
if debug is not UNSET: if debug is not UNSET:
field_dict["debug"] = debug field_dict["debug"] = debug
if error_description is not UNSET: if error_description is not UNSET:
@ -48,6 +55,8 @@ class GenericError:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,13 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.health_not_ready_status_errors import HealthNotReadyStatusErrors
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthNotReadyStatus") from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="HealthNotReadyStatus")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class HealthNotReadyStatus: class HealthNotReadyStatus:
""" """
@ -16,22 +25,27 @@ class HealthNotReadyStatus:
status. status.
""" """
errors: Union[Unset, HealthNotReadyStatusErrors] = UNSET errors: Union[Unset, 'HealthNotReadyStatusErrors'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
errors: Union[Unset, Dict[str, Any]] = UNSET errors: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.errors, Unset): if not isinstance(self.errors, Unset):
errors = self.errors.to_dict() errors = self.errors.to_dict()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if errors is not UNSET: if errors is not UNSET:
field_dict["errors"] = errors field_dict["errors"] = errors
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -42,6 +56,9 @@ class HealthNotReadyStatus:
else: else:
errors = HealthNotReadyStatusErrors.from_dict(_errors) errors = HealthNotReadyStatusErrors.from_dict(_errors)
health_not_ready_status = cls( health_not_ready_status = cls(
errors=errors, errors=errors,
) )

View file

@ -1,28 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="HealthNotReadyStatusErrors") from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthNotReadyStatusErrors")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class HealthNotReadyStatusErrors: class HealthNotReadyStatusErrors:
"""Errors contains a list of errors that caused the not ready status.""" """Errors contains a list of errors that caused the not ready status.
"""
additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
health_not_ready_status_errors = cls() health_not_ready_status_errors = cls(
)
health_not_ready_status_errors.additional_properties = _d health_not_ready_status_errors.additional_properties = _d
return health_not_ready_status_errors return health_not_ready_status_errors

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthStatus") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="HealthStatus")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class HealthStatus: class HealthStatus:
""" """
@ -17,17 +25,21 @@ class HealthStatus:
status: Union[Unset, str] = UNSET status: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
status = self.status status = self.status
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if status is not UNSET: if status is not UNSET:
field_dict["status"] = status field_dict["status"] = status
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -0,0 +1,81 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="IntrospectOAuth2TokenData")
@attr.s(auto_attribs=True)
class IntrospectOAuth2TokenData:
"""
Attributes:
token (str): The string value of the token. For access tokens, this
is the "access_token" value returned from the token endpoint
defined in OAuth 2.0. For refresh tokens, this is the "refresh_token"
value returned.
scope (Union[Unset, str]): An optional, space separated list of required scopes. If the access token was not
granted one of the
scopes, the result of active will be false.
"""
token: str
scope: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
token = self.token
scope = self.scope
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"token": token,
})
if scope is not UNSET:
field_dict["scope"] = scope
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
token = _d.pop("token")
scope = _d.pop("scope", UNSET)
introspect_o_auth_2_token_data = cls(
token=token,
scope=scope,
)
introspect_o_auth_2_token_data.additional_properties = _d
return introspect_o_auth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,28 +1,42 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="JoseJSONWebKeySet") from ..types import UNSET, Unset
T = TypeVar("T", bound="JoseJSONWebKeySet")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class JoseJSONWebKeySet: class JoseJSONWebKeySet:
""" """ """
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
jose_json_web_key_set = cls() jose_json_web_key_set = cls(
)
jose_json_web_key_set.additional_properties = _d jose_json_web_key_set.additional_properties = _d
return jose_json_web_key_set return jose_json_web_key_set

View file

@ -1,28 +1,42 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="JSONRawMessage") from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONRawMessage")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class JSONRawMessage: class JSONRawMessage:
""" """ """
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
json_raw_message = cls() json_raw_message = cls(
)
json_raw_message.additional_properties = _d json_raw_message.additional_properties = _d
return json_raw_message return json_raw_message

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKey") from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="JSONWebKey")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class JSONWebKey: class JSONWebKey:
"""It is important that this model object is named JSONWebKey for """It is important that this model object is named JSONWebKey for
@ -44,29 +53,29 @@ class JSONWebKey:
xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS
4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt- 4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-
ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpg ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpg
NKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYV NKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-
WFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE. MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE.
dp (Union[Unset, str]): Example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ dp (Union[Unset, str]): Example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ
4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0. 4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0.
dq (Union[Unset, str]): Example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF dq (Union[Unset, str]): Example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF
7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk. 7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk.
e (Union[Unset, str]): Example: AQAB. e (Union[Unset, str]): Example: AQAB.
k (Union[Unset, str]): Example: GawgguFyGrWKav7AX4VKUg. k (Union[Unset, str]): Example: GawgguFyGrWKav7AX4VKUg.
n (Union[Unset, str]): Example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4J n (Union[Unset, str]): Example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-
zruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJL 51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO2
BWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yF 86qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd
p_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUX 0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_Kzd
t23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCF kWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-
DMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx- WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-
KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0. KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0.
p (Union[Unset, str]): Example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2 p (Union[Unset, str]): Example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-
i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmS D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5k
eMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0 zd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-
Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ. rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ.
q (Union[Unset, str]): Example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain- q (Union[Unset, str]): Example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-
ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv- ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-
uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-
0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ. A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ.
qi (Union[Unset, str]): Example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa- qi (Union[Unset, str]): Example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-
Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU. Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU.
x (Union[Unset, str]): Example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU. x (Union[Unset, str]): Example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU.
@ -99,6 +108,7 @@ class JSONWebKey:
y: Union[Unset, str] = UNSET y: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
alg = self.alg alg = self.alg
kid = self.kid kid = self.kid
@ -119,18 +129,19 @@ class JSONWebKey:
if not isinstance(self.x5c, Unset): if not isinstance(self.x5c, Unset):
x5c = self.x5c x5c = self.x5c
y = self.y y = self.y
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"alg": alg, "alg": alg,
"kid": kid, "kid": kid,
"kty": kty, "kty": kty,
"use": use, "use": use,
} })
)
if crv is not UNSET: if crv is not UNSET:
field_dict["crv"] = crv field_dict["crv"] = crv
if d is not UNSET: if d is not UNSET:
@ -160,6 +171,8 @@ class JSONWebKey:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -195,6 +208,7 @@ class JSONWebKey:
x5c = cast(List[str], _d.pop("x5c", UNSET)) x5c = cast(List[str], _d.pop("x5c", UNSET))
y = _d.pop("y", UNSET) y = _d.pop("y", UNSET)
json_web_key = cls( json_web_key = cls(

View file

@ -1,13 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.json_web_key import JSONWebKey
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKeySet") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="JSONWebKeySet")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class JSONWebKeySet: class JSONWebKeySet:
"""It is important that this model object is named JSONWebKeySet for """It is important that this model object is named JSONWebKeySet for
@ -17,16 +27,17 @@ class JSONWebKeySet:
effectively written in the swagger spec. effectively written in the swagger spec.
Attributes: Attributes:
keys (Union[Unset, List[JSONWebKey]]): The value of the "keys" parameter is an array of JWK values. By keys (Union[Unset, List['JSONWebKey']]): The value of the "keys" parameter is an array of JWK values. By
default, the order of the JWK values within the array does not imply default, the order of the JWK values within the array does not imply
an order of preference among them, although applications of JWK Sets an order of preference among them, although applications of JWK Sets
can choose to assign a meaning to the order for their purposes, if can choose to assign a meaning to the order for their purposes, if
desired. desired.
""" """
keys: Union[Unset, List[JSONWebKey]] = UNSET keys: Union[Unset, List['JSONWebKey']] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
keys: Union[Unset, List[Dict[str, Any]]] = UNSET keys: Union[Unset, List[Dict[str, Any]]] = UNSET
if not isinstance(self.keys, Unset): if not isinstance(self.keys, Unset):
@ -36,24 +47,34 @@ class JSONWebKeySet:
keys.append(keys_item) keys.append(keys_item)
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if keys is not UNSET: if keys is not UNSET:
field_dict["keys"] = keys field_dict["keys"] = keys
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
keys = [] keys = []
_keys = _d.pop("keys", UNSET) _keys = _d.pop("keys", UNSET)
for keys_item_data in _keys or []: for keys_item_data in (_keys or []):
keys_item = JSONWebKey.from_dict(keys_item_data) keys_item = JSONWebKey.from_dict(keys_item_data)
keys.append(keys_item) keys.append(keys_item)
json_web_key_set = cls( json_web_key_set = cls(
keys=keys, keys=keys,
) )

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="JsonWebKeySetGeneratorRequest") from ..types import UNSET, Unset
T = TypeVar("T", bound="JsonWebKeySetGeneratorRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class JsonWebKeySetGeneratorRequest: class JsonWebKeySetGeneratorRequest:
""" """
@ -22,6 +30,7 @@ class JsonWebKeySetGeneratorRequest:
use: str use: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
alg = self.alg alg = self.alg
kid = self.kid kid = self.kid
@ -29,16 +38,16 @@ class JsonWebKeySetGeneratorRequest:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"alg": alg, "alg": alg,
"kid": kid, "kid": kid,
"use": use, "use": use,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,14 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="LoginRequest") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="LoginRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class LoginRequest: class LoginRequest:
""" """
@ -42,16 +51,17 @@ class LoginRequest:
""" """
challenge: str challenge: str
client: OAuth2Client client: 'OAuth2Client'
request_url: str request_url: str
requested_access_token_audience: List[str] requested_access_token_audience: List[str]
requested_scope: List[str] requested_scope: List[str]
skip: bool skip: bool
subject: str subject: str
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET oidc_context: Union[Unset, 'OpenIDConnectContext'] = UNSET
session_id: Union[Unset, str] = UNSET session_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge challenge = self.challenge
client = self.client.to_dict() client = self.client.to_dict()
@ -59,8 +69,14 @@ class LoginRequest:
request_url = self.request_url request_url = self.request_url
requested_access_token_audience = self.requested_access_token_audience requested_access_token_audience = self.requested_access_token_audience
requested_scope = self.requested_scope requested_scope = self.requested_scope
skip = self.skip skip = self.skip
subject = self.subject subject = self.subject
oidc_context: Union[Unset, Dict[str, Any]] = UNSET oidc_context: Union[Unset, Dict[str, Any]] = UNSET
@ -71,8 +87,7 @@ class LoginRequest:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"challenge": challenge, "challenge": challenge,
"client": client, "client": client,
"request_url": request_url, "request_url": request_url,
@ -80,8 +95,7 @@ class LoginRequest:
"requested_scope": requested_scope, "requested_scope": requested_scope,
"skip": skip, "skip": skip,
"subject": subject, "subject": subject,
} })
)
if oidc_context is not UNSET: if oidc_context is not UNSET:
field_dict["oidc_context"] = oidc_context field_dict["oidc_context"] = oidc_context
if session_id is not UNSET: if session_id is not UNSET:
@ -89,6 +103,8 @@ class LoginRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -96,12 +112,17 @@ class LoginRequest:
client = OAuth2Client.from_dict(_d.pop("client")) client = OAuth2Client.from_dict(_d.pop("client"))
request_url = _d.pop("request_url") request_url = _d.pop("request_url")
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience")) requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience"))
requested_scope = cast(List[str], _d.pop("requested_scope")) requested_scope = cast(List[str], _d.pop("requested_scope"))
skip = _d.pop("skip") skip = _d.pop("skip")
subject = _d.pop("subject") subject = _d.pop("subject")
@ -113,6 +134,9 @@ class LoginRequest:
else: else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context) oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
session_id = _d.pop("session_id", UNSET) session_id = _d.pop("session_id", UNSET)
login_request = cls( login_request = cls(

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="LogoutRequest") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="LogoutRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class LogoutRequest: class LogoutRequest:
""" """
@ -24,6 +32,7 @@ class LogoutRequest:
subject: Union[Unset, str] = UNSET subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
request_url = self.request_url request_url = self.request_url
rp_initiated = self.rp_initiated rp_initiated = self.rp_initiated
@ -32,7 +41,8 @@ class LogoutRequest:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if request_url is not UNSET: if request_url is not UNSET:
field_dict["request_url"] = request_url field_dict["request_url"] = request_url
if rp_initiated is not UNSET: if rp_initiated is not UNSET:
@ -44,6 +54,8 @@ class LogoutRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,16 +1,25 @@
import datetime from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import List
import attr import attr
from dateutil.parser import isoparse
from ..models.jose_json_web_key_set import JoseJSONWebKeySet
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2Client") from dateutil.parser import isoparse
from typing import Dict
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="OAuth2Client")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class OAuth2Client: class OAuth2Client:
""" """
@ -117,10 +126,10 @@ class OAuth2Client:
frontchannel_logout_session_required: Union[Unset, bool] = UNSET frontchannel_logout_session_required: Union[Unset, bool] = UNSET
frontchannel_logout_uri: Union[Unset, str] = UNSET frontchannel_logout_uri: Union[Unset, str] = UNSET
grant_types: Union[Unset, List[str]] = UNSET grant_types: Union[Unset, List[str]] = UNSET
jwks: Union[Unset, JoseJSONWebKeySet] = UNSET jwks: Union[Unset, 'JoseJSONWebKeySet'] = UNSET
jwks_uri: Union[Unset, str] = UNSET jwks_uri: Union[Unset, str] = UNSET
logo_uri: Union[Unset, str] = UNSET logo_uri: Union[Unset, str] = UNSET
metadata: Union[Unset, JSONRawMessage] = UNSET metadata: Union[Unset, 'JSONRawMessage'] = UNSET
owner: Union[Unset, str] = UNSET owner: Union[Unset, str] = UNSET
policy_uri: Union[Unset, str] = UNSET policy_uri: Union[Unset, str] = UNSET
post_logout_redirect_uris: Union[Unset, List[str]] = UNSET post_logout_redirect_uris: Union[Unset, List[str]] = UNSET
@ -138,15 +147,22 @@ class OAuth2Client:
userinfo_signed_response_alg: Union[Unset, str] = UNSET userinfo_signed_response_alg: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
allowed_cors_origins: Union[Unset, List[str]] = UNSET allowed_cors_origins: Union[Unset, List[str]] = UNSET
if not isinstance(self.allowed_cors_origins, Unset): if not isinstance(self.allowed_cors_origins, Unset):
allowed_cors_origins = self.allowed_cors_origins allowed_cors_origins = self.allowed_cors_origins
audience: Union[Unset, List[str]] = UNSET audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.audience, Unset): if not isinstance(self.audience, Unset):
audience = self.audience audience = self.audience
backchannel_logout_session_required = self.backchannel_logout_session_required backchannel_logout_session_required = self.backchannel_logout_session_required
backchannel_logout_uri = self.backchannel_logout_uri backchannel_logout_uri = self.backchannel_logout_uri
client_id = self.client_id client_id = self.client_id
@ -158,6 +174,9 @@ class OAuth2Client:
if not isinstance(self.contacts, Unset): if not isinstance(self.contacts, Unset):
contacts = self.contacts contacts = self.contacts
created_at: Union[Unset, str] = UNSET created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset): if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat() created_at = self.created_at.isoformat()
@ -168,6 +187,9 @@ class OAuth2Client:
if not isinstance(self.grant_types, Unset): if not isinstance(self.grant_types, Unset):
grant_types = self.grant_types grant_types = self.grant_types
jwks: Union[Unset, Dict[str, Any]] = UNSET jwks: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.jwks, Unset): if not isinstance(self.jwks, Unset):
jwks = self.jwks.to_dict() jwks = self.jwks.to_dict()
@ -184,19 +206,31 @@ class OAuth2Client:
if not isinstance(self.post_logout_redirect_uris, Unset): if not isinstance(self.post_logout_redirect_uris, Unset):
post_logout_redirect_uris = self.post_logout_redirect_uris post_logout_redirect_uris = self.post_logout_redirect_uris
redirect_uris: Union[Unset, List[str]] = UNSET redirect_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.redirect_uris, Unset): if not isinstance(self.redirect_uris, Unset):
redirect_uris = self.redirect_uris redirect_uris = self.redirect_uris
request_object_signing_alg = self.request_object_signing_alg request_object_signing_alg = self.request_object_signing_alg
request_uris: Union[Unset, List[str]] = UNSET request_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_uris, Unset): if not isinstance(self.request_uris, Unset):
request_uris = self.request_uris request_uris = self.request_uris
response_types: Union[Unset, List[str]] = UNSET response_types: Union[Unset, List[str]] = UNSET
if not isinstance(self.response_types, Unset): if not isinstance(self.response_types, Unset):
response_types = self.response_types response_types = self.response_types
scope = self.scope scope = self.scope
sector_identifier_uri = self.sector_identifier_uri sector_identifier_uri = self.sector_identifier_uri
subject_type = self.subject_type subject_type = self.subject_type
@ -211,7 +245,8 @@ class OAuth2Client:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if allowed_cors_origins is not UNSET: if allowed_cors_origins is not UNSET:
field_dict["allowed_cors_origins"] = allowed_cors_origins field_dict["allowed_cors_origins"] = allowed_cors_origins
if audience is not UNSET: if audience is not UNSET:
@ -281,13 +316,17 @@ class OAuth2Client:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
allowed_cors_origins = cast(List[str], _d.pop("allowed_cors_origins", UNSET)) allowed_cors_origins = cast(List[str], _d.pop("allowed_cors_origins", UNSET))
audience = cast(List[str], _d.pop("audience", UNSET)) audience = cast(List[str], _d.pop("audience", UNSET))
backchannel_logout_session_required = _d.pop("backchannel_logout_session_required", UNSET) backchannel_logout_session_required = _d.pop("backchannel_logout_session_required", UNSET)
backchannel_logout_uri = _d.pop("backchannel_logout_uri", UNSET) backchannel_logout_uri = _d.pop("backchannel_logout_uri", UNSET)
@ -304,6 +343,7 @@ class OAuth2Client:
contacts = cast(List[str], _d.pop("contacts", UNSET)) contacts = cast(List[str], _d.pop("contacts", UNSET))
_created_at = _d.pop("created_at", UNSET) _created_at = _d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime] created_at: Union[Unset, datetime.datetime]
if isinstance(_created_at, Unset): if isinstance(_created_at, Unset):
@ -311,12 +351,16 @@ class OAuth2Client:
else: else:
created_at = isoparse(_created_at) created_at = isoparse(_created_at)
frontchannel_logout_session_required = _d.pop("frontchannel_logout_session_required", UNSET) frontchannel_logout_session_required = _d.pop("frontchannel_logout_session_required", UNSET)
frontchannel_logout_uri = _d.pop("frontchannel_logout_uri", UNSET) frontchannel_logout_uri = _d.pop("frontchannel_logout_uri", UNSET)
grant_types = cast(List[str], _d.pop("grant_types", UNSET)) grant_types = cast(List[str], _d.pop("grant_types", UNSET))
_jwks = _d.pop("jwks", UNSET) _jwks = _d.pop("jwks", UNSET)
jwks: Union[Unset, JoseJSONWebKeySet] jwks: Union[Unset, JoseJSONWebKeySet]
if isinstance(_jwks, Unset): if isinstance(_jwks, Unset):
@ -324,6 +368,9 @@ class OAuth2Client:
else: else:
jwks = JoseJSONWebKeySet.from_dict(_jwks) jwks = JoseJSONWebKeySet.from_dict(_jwks)
jwks_uri = _d.pop("jwks_uri", UNSET) jwks_uri = _d.pop("jwks_uri", UNSET)
logo_uri = _d.pop("logo_uri", UNSET) logo_uri = _d.pop("logo_uri", UNSET)
@ -335,20 +382,27 @@ class OAuth2Client:
else: else:
metadata = JSONRawMessage.from_dict(_metadata) metadata = JSONRawMessage.from_dict(_metadata)
owner = _d.pop("owner", UNSET) owner = _d.pop("owner", UNSET)
policy_uri = _d.pop("policy_uri", UNSET) policy_uri = _d.pop("policy_uri", UNSET)
post_logout_redirect_uris = cast(List[str], _d.pop("post_logout_redirect_uris", UNSET)) post_logout_redirect_uris = cast(List[str], _d.pop("post_logout_redirect_uris", UNSET))
redirect_uris = cast(List[str], _d.pop("redirect_uris", UNSET)) redirect_uris = cast(List[str], _d.pop("redirect_uris", UNSET))
request_object_signing_alg = _d.pop("request_object_signing_alg", UNSET) request_object_signing_alg = _d.pop("request_object_signing_alg", UNSET)
request_uris = cast(List[str], _d.pop("request_uris", UNSET)) request_uris = cast(List[str], _d.pop("request_uris", UNSET))
response_types = cast(List[str], _d.pop("response_types", UNSET)) response_types = cast(List[str], _d.pop("response_types", UNSET))
scope = _d.pop("scope", UNSET) scope = _d.pop("scope", UNSET)
sector_identifier_uri = _d.pop("sector_identifier_uri", UNSET) sector_identifier_uri = _d.pop("sector_identifier_uri", UNSET)
@ -368,6 +422,9 @@ class OAuth2Client:
else: else:
updated_at = isoparse(_updated_at) updated_at = isoparse(_updated_at)
userinfo_signed_response_alg = _d.pop("userinfo_signed_response_alg", UNSET) userinfo_signed_response_alg = _d.pop("userinfo_signed_response_alg", UNSET)
o_auth_2_client = cls( o_auth_2_client = cls(

View file

@ -1,13 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2TokenIntrospection") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="OAuth2TokenIntrospection")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class OAuth2TokenIntrospection: class OAuth2TokenIntrospection:
"""https://tools.ietf.org/html/rfc7662 """https://tools.ietf.org/html/rfc7662
@ -54,7 +64,7 @@ class OAuth2TokenIntrospection:
aud: Union[Unset, List[str]] = UNSET aud: Union[Unset, List[str]] = UNSET
client_id: Union[Unset, str] = UNSET client_id: Union[Unset, str] = UNSET
exp: Union[Unset, int] = UNSET exp: Union[Unset, int] = UNSET
ext: Union[Unset, OAuth2TokenIntrospectionExt] = UNSET ext: Union[Unset, 'OAuth2TokenIntrospectionExt'] = UNSET
iat: Union[Unset, int] = UNSET iat: Union[Unset, int] = UNSET
iss: Union[Unset, str] = UNSET iss: Union[Unset, str] = UNSET
nbf: Union[Unset, int] = UNSET nbf: Union[Unset, int] = UNSET
@ -66,12 +76,16 @@ class OAuth2TokenIntrospection:
username: Union[Unset, str] = UNSET username: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
active = self.active active = self.active
aud: Union[Unset, List[str]] = UNSET aud: Union[Unset, List[str]] = UNSET
if not isinstance(self.aud, Unset): if not isinstance(self.aud, Unset):
aud = self.aud aud = self.aud
client_id = self.client_id client_id = self.client_id
exp = self.exp exp = self.exp
ext: Union[Unset, Dict[str, Any]] = UNSET ext: Union[Unset, Dict[str, Any]] = UNSET
@ -90,11 +104,9 @@ class OAuth2TokenIntrospection:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"active": active, "active": active,
} })
)
if aud is not UNSET: if aud is not UNSET:
field_dict["aud"] = aud field_dict["aud"] = aud
if client_id is not UNSET: if client_id is not UNSET:
@ -124,6 +136,8 @@ class OAuth2TokenIntrospection:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -131,6 +145,7 @@ class OAuth2TokenIntrospection:
aud = cast(List[str], _d.pop("aud", UNSET)) aud = cast(List[str], _d.pop("aud", UNSET))
client_id = _d.pop("client_id", UNSET) client_id = _d.pop("client_id", UNSET)
exp = _d.pop("exp", UNSET) exp = _d.pop("exp", UNSET)
@ -142,6 +157,9 @@ class OAuth2TokenIntrospection:
else: else:
ext = OAuth2TokenIntrospectionExt.from_dict(_ext) ext = OAuth2TokenIntrospectionExt.from_dict(_ext)
iat = _d.pop("iat", UNSET) iat = _d.pop("iat", UNSET)
iss = _d.pop("iss", UNSET) iss = _d.pop("iss", UNSET)

View file

@ -1,28 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="OAuth2TokenIntrospectionExt") from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2TokenIntrospectionExt")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class OAuth2TokenIntrospectionExt: class OAuth2TokenIntrospectionExt:
"""Extra is arbitrary data set by the session.""" """Extra is arbitrary data set by the session.
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
o_auth_2_token_introspection_ext = cls() o_auth_2_token_introspection_ext = cls(
)
o_auth_2_token_introspection_ext.additional_properties = _d o_auth_2_token_introspection_ext.additional_properties = _d
return o_auth_2_token_introspection_ext return o_auth_2_token_introspection_ext

View file

@ -0,0 +1,100 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Oauth2TokenData")
@attr.s(auto_attribs=True)
class Oauth2TokenData:
"""
Attributes:
grant_type (str):
code (Union[Unset, str]):
refresh_token (Union[Unset, str]):
redirect_uri (Union[Unset, str]):
client_id (Union[Unset, str]):
"""
grant_type: str
code: Union[Unset, str] = UNSET
refresh_token: Union[Unset, str] = UNSET
redirect_uri: Union[Unset, str] = UNSET
client_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
grant_type = self.grant_type
code = self.code
refresh_token = self.refresh_token
redirect_uri = self.redirect_uri
client_id = self.client_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"grant_type": grant_type,
})
if code is not UNSET:
field_dict["code"] = code
if refresh_token is not UNSET:
field_dict["refresh_token"] = refresh_token
if redirect_uri is not UNSET:
field_dict["redirect_uri"] = redirect_uri
if client_id is not UNSET:
field_dict["client_id"] = client_id
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
grant_type = _d.pop("grant_type")
code = _d.pop("code", UNSET)
refresh_token = _d.pop("refresh_token", UNSET)
redirect_uri = _d.pop("redirect_uri", UNSET)
client_id = _d.pop("client_id", UNSET)
oauth_2_token_data = cls(
grant_type=grant_type,
code=code,
refresh_token=refresh_token,
redirect_uri=redirect_uri,
client_id=client_id,
)
oauth_2_token_data.additional_properties = _d
return oauth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="Oauth2TokenResponse") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Oauth2TokenResponse")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class Oauth2TokenResponse: class Oauth2TokenResponse:
"""The Access Token Response """The Access Token Response
@ -28,6 +36,7 @@ class Oauth2TokenResponse:
token_type: Union[Unset, str] = UNSET token_type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
access_token = self.access_token access_token = self.access_token
expires_in = self.expires_in expires_in = self.expires_in
@ -38,7 +47,8 @@ class Oauth2TokenResponse:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if access_token is not UNSET: if access_token is not UNSET:
field_dict["access_token"] = access_token field_dict["access_token"] = access_token
if expires_in is not UNSET: if expires_in is not UNSET:
@ -54,6 +64,8 @@ class Oauth2TokenResponse:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,13 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="OpenIDConnectContext") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="OpenIDConnectContext")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class OpenIDConnectContext: class OpenIDConnectContext:
""" """
@ -58,16 +68,20 @@ class OpenIDConnectContext:
acr_values: Union[Unset, List[str]] = UNSET acr_values: Union[Unset, List[str]] = UNSET
display: Union[Unset, str] = UNSET display: Union[Unset, str] = UNSET
id_token_hint_claims: Union[Unset, OpenIDConnectContextIdTokenHintClaims] = UNSET id_token_hint_claims: Union[Unset, 'OpenIDConnectContextIdTokenHintClaims'] = UNSET
login_hint: Union[Unset, str] = UNSET login_hint: Union[Unset, str] = UNSET
ui_locales: Union[Unset, List[str]] = UNSET ui_locales: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
acr_values: Union[Unset, List[str]] = UNSET acr_values: Union[Unset, List[str]] = UNSET
if not isinstance(self.acr_values, Unset): if not isinstance(self.acr_values, Unset):
acr_values = self.acr_values acr_values = self.acr_values
display = self.display display = self.display
id_token_hint_claims: Union[Unset, Dict[str, Any]] = UNSET id_token_hint_claims: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.id_token_hint_claims, Unset): if not isinstance(self.id_token_hint_claims, Unset):
@ -78,9 +92,14 @@ class OpenIDConnectContext:
if not isinstance(self.ui_locales, Unset): if not isinstance(self.ui_locales, Unset):
ui_locales = self.ui_locales ui_locales = self.ui_locales
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if acr_values is not UNSET: if acr_values is not UNSET:
field_dict["acr_values"] = acr_values field_dict["acr_values"] = acr_values
if display is not UNSET: if display is not UNSET:
@ -94,11 +113,14 @@ class OpenIDConnectContext:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
acr_values = cast(List[str], _d.pop("acr_values", UNSET)) acr_values = cast(List[str], _d.pop("acr_values", UNSET))
display = _d.pop("display", UNSET) display = _d.pop("display", UNSET)
_id_token_hint_claims = _d.pop("id_token_hint_claims", UNSET) _id_token_hint_claims = _d.pop("id_token_hint_claims", UNSET)
@ -108,10 +130,14 @@ class OpenIDConnectContext:
else: else:
id_token_hint_claims = OpenIDConnectContextIdTokenHintClaims.from_dict(_id_token_hint_claims) id_token_hint_claims = OpenIDConnectContextIdTokenHintClaims.from_dict(_id_token_hint_claims)
login_hint = _d.pop("login_hint", UNSET) login_hint = _d.pop("login_hint", UNSET)
ui_locales = cast(List[str], _d.pop("ui_locales", UNSET)) ui_locales = cast(List[str], _d.pop("ui_locales", UNSET))
open_id_connect_context = cls( open_id_connect_context = cls(
acr_values=acr_values, acr_values=acr_values,
display=display, display=display,

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="OpenIDConnectContextIdTokenHintClaims") from ..types import UNSET, Unset
T = TypeVar("T", bound="OpenIDConnectContextIdTokenHintClaims")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class OpenIDConnectContextIdTokenHintClaims: class OpenIDConnectContextIdTokenHintClaims:
"""IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a """IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a
@ -15,18 +23,23 @@ class OpenIDConnectContextIdTokenHintClaims:
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
open_id_connect_context_id_token_hint_claims = cls() open_id_connect_context_id_token_hint_claims = cls(
)
open_id_connect_context_id_token_hint_claims.additional_properties = _d open_id_connect_context_id_token_hint_claims.additional_properties = _d
return open_id_connect_context_id_token_hint_claims return open_id_connect_context_id_token_hint_claims

View file

@ -1,20 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.plugin_config_args import PluginConfigArgs
from ..models.plugin_config_interface import PluginConfigInterface
from ..models.plugin_config_linux import PluginConfigLinux
from ..models.plugin_config_network import PluginConfigNetwork
from ..models.plugin_config_rootfs import PluginConfigRootfs
from ..models.plugin_config_user import PluginConfigUser
from ..models.plugin_env import PluginEnv
from ..models.plugin_mount import PluginMount
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfig") from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginConfig")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfig: class PluginConfig:
""" """
@ -23,11 +26,11 @@ class PluginConfig:
description (str): description description (str): description
documentation (str): documentation documentation (str): documentation
entrypoint (List[str]): entrypoint entrypoint (List[str]): entrypoint
env (List[PluginEnv]): env env (List['PluginEnv']): env
interface (PluginConfigInterface): PluginConfigInterface The interface between Docker and the plugin interface (PluginConfigInterface): PluginConfigInterface The interface between Docker and the plugin
ipc_host (bool): ipc host ipc_host (bool): ipc host
linux (PluginConfigLinux): PluginConfigLinux plugin config linux linux (PluginConfigLinux): PluginConfigLinux plugin config linux
mounts (List[PluginMount]): mounts mounts (List['PluginMount']): mounts
network (PluginConfigNetwork): PluginConfigNetwork plugin config network network (PluginConfigNetwork): PluginConfigNetwork plugin config network
pid_host (bool): pid host pid_host (bool): pid host
propagated_mount (str): propagated mount propagated_mount (str): propagated mount
@ -37,24 +40,25 @@ class PluginConfig:
rootfs (Union[Unset, PluginConfigRootfs]): PluginConfigRootfs plugin config rootfs rootfs (Union[Unset, PluginConfigRootfs]): PluginConfigRootfs plugin config rootfs
""" """
args: PluginConfigArgs args: 'PluginConfigArgs'
description: str description: str
documentation: str documentation: str
entrypoint: List[str] entrypoint: List[str]
env: List[PluginEnv] env: List['PluginEnv']
interface: PluginConfigInterface interface: 'PluginConfigInterface'
ipc_host: bool ipc_host: bool
linux: PluginConfigLinux linux: 'PluginConfigLinux'
mounts: List[PluginMount] mounts: List['PluginMount']
network: PluginConfigNetwork network: 'PluginConfigNetwork'
pid_host: bool pid_host: bool
propagated_mount: str propagated_mount: str
work_dir: str work_dir: str
docker_version: Union[Unset, str] = UNSET docker_version: Union[Unset, str] = UNSET
user: Union[Unset, PluginConfigUser] = UNSET user: Union[Unset, 'PluginConfigUser'] = UNSET
rootfs: Union[Unset, PluginConfigRootfs] = UNSET rootfs: Union[Unset, 'PluginConfigRootfs'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
args = self.args.to_dict() args = self.args.to_dict()
@ -62,12 +66,18 @@ class PluginConfig:
documentation = self.documentation documentation = self.documentation
entrypoint = self.entrypoint entrypoint = self.entrypoint
env = [] env = []
for env_item_data in self.env: for env_item_data in self.env:
env_item = env_item_data.to_dict() env_item = env_item_data.to_dict()
env.append(env_item) env.append(env_item)
interface = self.interface.to_dict() interface = self.interface.to_dict()
ipc_host = self.ipc_host ipc_host = self.ipc_host
@ -79,6 +89,9 @@ class PluginConfig:
mounts.append(mounts_item) mounts.append(mounts_item)
network = self.network.to_dict() network = self.network.to_dict()
pid_host = self.pid_host pid_host = self.pid_host
@ -93,10 +106,10 @@ class PluginConfig:
if not isinstance(self.rootfs, Unset): if not isinstance(self.rootfs, Unset):
rootfs = self.rootfs.to_dict() rootfs = self.rootfs.to_dict()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Args": args, "Args": args,
"Description": description, "Description": description,
"Documentation": documentation, "Documentation": documentation,
@ -110,8 +123,7 @@ class PluginConfig:
"PidHost": pid_host, "PidHost": pid_host,
"PropagatedMount": propagated_mount, "PropagatedMount": propagated_mount,
"WorkDir": work_dir, "WorkDir": work_dir,
} })
)
if docker_version is not UNSET: if docker_version is not UNSET:
field_dict["DockerVersion"] = docker_version field_dict["DockerVersion"] = docker_version
if user is not UNSET: if user is not UNSET:
@ -121,39 +133,60 @@ class PluginConfig:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
args = PluginConfigArgs.from_dict(_d.pop("Args")) args = PluginConfigArgs.from_dict(_d.pop("Args"))
description = _d.pop("Description") description = _d.pop("Description")
documentation = _d.pop("Documentation") documentation = _d.pop("Documentation")
entrypoint = cast(List[str], _d.pop("Entrypoint")) entrypoint = cast(List[str], _d.pop("Entrypoint"))
env = [] env = []
_env = _d.pop("Env") _env = _d.pop("Env")
for env_item_data in _env: for env_item_data in (_env):
env_item = PluginEnv.from_dict(env_item_data) env_item = PluginEnv.from_dict(env_item_data)
env.append(env_item) env.append(env_item)
interface = PluginConfigInterface.from_dict(_d.pop("Interface")) interface = PluginConfigInterface.from_dict(_d.pop("Interface"))
ipc_host = _d.pop("IpcHost") ipc_host = _d.pop("IpcHost")
linux = PluginConfigLinux.from_dict(_d.pop("Linux")) linux = PluginConfigLinux.from_dict(_d.pop("Linux"))
mounts = [] mounts = []
_mounts = _d.pop("Mounts") _mounts = _d.pop("Mounts")
for mounts_item_data in _mounts: for mounts_item_data in (_mounts):
mounts_item = PluginMount.from_dict(mounts_item_data) mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item) mounts.append(mounts_item)
network = PluginConfigNetwork.from_dict(_d.pop("Network")) network = PluginConfigNetwork.from_dict(_d.pop("Network"))
pid_host = _d.pop("PidHost") pid_host = _d.pop("PidHost")
propagated_mount = _d.pop("PropagatedMount") propagated_mount = _d.pop("PropagatedMount")
@ -169,6 +202,9 @@ class PluginConfig:
else: else:
user = PluginConfigUser.from_dict(_user) user = PluginConfigUser.from_dict(_user)
_rootfs = _d.pop("rootfs", UNSET) _rootfs = _d.pop("rootfs", UNSET)
rootfs: Union[Unset, PluginConfigRootfs] rootfs: Union[Unset, PluginConfigRootfs]
if isinstance(_rootfs, Unset): if isinstance(_rootfs, Unset):
@ -176,6 +212,9 @@ class PluginConfig:
else: else:
rootfs = PluginConfigRootfs.from_dict(_rootfs) rootfs = PluginConfigRootfs.from_dict(_rootfs)
plugin_config = cls( plugin_config = cls(
args=args, args=args,
description=description, description=description,

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginConfigArgs") from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginConfigArgs")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigArgs: class PluginConfigArgs:
@ -22,26 +31,34 @@ class PluginConfigArgs:
value: List[str] value: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
description = self.description description = self.description
name = self.name name = self.name
settable = self.settable settable = self.settable
value = self.value value = self.value
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Description": description, "Description": description,
"Name": name, "Name": name,
"Settable": settable, "Settable": settable,
"Value": value, "Value": value,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -51,8 +68,10 @@ class PluginConfigArgs:
settable = cast(List[str], _d.pop("Settable")) settable = cast(List[str], _d.pop("Settable"))
value = cast(List[str], _d.pop("Value")) value = cast(List[str], _d.pop("Value"))
plugin_config_args = cls( plugin_config_args = cls(
description=description, description=description,
name=name, name=name,

View file

@ -1,25 +1,35 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.plugin_interface_type import PluginInterfaceType from ..types import UNSET, Unset
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginConfigInterface") T = TypeVar("T", bound="PluginConfigInterface")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigInterface: class PluginConfigInterface:
"""PluginConfigInterface The interface between Docker and the plugin """PluginConfigInterface The interface between Docker and the plugin
Attributes: Attributes:
socket (str): socket socket (str): socket
types (List[PluginInterfaceType]): types types (List['PluginInterfaceType']): types
""" """
socket: str socket: str
types: List[PluginInterfaceType] types: List['PluginInterfaceType']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
socket = self.socket socket = self.socket
types = [] types = []
@ -28,17 +38,21 @@ class PluginConfigInterface:
types.append(types_item) types.append(types_item)
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Socket": socket, "Socket": socket,
"Types": types, "Types": types,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -46,11 +60,14 @@ class PluginConfigInterface:
types = [] types = []
_types = _d.pop("Types") _types = _d.pop("Types")
for types_item_data in _types: for types_item_data in (_types):
types_item = PluginInterfaceType.from_dict(types_item_data) types_item = PluginInterfaceType.from_dict(types_item_data)
types.append(types_item) types.append(types_item)
plugin_config_interface = cls( plugin_config_interface = cls(
socket=socket, socket=socket,
types=types, types=types,

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.plugin_device import PluginDevice from ..types import UNSET, Unset
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginConfigLinux") T = TypeVar("T", bound="PluginConfigLinux")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigLinux: class PluginConfigLinux:
"""PluginConfigLinux plugin config linux """PluginConfigLinux plugin config linux
@ -14,36 +23,44 @@ class PluginConfigLinux:
Attributes: Attributes:
allow_all_devices (bool): allow all devices allow_all_devices (bool): allow all devices
capabilities (List[str]): capabilities capabilities (List[str]): capabilities
devices (List[PluginDevice]): devices devices (List['PluginDevice']): devices
""" """
allow_all_devices: bool allow_all_devices: bool
capabilities: List[str] capabilities: List[str]
devices: List[PluginDevice] devices: List['PluginDevice']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
allow_all_devices = self.allow_all_devices allow_all_devices = self.allow_all_devices
capabilities = self.capabilities capabilities = self.capabilities
devices = [] devices = []
for devices_item_data in self.devices: for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict() devices_item = devices_item_data.to_dict()
devices.append(devices_item) devices.append(devices_item)
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"AllowAllDevices": allow_all_devices, "AllowAllDevices": allow_all_devices,
"Capabilities": capabilities, "Capabilities": capabilities,
"Devices": devices, "Devices": devices,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -51,13 +68,17 @@ class PluginConfigLinux:
capabilities = cast(List[str], _d.pop("Capabilities")) capabilities = cast(List[str], _d.pop("Capabilities"))
devices = [] devices = []
_devices = _d.pop("Devices") _devices = _d.pop("Devices")
for devices_item_data in _devices: for devices_item_data in (_devices):
devices_item = PluginDevice.from_dict(devices_item_data) devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item) devices.append(devices_item)
plugin_config_linux = cls( plugin_config_linux = cls(
allow_all_devices=allow_all_devices, allow_all_devices=allow_all_devices,
capabilities=capabilities, capabilities=capabilities,

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginConfigNetwork") from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigNetwork")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigNetwork: class PluginConfigNetwork:
"""PluginConfigNetwork plugin config network """PluginConfigNetwork plugin config network
@ -16,19 +24,20 @@ class PluginConfigNetwork:
type: str type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
type = self.type type = self.type
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Type": type, "Type": type,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigRootfs") from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="PluginConfigRootfs")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigRootfs: class PluginConfigRootfs:
"""PluginConfigRootfs plugin config rootfs """PluginConfigRootfs plugin config rootfs
@ -20,16 +29,21 @@ class PluginConfigRootfs:
type: Union[Unset, str] = UNSET type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
diff_ids: Union[Unset, List[str]] = UNSET diff_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.diff_ids, Unset): if not isinstance(self.diff_ids, Unset):
diff_ids = self.diff_ids diff_ids = self.diff_ids
type = self.type type = self.type
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if diff_ids is not UNSET: if diff_ids is not UNSET:
field_dict["diff_ids"] = diff_ids field_dict["diff_ids"] = diff_ids
if type is not UNSET: if type is not UNSET:
@ -37,11 +51,14 @@ class PluginConfigRootfs:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
diff_ids = cast(List[str], _d.pop("diff_ids", UNSET)) diff_ids = cast(List[str], _d.pop("diff_ids", UNSET))
type = _d.pop("type", UNSET) type = _d.pop("type", UNSET)
plugin_config_rootfs = cls( plugin_config_rootfs = cls(

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigUser") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="PluginConfigUser")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginConfigUser: class PluginConfigUser:
"""PluginConfigUser plugin config user """PluginConfigUser plugin config user
@ -20,13 +28,15 @@ class PluginConfigUser:
uid: Union[Unset, int] = UNSET uid: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
gid = self.gid gid = self.gid
uid = self.uid uid = self.uid
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if gid is not UNSET: if gid is not UNSET:
field_dict["GID"] = gid field_dict["GID"] = gid
if uid is not UNSET: if uid is not UNSET:
@ -34,6 +44,8 @@ class PluginConfigUser:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginDevice") from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginDevice")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginDevice: class PluginDevice:
@ -22,25 +31,30 @@ class PluginDevice:
settable: List[str] settable: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
description = self.description description = self.description
name = self.name name = self.name
path = self.path path = self.path
settable = self.settable settable = self.settable
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Description": description, "Description": description,
"Name": name, "Name": name,
"Path": path, "Path": path,
"Settable": settable, "Settable": settable,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -52,6 +66,7 @@ class PluginDevice:
settable = cast(List[str], _d.pop("Settable")) settable = cast(List[str], _d.pop("Settable"))
plugin_device = cls( plugin_device = cls(
description=description, description=description,
name=name, name=name,

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginEnv") from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginEnv")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginEnv: class PluginEnv:
@ -22,26 +31,30 @@ class PluginEnv:
value: str value: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
description = self.description description = self.description
name = self.name name = self.name
settable = self.settable settable = self.settable
value = self.value value = self.value
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Description": description, "Description": description,
"Name": name, "Name": name,
"Settable": settable, "Settable": settable,
"Value": value, "Value": value,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -51,6 +64,7 @@ class PluginEnv:
settable = cast(List[str], _d.pop("Settable")) settable = cast(List[str], _d.pop("Settable"))
value = _d.pop("Value") value = _d.pop("Value")
plugin_env = cls( plugin_env = cls(

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginInterfaceType") from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginInterfaceType")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginInterfaceType: class PluginInterfaceType:
"""PluginInterfaceType plugin interface type """PluginInterfaceType plugin interface type
@ -20,6 +28,7 @@ class PluginInterfaceType:
version: str version: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
capability = self.capability capability = self.capability
prefix = self.prefix prefix = self.prefix
@ -27,16 +36,16 @@ class PluginInterfaceType:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Capability": capability, "Capability": capability,
"Prefix": prefix, "Prefix": prefix,
"Version": version, "Version": version,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="PluginMount") from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginMount")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginMount: class PluginMount:
@ -28,21 +37,27 @@ class PluginMount:
type: str type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
description = self.description description = self.description
destination = self.destination destination = self.destination
name = self.name name = self.name
options = self.options options = self.options
settable = self.settable settable = self.settable
source = self.source source = self.source
type = self.type type = self.type
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Description": description, "Description": description,
"Destination": destination, "Destination": destination,
"Name": name, "Name": name,
@ -50,11 +65,12 @@ class PluginMount:
"Settable": settable, "Settable": settable,
"Source": source, "Source": source,
"Type": type, "Type": type,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -66,8 +82,10 @@ class PluginMount:
options = cast(List[str], _d.pop("Options")) options = cast(List[str], _d.pop("Options"))
settable = cast(List[str], _d.pop("Settable")) settable = cast(List[str], _d.pop("Settable"))
source = _d.pop("Source") source = _d.pop("Source")
type = _d.pop("Type") type = _d.pop("Type")

View file

@ -1,80 +1,110 @@
from typing import Any, Dict, List, Type, TypeVar, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..models.plugin_device import PluginDevice from ..types import UNSET, Unset
from ..models.plugin_mount import PluginMount
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginSettings") T = TypeVar("T", bound="PluginSettings")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PluginSettings: class PluginSettings:
""" """
Attributes: Attributes:
args (List[str]): args args (List[str]): args
devices (List[PluginDevice]): devices devices (List['PluginDevice']): devices
env (List[str]): env env (List[str]): env
mounts (List[PluginMount]): mounts mounts (List['PluginMount']): mounts
""" """
args: List[str] args: List[str]
devices: List[PluginDevice] devices: List['PluginDevice']
env: List[str] env: List[str]
mounts: List[PluginMount] mounts: List['PluginMount']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
args = self.args args = self.args
devices = [] devices = []
for devices_item_data in self.devices: for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict() devices_item = devices_item_data.to_dict()
devices.append(devices_item) devices.append(devices_item)
env = self.env env = self.env
mounts = [] mounts = []
for mounts_item_data in self.mounts: for mounts_item_data in self.mounts:
mounts_item = mounts_item_data.to_dict() mounts_item = mounts_item_data.to_dict()
mounts.append(mounts_item) mounts.append(mounts_item)
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"Args": args, "Args": args,
"Devices": devices, "Devices": devices,
"Env": env, "Env": env,
"Mounts": mounts, "Mounts": mounts,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
args = cast(List[str], _d.pop("Args")) args = cast(List[str], _d.pop("Args"))
devices = [] devices = []
_devices = _d.pop("Devices") _devices = _d.pop("Devices")
for devices_item_data in _devices: for devices_item_data in (_devices):
devices_item = PluginDevice.from_dict(devices_item_data) devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item) devices.append(devices_item)
env = cast(List[str], _d.pop("Env")) env = cast(List[str], _d.pop("Env"))
mounts = [] mounts = []
_mounts = _d.pop("Mounts") _mounts = _d.pop("Mounts")
for mounts_item_data in _mounts: for mounts_item_data in (_mounts):
mounts_item = PluginMount.from_dict(mounts_item_data) mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item) mounts.append(mounts_item)
plugin_settings = cls( plugin_settings = cls(
args=args, args=args,
devices=devices, devices=devices,

View file

@ -1,16 +1,25 @@
import datetime from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import List
import attr import attr
from dateutil.parser import isoparse
from ..models.consent_request import ConsentRequest
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="PreviousConsentSession") from dateutil.parser import isoparse
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="PreviousConsentSession")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class PreviousConsentSession: class PreviousConsentSession:
"""The response used to return used consent requests """The response used to return used consent requests
@ -30,15 +39,16 @@ class PreviousConsentSession:
session (Union[Unset, ConsentRequestSession]): session (Union[Unset, ConsentRequestSession]):
""" """
consent_request: Union[Unset, ConsentRequest] = UNSET consent_request: Union[Unset, 'ConsentRequest'] = UNSET
grant_access_token_audience: Union[Unset, List[str]] = UNSET grant_access_token_audience: Union[Unset, List[str]] = UNSET
grant_scope: Union[Unset, List[str]] = UNSET grant_scope: Union[Unset, List[str]] = UNSET
handled_at: Union[Unset, datetime.datetime] = UNSET handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET session: Union[Unset, 'ConsentRequestSession'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
consent_request: Union[Unset, Dict[str, Any]] = UNSET consent_request: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.consent_request, Unset): if not isinstance(self.consent_request, Unset):
@ -48,10 +58,16 @@ class PreviousConsentSession:
if not isinstance(self.grant_access_token_audience, Unset): if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset): if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset): if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat() handled_at = self.handled_at.isoformat()
@ -62,9 +78,11 @@ class PreviousConsentSession:
if not isinstance(self.session, Unset): if not isinstance(self.session, Unset):
session = self.session.to_dict() session = self.session.to_dict()
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if consent_request is not UNSET: if consent_request is not UNSET:
field_dict["consent_request"] = consent_request field_dict["consent_request"] = consent_request
if grant_access_token_audience is not UNSET: if grant_access_token_audience is not UNSET:
@ -82,6 +100,8 @@ class PreviousConsentSession:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -92,10 +112,15 @@ class PreviousConsentSession:
else: else:
consent_request = ConsentRequest.from_dict(_consent_request) consent_request = ConsentRequest.from_dict(_consent_request)
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET)) grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET)) grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET) _handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime] handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset): if isinstance(_handled_at, Unset):
@ -103,6 +128,9 @@ class PreviousConsentSession:
else: else:
handled_at = isoparse(_handled_at) handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET) remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET) remember_for = _d.pop("remember_for", UNSET)
@ -114,6 +142,9 @@ class PreviousConsentSession:
else: else:
session = ConsentRequestSession.from_dict(_session) session = ConsentRequestSession.from_dict(_session)
previous_consent_session = cls( previous_consent_session = cls(
consent_request=consent_request, consent_request=consent_request,
grant_access_token_audience=grant_access_token_audience, grant_access_token_audience=grant_access_token_audience,

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="RejectRequest") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="RejectRequest")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class RejectRequest: class RejectRequest:
""" """
@ -32,6 +40,7 @@ class RejectRequest:
status_code: Union[Unset, int] = UNSET status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
error = self.error error = self.error
error_debug = self.error_debug error_debug = self.error_debug
@ -41,7 +50,8 @@ class RejectRequest:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if error is not UNSET: if error is not UNSET:
field_dict["error"] = error field_dict["error"] = error
if error_debug is not UNSET: if error_debug is not UNSET:
@ -55,6 +65,8 @@ class RejectRequest:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -0,0 +1,66 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="RevokeOAuth2TokenData")
@attr.s(auto_attribs=True)
class RevokeOAuth2TokenData:
"""
Attributes:
token (str):
"""
token: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
token = self.token
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"token": token,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
token = _d.pop("token")
revoke_o_auth_2_token_data = cls(
token=token,
)
revoke_o_auth_2_token_data.additional_properties = _d
return revoke_o_auth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="UserinfoResponse") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="UserinfoResponse")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class UserinfoResponse: class UserinfoResponse:
"""The userinfo response """The userinfo response
@ -91,6 +99,7 @@ class UserinfoResponse:
zoneinfo: Union[Unset, str] = UNSET zoneinfo: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
birthdate = self.birthdate birthdate = self.birthdate
email = self.email email = self.email
@ -114,7 +123,8 @@ class UserinfoResponse:
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if birthdate is not UNSET: if birthdate is not UNSET:
field_dict["birthdate"] = birthdate field_dict["birthdate"] = birthdate
if email is not UNSET: if email is not UNSET:
@ -156,6 +166,8 @@ class UserinfoResponse:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="Version") from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Version")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class Version: class Version:
""" """
@ -17,17 +25,21 @@ class Version:
version: Union[Unset, str] = UNSET version: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
version = self.version version = self.version
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update({}) field_dict.update({
})
if version is not UNSET: if version is not UNSET:
field_dict["version"] = version field_dict["version"] = version
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
T = TypeVar("T", bound="VolumeUsageData") from ..types import UNSET, Unset
T = TypeVar("T", bound="VolumeUsageData")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class VolumeUsageData: class VolumeUsageData:
"""VolumeUsageData Usage details about the volume. This information is used by the """VolumeUsageData Usage details about the volume. This information is used by the
@ -23,21 +31,22 @@ class VolumeUsageData:
size: int size: int
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
ref_count = self.ref_count ref_count = self.ref_count
size = self.size size = self.size
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"RefCount": ref_count, "RefCount": ref_count,
"Size": size, "Size": size,
} })
)
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr import attr
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="WellKnown") from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="WellKnown")
@attr.s(auto_attribs=True) @attr.s(auto_attribs=True)
class WellKnown: class WellKnown:
"""It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature """It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature
@ -119,16 +128,26 @@ class WellKnown:
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
authorization_endpoint = self.authorization_endpoint authorization_endpoint = self.authorization_endpoint
id_token_signing_alg_values_supported = self.id_token_signing_alg_values_supported id_token_signing_alg_values_supported = self.id_token_signing_alg_values_supported
issuer = self.issuer issuer = self.issuer
jwks_uri = self.jwks_uri jwks_uri = self.jwks_uri
response_types_supported = self.response_types_supported response_types_supported = self.response_types_supported
subject_types_supported = self.subject_types_supported subject_types_supported = self.subject_types_supported
token_endpoint = self.token_endpoint token_endpoint = self.token_endpoint
backchannel_logout_session_supported = self.backchannel_logout_session_supported backchannel_logout_session_supported = self.backchannel_logout_session_supported
backchannel_logout_supported = self.backchannel_logout_supported backchannel_logout_supported = self.backchannel_logout_supported
@ -137,6 +156,9 @@ class WellKnown:
if not isinstance(self.claims_supported, Unset): if not isinstance(self.claims_supported, Unset):
claims_supported = self.claims_supported claims_supported = self.claims_supported
end_session_endpoint = self.end_session_endpoint end_session_endpoint = self.end_session_endpoint
frontchannel_logout_session_supported = self.frontchannel_logout_session_supported frontchannel_logout_session_supported = self.frontchannel_logout_session_supported
frontchannel_logout_supported = self.frontchannel_logout_supported frontchannel_logout_supported = self.frontchannel_logout_supported
@ -144,11 +166,17 @@ class WellKnown:
if not isinstance(self.grant_types_supported, Unset): if not isinstance(self.grant_types_supported, Unset):
grant_types_supported = self.grant_types_supported grant_types_supported = self.grant_types_supported
registration_endpoint = self.registration_endpoint registration_endpoint = self.registration_endpoint
request_object_signing_alg_values_supported: Union[Unset, List[str]] = UNSET request_object_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_object_signing_alg_values_supported, Unset): if not isinstance(self.request_object_signing_alg_values_supported, Unset):
request_object_signing_alg_values_supported = self.request_object_signing_alg_values_supported request_object_signing_alg_values_supported = self.request_object_signing_alg_values_supported
request_parameter_supported = self.request_parameter_supported request_parameter_supported = self.request_parameter_supported
request_uri_parameter_supported = self.request_uri_parameter_supported request_uri_parameter_supported = self.request_uri_parameter_supported
require_request_uri_registration = self.require_request_uri_registration require_request_uri_registration = self.require_request_uri_registration
@ -156,24 +184,36 @@ class WellKnown:
if not isinstance(self.response_modes_supported, Unset): if not isinstance(self.response_modes_supported, Unset):
response_modes_supported = self.response_modes_supported response_modes_supported = self.response_modes_supported
revocation_endpoint = self.revocation_endpoint revocation_endpoint = self.revocation_endpoint
scopes_supported: Union[Unset, List[str]] = UNSET scopes_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.scopes_supported, Unset): if not isinstance(self.scopes_supported, Unset):
scopes_supported = self.scopes_supported scopes_supported = self.scopes_supported
token_endpoint_auth_methods_supported: Union[Unset, List[str]] = UNSET token_endpoint_auth_methods_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.token_endpoint_auth_methods_supported, Unset): if not isinstance(self.token_endpoint_auth_methods_supported, Unset):
token_endpoint_auth_methods_supported = self.token_endpoint_auth_methods_supported token_endpoint_auth_methods_supported = self.token_endpoint_auth_methods_supported
userinfo_endpoint = self.userinfo_endpoint userinfo_endpoint = self.userinfo_endpoint
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.userinfo_signing_alg_values_supported, Unset): if not isinstance(self.userinfo_signing_alg_values_supported, Unset):
userinfo_signing_alg_values_supported = self.userinfo_signing_alg_values_supported userinfo_signing_alg_values_supported = self.userinfo_signing_alg_values_supported
field_dict: Dict[str, Any] = {} field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties) field_dict.update(self.additional_properties)
field_dict.update( field_dict.update({
{
"authorization_endpoint": authorization_endpoint, "authorization_endpoint": authorization_endpoint,
"id_token_signing_alg_values_supported": id_token_signing_alg_values_supported, "id_token_signing_alg_values_supported": id_token_signing_alg_values_supported,
"issuer": issuer, "issuer": issuer,
@ -181,8 +221,7 @@ class WellKnown:
"response_types_supported": response_types_supported, "response_types_supported": response_types_supported,
"subject_types_supported": subject_types_supported, "subject_types_supported": subject_types_supported,
"token_endpoint": token_endpoint, "token_endpoint": token_endpoint,
} })
)
if backchannel_logout_session_supported is not UNSET: if backchannel_logout_session_supported is not UNSET:
field_dict["backchannel_logout_session_supported"] = backchannel_logout_session_supported field_dict["backchannel_logout_session_supported"] = backchannel_logout_session_supported
if backchannel_logout_supported is not UNSET: if backchannel_logout_supported is not UNSET:
@ -224,6 +263,8 @@ class WellKnown:
return field_dict return field_dict
@classmethod @classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy() _d = src_dict.copy()
@ -231,14 +272,17 @@ class WellKnown:
id_token_signing_alg_values_supported = cast(List[str], _d.pop("id_token_signing_alg_values_supported")) id_token_signing_alg_values_supported = cast(List[str], _d.pop("id_token_signing_alg_values_supported"))
issuer = _d.pop("issuer") issuer = _d.pop("issuer")
jwks_uri = _d.pop("jwks_uri") jwks_uri = _d.pop("jwks_uri")
response_types_supported = cast(List[str], _d.pop("response_types_supported")) response_types_supported = cast(List[str], _d.pop("response_types_supported"))
subject_types_supported = cast(List[str], _d.pop("subject_types_supported")) subject_types_supported = cast(List[str], _d.pop("subject_types_supported"))
token_endpoint = _d.pop("token_endpoint") token_endpoint = _d.pop("token_endpoint")
backchannel_logout_session_supported = _d.pop("backchannel_logout_session_supported", UNSET) backchannel_logout_session_supported = _d.pop("backchannel_logout_session_supported", UNSET)
@ -249,6 +293,7 @@ class WellKnown:
claims_supported = cast(List[str], _d.pop("claims_supported", UNSET)) claims_supported = cast(List[str], _d.pop("claims_supported", UNSET))
end_session_endpoint = _d.pop("end_session_endpoint", UNSET) end_session_endpoint = _d.pop("end_session_endpoint", UNSET)
frontchannel_logout_session_supported = _d.pop("frontchannel_logout_session_supported", UNSET) frontchannel_logout_session_supported = _d.pop("frontchannel_logout_session_supported", UNSET)
@ -257,11 +302,11 @@ class WellKnown:
grant_types_supported = cast(List[str], _d.pop("grant_types_supported", UNSET)) grant_types_supported = cast(List[str], _d.pop("grant_types_supported", UNSET))
registration_endpoint = _d.pop("registration_endpoint", UNSET) registration_endpoint = _d.pop("registration_endpoint", UNSET)
request_object_signing_alg_values_supported = cast( request_object_signing_alg_values_supported = cast(List[str], _d.pop("request_object_signing_alg_values_supported", UNSET))
List[str], _d.pop("request_object_signing_alg_values_supported", UNSET)
)
request_parameter_supported = _d.pop("request_parameter_supported", UNSET) request_parameter_supported = _d.pop("request_parameter_supported", UNSET)
@ -271,16 +316,20 @@ class WellKnown:
response_modes_supported = cast(List[str], _d.pop("response_modes_supported", UNSET)) response_modes_supported = cast(List[str], _d.pop("response_modes_supported", UNSET))
revocation_endpoint = _d.pop("revocation_endpoint", UNSET) revocation_endpoint = _d.pop("revocation_endpoint", UNSET)
scopes_supported = cast(List[str], _d.pop("scopes_supported", UNSET)) scopes_supported = cast(List[str], _d.pop("scopes_supported", UNSET))
token_endpoint_auth_methods_supported = cast(List[str], _d.pop("token_endpoint_auth_methods_supported", UNSET)) token_endpoint_auth_methods_supported = cast(List[str], _d.pop("token_endpoint_auth_methods_supported", UNSET))
userinfo_endpoint = _d.pop("userinfo_endpoint", UNSET) userinfo_endpoint = _d.pop("userinfo_endpoint", UNSET)
userinfo_signing_alg_values_supported = cast(List[str], _d.pop("userinfo_signing_alg_values_supported", UNSET)) userinfo_signing_alg_values_supported = cast(List[str], _d.pop("userinfo_signing_alg_values_supported", UNSET))
well_known = cls( well_known = cls(
authorization_endpoint=authorization_endpoint, authorization_endpoint=authorization_endpoint,
id_token_signing_alg_values_supported=id_token_signing_alg_values_supported, id_token_signing_alg_values_supported=id_token_signing_alg_values_supported,

View file

@ -1,5 +1,5 @@
""" Contains some shared types for properties """ """ Contains some shared types for properties """
from typing import BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar
import attr import attr

View file

@ -13,6 +13,6 @@ setup(
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
packages=find_packages(), packages=find_packages(),
python_requires=">=3.7, <4", python_requires=">=3.7, <4",
install_requires=["httpx >= 0.15.0, < 0.23.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"], install_requires=["httpx >= 0.15.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
package_data={"ory_hydra_client": ["py.typed"]}, package_data={"ory_hydra_client": ["py.typed"]},
) )