Proper class names (#272)

* 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>
This commit is contained in:
Jess Frazelle
2024-09-10 15:24:19 -07:00
committed by GitHub
parent 65d40767fa
commit 4ee77bb1cf
21 changed files with 1286 additions and 1266 deletions

View File

@ -11,7 +11,7 @@ from ..models.rtc_ice_candidate_init import RtcIceCandidateInit
from ..models.rtc_session_description import RtcSessionDescription
class trickle_ice(BaseModel):
class OptionTrickleIce(BaseModel):
"""The trickle ICE candidate request."""
candidate: RtcIceCandidateInit
@ -21,7 +21,7 @@ class trickle_ice(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class sdp_offer(BaseModel):
class OptionSdpOffer(BaseModel):
"""The SDP offer request."""
offer: RtcSessionDescription
@ -31,7 +31,7 @@ class sdp_offer(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class modeling_cmd_req(BaseModel):
class OptionModelingCmdReq(BaseModel):
"""The modeling command request."""
cmd: ModelingCmd
@ -43,7 +43,7 @@ class modeling_cmd_req(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class modeling_cmd_batch_req(BaseModel):
class OptionModelingCmdBatchReq(BaseModel):
"""A sequence of modeling requests. If any request fails, following requests will not be tried."""
batch_id: ModelingCmdId
@ -57,7 +57,7 @@ class modeling_cmd_batch_req(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class ping(BaseModel):
class OptionPing(BaseModel):
"""The client-to-server Ping to ensure the WebSocket stays alive."""
type: Literal["ping"] = "ping"
@ -65,7 +65,7 @@ class ping(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class metrics_response(BaseModel):
class OptionMetricsResponse(BaseModel):
"""The response to a metrics collection request from the server."""
metrics: ClientMetrics
@ -75,7 +75,7 @@ class metrics_response(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class headers(BaseModel):
class OptionHeaders(BaseModel):
"""Authentication header request."""
headers: Dict[str, str]
@ -88,13 +88,13 @@ class headers(BaseModel):
WebSocketRequest = RootModel[
Annotated[
Union[
trickle_ice,
sdp_offer,
modeling_cmd_req,
modeling_cmd_batch_req,
ping,
metrics_response,
headers,
OptionTrickleIce,
OptionSdpOffer,
OptionModelingCmdReq,
OptionModelingCmdBatchReq,
OptionPing,
OptionMetricsResponse,
OptionHeaders,
],
Field(discriminator="type"),
]