* towards proper class names Signed-off-by: Jess Frazelle <github@jessfraz.com> * mypy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * I have generated the latest API! --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
38 lines
825 B
Python
38 lines
825 B
Python
from typing import Literal, Union
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
|
from typing_extensions import Annotated
|
|
|
|
from .base64data import Base64Data
|
|
|
|
|
|
class OptionUrl(BaseModel):
|
|
"""A URL to the identity provider metadata descriptor."""
|
|
|
|
type: Literal["url"] = "url"
|
|
|
|
url: str
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
|
class OptionBase64EncodedXml(BaseModel):
|
|
"""A base64 encoded XML document containing the identity provider metadata descriptor."""
|
|
|
|
data: Base64Data
|
|
|
|
type: Literal["base64_encoded_xml"] = "base64_encoded_xml"
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
|
IdpMetadataSource = RootModel[
|
|
Annotated[
|
|
Union[
|
|
OptionUrl,
|
|
OptionBase64EncodedXml,
|
|
],
|
|
Field(discriminator="type"),
|
|
]
|
|
]
|