Files
kittycad.py/kittycad/models/ok_web_socket_response_data.py
zoo-github-actions-auth[bot] 042bb964e5 Update api spec (#202)
* YOYO NEW API SPEC!

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-03-04 12:53:31 -08:00

149 lines
2.9 KiB
Python

from typing import List, Literal, Union
from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated
from ..models.ice_server import IceServer
from ..models.ok_modeling_cmd_response import OkModelingCmdResponse
from ..models.raw_file import RawFile
from ..models.rtc_ice_candidate_init import RtcIceCandidateInit
from ..models.rtc_session_description import RtcSessionDescription
class IceServerInfoData(BaseModel):
""""""
ice_servers: List[IceServer]
model_config = ConfigDict(protected_namespaces=())
class ice_server_info(BaseModel):
"""Information about the ICE servers."""
data: IceServerInfoData
type: Literal["ice_server_info"] = "ice_server_info"
model_config = ConfigDict(protected_namespaces=())
class TrickleIceData(BaseModel):
""""""
candidate: RtcIceCandidateInit
model_config = ConfigDict(protected_namespaces=())
class trickle_ice(BaseModel):
"""The trickle ICE candidate response."""
data: TrickleIceData
type: Literal["trickle_ice"] = "trickle_ice"
model_config = ConfigDict(protected_namespaces=())
class SdpAnswerData(BaseModel):
""""""
answer: RtcSessionDescription
model_config = ConfigDict(protected_namespaces=())
class sdp_answer(BaseModel):
"""The SDP answer response."""
data: SdpAnswerData
type: Literal["sdp_answer"] = "sdp_answer"
model_config = ConfigDict(protected_namespaces=())
class ModelingData(BaseModel):
""""""
modeling_response: OkModelingCmdResponse
model_config = ConfigDict(protected_namespaces=())
class modeling(BaseModel):
"""The modeling command response."""
data: ModelingData
type: Literal["modeling"] = "modeling"
model_config = ConfigDict(protected_namespaces=())
class ExportData(BaseModel):
""""""
files: List[RawFile]
model_config = ConfigDict(protected_namespaces=())
class export(BaseModel):
"""The exported files."""
data: ExportData
type: Literal["export"] = "export"
model_config = ConfigDict(protected_namespaces=())
class MetricsRequestData(BaseModel):
""""""
model_config = ConfigDict(protected_namespaces=())
class metrics_request(BaseModel):
"""Request a collection of metrics, to include WebRTC."""
data: MetricsRequestData
type: Literal["metrics_request"] = "metrics_request"
model_config = ConfigDict(protected_namespaces=())
class PongData(BaseModel):
""""""
model_config = ConfigDict(protected_namespaces=())
class pong(BaseModel):
"""Pong response to a Ping message."""
data: PongData
type: Literal["pong"] = "pong"
model_config = ConfigDict(protected_namespaces=())
OkWebSocketResponseData = RootModel[
Annotated[
Union[
ice_server_info,
trickle_ice,
sdp_answer,
modeling,
export,
metrics_request,
pong,
],
Field(discriminator="type"),
]
]