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

@ -412,7 +412,7 @@ def generateTypeAndExamplePython(
and "enum" in one_of["properties"]["type"] and "enum" in one_of["properties"]["type"]
): ):
return generateTypeAndExamplePython( return generateTypeAndExamplePython(
one_of["properties"]["type"]["enum"][0], snake_to_title("option_" + one_of["properties"]["type"]["enum"][0]),
one_of, one_of,
data, data,
camel_to_snake(name), camel_to_snake(name),
@ -1508,7 +1508,7 @@ def generateUnionType(
else: else:
template_info["types"].append( template_info["types"].append(
{ {
"name": rename_if_keyword(type), "name": snake_to_title(type),
"var0": randletter(), "var0": randletter(),
"var1": randletter(), "var1": randletter(),
"check": "type", "check": "type",
@ -1625,27 +1625,37 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
f.write(content_code) f.write(content_code)
f.write("\n") f.write("\n")
object_code = generateObjectTypeCode( object_code = generateObjectTypeCode(
object_name, one_of, "object", data, tag, content object_name, one_of, "object", data, tag, content, True
) )
f.write(object_code) f.write(object_code)
f.write("\n") f.write("\n")
all_options.append(object_name) all_options.append("option_" + object_name)
elif tag is not None: elif tag is not None:
# Generate each of the options from the tag. # Generate each of the options from the tag.
for one_of in schema["oneOf"]: for one_of in schema["oneOf"]:
# Get the value of the tag. # Get the value of the tag.
object_name = one_of["properties"][tag]["enum"][0] object_name = one_of["properties"][tag]["enum"][0]
object_code = generateObjectTypeCode( object_code = generateObjectTypeCode(
object_name, object_name, one_of, "object", data, tag, None, True
one_of,
"object",
data,
tag,
None,
) )
f.write(object_code) f.write(object_code)
f.write("\n") f.write("\n")
all_options.append(object_name) all_options.append("option_" + object_name)
elif schema["oneOf"].__len__() == 1:
description = getOneOfDescription(schema)
object_code = generateObjectTypeCode(
name,
schema["oneOf"][0],
"object",
data,
None,
None,
)
f.write(object_code)
f.write("\n")
f.close()
# return early.
return
else: else:
# Generate each of the options from the tag. # Generate each of the options from the tag.
i = 0 i = 0
@ -1688,6 +1698,7 @@ def generateObjectTypeCode(
data: dict, data: dict,
tag: Optional[str], tag: Optional[str],
content: Optional[str], content: Optional[str],
is_option: bool = False,
) -> str: ) -> str:
FieldType = TypedDict( FieldType = TypedDict(
"FieldType", "FieldType",
@ -1765,10 +1776,13 @@ def generateObjectTypeCode(
} }
fields.append(field2) fields.append(field2)
name = snake_to_title(name)
if is_option:
name = "Option" + name
template_info: TemplateType = { template_info: TemplateType = {
"fields": fields, "fields": fields,
"description": description, "description": description,
"name": rename_if_keyword(name), "name": name,
"imports": imports, "imports": imports,
} }
@ -2049,7 +2063,9 @@ def camel_to_screaming_snake(name: str):
# Change `file_conversion` to `FileConversion` # Change `file_conversion` to `FileConversion`
def snake_to_title(name: str): def snake_to_title(name: str):
return name.title().replace("_", "").replace("3D", "3d") if "_" in name or name.islower():
return "".join([word.title() for word in name.split("_")])
return name
def get_function_parameters( def get_function_parameters(

File diff suppressed because it is too large Load Diff

View File

@ -51,14 +51,14 @@ from .models import (
WebSocketRequest, WebSocketRequest,
WebSocketResponse, WebSocketResponse,
) )
from .models.input_format import obj from .models.input_format import OptionObj
from .models.modeling_cmd import ( from .models.modeling_cmd import (
default_camera_focus_on, OptionDefaultCameraFocusOn,
import_files, OptionImportFiles,
start_path, OptionStartPath,
take_snapshot, OptionTakeSnapshot,
) )
from .models.web_socket_request import modeling_cmd_req from .models.web_socket_request import OptionModelingCmdReq
from .types import Unset from .types import Unset
@ -367,7 +367,9 @@ def test_ws_simple():
# Send a message. # Send a message.
id = uuid.uuid4() id = uuid.uuid4()
req = WebSocketRequest( req = WebSocketRequest(
modeling_cmd_req(cmd=ModelingCmd(start_path()), cmd_id=ModelingCmdId(id)) OptionModelingCmdReq(
cmd=ModelingCmd(OptionStartPath()), cmd_id=ModelingCmdId(id)
)
) )
websocket.send(req) websocket.send(req)
@ -403,12 +405,12 @@ def test_ws_import():
ImportFile(data=content, path=file_name) ImportFile(data=content, path=file_name)
# form the request # form the request
req = WebSocketRequest( req = WebSocketRequest(
modeling_cmd_req( OptionModelingCmdReq(
cmd=ModelingCmd( cmd=ModelingCmd(
import_files( OptionImportFiles(
files=[ImportFile(data=content, path=file_name)], files=[ImportFile(data=content, path=file_name)],
format=InputFormat( format=InputFormat(
obj( OptionObj(
units=UnitLength.M, units=UnitLength.M,
coords=System( coords=System(
forward=AxisDirectionPair( forward=AxisDirectionPair(
@ -457,8 +459,8 @@ def test_ws_import():
cmd_id = uuid.uuid4() cmd_id = uuid.uuid4()
# form the request # form the request
req = WebSocketRequest( req = WebSocketRequest(
modeling_cmd_req( OptionModelingCmdReq(
cmd=ModelingCmd(default_camera_focus_on(uuid=object_id)), cmd=ModelingCmd(OptionDefaultCameraFocusOn(uuid=object_id)),
cmd_id=ModelingCmdId(cmd_id), cmd_id=ModelingCmdId(cmd_id),
) )
) )
@ -482,8 +484,8 @@ def test_ws_import():
# form the request # form the request
# form the request # form the request
req = WebSocketRequest( req = WebSocketRequest(
modeling_cmd_req( OptionModelingCmdReq(
cmd=ModelingCmd(take_snapshot(format=ImageFormat.PNG)), cmd=ModelingCmd(OptionTakeSnapshot(format=ImageFormat.PNG)),
cmd_id=ModelingCmdId(cmd_id), cmd_id=ModelingCmdId(cmd_id),
) )
) )

View File

@ -226,10 +226,13 @@ from kittycad.models.billing_info import BillingInfo
from kittycad.models.code_language import CodeLanguage from kittycad.models.code_language import CodeLanguage
from kittycad.models.created_at_sort_mode import CreatedAtSortMode from kittycad.models.created_at_sort_mode import CreatedAtSortMode
from kittycad.models.email_authentication_form import EmailAuthenticationForm from kittycad.models.email_authentication_form import EmailAuthenticationForm
from kittycad.models.event import Event, modeling_app_event from kittycad.models.event import Event, OptionModelingAppEvent
from kittycad.models.file_export_format import FileExportFormat from kittycad.models.file_export_format import FileExportFormat
from kittycad.models.file_import_format import FileImportFormat from kittycad.models.file_import_format import FileImportFormat
from kittycad.models.idp_metadata_source import IdpMetadataSource, base64_encoded_xml from kittycad.models.idp_metadata_source import (
IdpMetadataSource,
OptionBase64EncodedXml,
)
from kittycad.models.kcl_code_completion_params import KclCodeCompletionParams from kittycad.models.kcl_code_completion_params import KclCodeCompletionParams
from kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest from kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest
from kittycad.models.ml_feedback import MlFeedback from kittycad.models.ml_feedback import MlFeedback
@ -253,7 +256,7 @@ from kittycad.models.source_position import SourcePosition
from kittycad.models.source_range import SourceRange from kittycad.models.source_range import SourceRange
from kittycad.models.source_range_prompt import SourceRangePrompt from kittycad.models.source_range_prompt import SourceRangePrompt
from kittycad.models.store_coupon_params import StoreCouponParams from kittycad.models.store_coupon_params import StoreCouponParams
from kittycad.models.subscription_tier_price import SubscriptionTierPrice, per_user from kittycad.models.subscription_tier_price import OptionPerUser, SubscriptionTierPrice
from kittycad.models.text_to_cad_create_body import TextToCadCreateBody from kittycad.models.text_to_cad_create_body import TextToCadCreateBody
from kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody from kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody
from kittycad.models.unit_angle import UnitAngle from kittycad.models.unit_angle import UnitAngle
@ -275,7 +278,7 @@ from kittycad.models.update_payment_balance import UpdatePaymentBalance
from kittycad.models.update_user import UpdateUser from kittycad.models.update_user import UpdateUser
from kittycad.models.user_org_role import UserOrgRole from kittycad.models.user_org_role import UserOrgRole
from kittycad.models.uuid import Uuid from kittycad.models.uuid import Uuid
from kittycad.models.web_socket_request import sdp_offer from kittycad.models.web_socket_request import OptionSdpOffer
from kittycad.models.zoo_product_subscriptions_org_request import ( from kittycad.models.zoo_product_subscriptions_org_request import (
ZooProductSubscriptionsOrgRequest, ZooProductSubscriptionsOrgRequest,
) )
@ -1160,7 +1163,7 @@ def test_create_event():
result: Optional[Error] = create_event.sync( result: Optional[Error] = create_event.sync(
client=client, client=client,
body=Event( body=Event(
modeling_app_event( OptionModelingAppEvent(
created_at=datetime.datetime.now(), created_at=datetime.datetime.now(),
event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE, event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,
project_name="<string>", project_name="<string>",
@ -1181,7 +1184,7 @@ def test_create_event():
response: Response[Optional[Error]] = create_event.sync_detailed( response: Response[Optional[Error]] = create_event.sync_detailed(
client=client, client=client,
body=Event( body=Event(
modeling_app_event( OptionModelingAppEvent(
created_at=datetime.datetime.now(), created_at=datetime.datetime.now(),
event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE, event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,
project_name="<string>", project_name="<string>",
@ -1202,7 +1205,7 @@ async def test_create_event_async():
result: Optional[Error] = await create_event.asyncio( result: Optional[Error] = await create_event.asyncio(
client=client, client=client,
body=Event( body=Event(
modeling_app_event( OptionModelingAppEvent(
created_at=datetime.datetime.now(), created_at=datetime.datetime.now(),
event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE, event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,
project_name="<string>", project_name="<string>",
@ -1216,7 +1219,7 @@ async def test_create_event_async():
response: Response[Optional[Error]] = await create_event.asyncio_detailed( response: Response[Optional[Error]] = await create_event.asyncio_detailed(
client=client, client=client,
body=Event( body=Event(
modeling_app_event( OptionModelingAppEvent(
created_at=datetime.datetime.now(), created_at=datetime.datetime.now(),
event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE, event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,
project_name="<string>", project_name="<string>",
@ -3401,7 +3404,7 @@ def test_update_org_saml_idp():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3423,7 +3426,7 @@ def test_update_org_saml_idp():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3447,7 +3450,7 @@ async def test_update_org_saml_idp_async():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3463,7 +3466,7 @@ async def test_update_org_saml_idp_async():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3482,7 +3485,7 @@ def test_create_org_saml_idp():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3504,7 +3507,7 @@ def test_create_org_saml_idp():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3528,7 +3531,7 @@ async def test_create_org_saml_idp_async():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3544,7 +3547,7 @@ async def test_create_org_saml_idp_async():
body=SamlIdentityProviderCreate( body=SamlIdentityProviderCreate(
idp_entity_id="<string>", idp_entity_id="<string>",
idp_metadata_source=IdpMetadataSource( idp_metadata_source=IdpMetadataSource(
base64_encoded_xml( OptionBase64EncodedXml(
data=Base64Data(b"<bytes>"), data=Base64Data(b"<bytes>"),
) )
), ),
@ -3906,7 +3909,7 @@ def test_update_enterprise_pricing_for_org():
client=client, client=client,
id=Uuid("<string>"), id=Uuid("<string>"),
body=SubscriptionTierPrice( body=SubscriptionTierPrice(
per_user( OptionPerUser(
interval=PlanInterval.DAY, interval=PlanInterval.DAY,
price=3.14, price=3.14,
) )
@ -3927,7 +3930,7 @@ def test_update_enterprise_pricing_for_org():
client=client, client=client,
id=Uuid("<string>"), id=Uuid("<string>"),
body=SubscriptionTierPrice( body=SubscriptionTierPrice(
per_user( OptionPerUser(
interval=PlanInterval.DAY, interval=PlanInterval.DAY,
price=3.14, price=3.14,
) )
@ -3949,7 +3952,7 @@ async def test_update_enterprise_pricing_for_org_async():
client=client, client=client,
id=Uuid("<string>"), id=Uuid("<string>"),
body=SubscriptionTierPrice( body=SubscriptionTierPrice(
per_user( OptionPerUser(
interval=PlanInterval.DAY, interval=PlanInterval.DAY,
price=3.14, price=3.14,
) )
@ -3963,7 +3966,7 @@ async def test_update_enterprise_pricing_for_org_async():
client=client, client=client,
id=Uuid("<string>"), id=Uuid("<string>"),
body=SubscriptionTierPrice( body=SubscriptionTierPrice(
per_user( OptionPerUser(
interval=PlanInterval.DAY, interval=PlanInterval.DAY,
price=3.14, price=3.14,
) )
@ -6989,7 +6992,7 @@ def test_modeling_commands_ws():
# Send a message. # Send a message.
websocket.send( websocket.send(
WebSocketRequest( WebSocketRequest(
sdp_offer( OptionSdpOffer(
offer=RtcSessionDescription( offer=RtcSessionDescription(
sdp="<string>", sdp="<string>",
type=RtcSdpType.UNSPECIFIED, type=RtcSdpType.UNSPECIFIED,

View File

@ -22,7 +22,7 @@ from ..models.uuid import Uuid
from .base64data import Base64Data from .base64data import Base64Data
class file_conversion(BaseModel): class OptionFileConversion(BaseModel):
"""A file conversion.""" """A file conversion."""
completed_at: Optional[datetime.datetime] = None completed_at: Optional[datetime.datetime] = None
@ -56,7 +56,7 @@ class file_conversion(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class file_center_of_mass(BaseModel): class OptionFileCenterOfMass(BaseModel):
"""File center of mass.""" """File center of mass."""
center_of_mass: Optional[Point3d] = None center_of_mass: Optional[Point3d] = None
@ -86,7 +86,7 @@ class file_center_of_mass(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class file_mass(BaseModel): class OptionFileMass(BaseModel):
"""A file mass.""" """A file mass."""
completed_at: Optional[datetime.datetime] = None completed_at: Optional[datetime.datetime] = None
@ -120,7 +120,7 @@ class file_mass(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class file_volume(BaseModel): class OptionFileVolume(BaseModel):
"""A file volume.""" """A file volume."""
completed_at: Optional[datetime.datetime] = None completed_at: Optional[datetime.datetime] = None
@ -150,7 +150,7 @@ class file_volume(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class file_density(BaseModel): class OptionFileDensity(BaseModel):
"""A file density.""" """A file density."""
completed_at: Optional[datetime.datetime] = None completed_at: Optional[datetime.datetime] = None
@ -184,7 +184,7 @@ class file_density(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class file_surface_area(BaseModel): class OptionFileSurfaceArea(BaseModel):
"""A file surface area.""" """A file surface area."""
completed_at: Optional[datetime.datetime] = None completed_at: Optional[datetime.datetime] = None
@ -214,7 +214,7 @@ class file_surface_area(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class text_to_cad(BaseModel): class OptionTextToCad(BaseModel):
"""Text to CAD.""" """Text to CAD."""
code: Optional[str] = None code: Optional[str] = None
@ -252,7 +252,7 @@ class text_to_cad(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class text_to_cad_iteration(BaseModel): class OptionTextToCadIteration(BaseModel):
"""Text to CAD iteration.""" """Text to CAD iteration."""
code: str code: str
@ -293,14 +293,14 @@ class text_to_cad_iteration(BaseModel):
AsyncApiCallOutput = RootModel[ AsyncApiCallOutput = RootModel[
Annotated[ Annotated[
Union[ Union[
file_conversion, OptionFileConversion,
file_center_of_mass, OptionFileCenterOfMass,
file_mass, OptionFileMass,
file_volume, OptionFileVolume,
file_density, OptionFileDensity,
file_surface_area, OptionFileSurfaceArea,
text_to_cad, OptionTextToCad,
text_to_cad_iteration, OptionTextToCadIteration,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -3,13 +3,13 @@ from typing import Union
from pydantic import BaseModel, ConfigDict, RootModel from pydantic import BaseModel, ConfigDict, RootModel
class response(BaseModel): class Response(BaseModel):
"""Response to the modeling command.""" """Response to the modeling command."""
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class errors(BaseModel): class Errors(BaseModel):
"""Errors that occurred during the modeling command.""" """Errors that occurred during the modeling command."""
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
@ -17,7 +17,7 @@ class errors(BaseModel):
BatchResponse = RootModel[ BatchResponse = RootModel[
Union[ Union[
response, Response,
errors, Errors,
] ]
] ]

View File

@ -6,7 +6,7 @@ from typing_extensions import Annotated
from ..models.global_axis import GlobalAxis from ..models.global_axis import GlobalAxis
class euclidean(BaseModel): class OptionEuclidean(BaseModel):
"""Euclidean Distance.""" """Euclidean Distance."""
type: Literal["euclidean"] = "euclidean" type: Literal["euclidean"] = "euclidean"
@ -14,7 +14,7 @@ class euclidean(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class on_axis(BaseModel): class OptionOnAxis(BaseModel):
"""The distance between objects along the specified axis""" """The distance between objects along the specified axis"""
axis: GlobalAxis axis: GlobalAxis
@ -27,8 +27,8 @@ class on_axis(BaseModel):
DistanceType = RootModel[ DistanceType = RootModel[
Annotated[ Annotated[
Union[ Union[
euclidean, OptionEuclidean,
on_axis, OptionOnAxis,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -7,7 +7,7 @@ from typing_extensions import Annotated
from ..models.modeling_app_event_type import ModelingAppEventType from ..models.modeling_app_event_type import ModelingAppEventType
class modeling_app_event(BaseModel): class OptionModelingAppEvent(BaseModel):
"""An event related to modeling app files""" """An event related to modeling app files"""
attachment_uri: Optional[str] = None attachment_uri: Optional[str] = None
@ -31,4 +31,6 @@ class modeling_app_event(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
Event = RootModel[Annotated[Union[modeling_app_event,], Field(discriminator="type")]] Event = RootModel[
Annotated[Union[OptionModelingAppEvent,], Field(discriminator="type")]
]

View File

@ -6,7 +6,7 @@ from typing_extensions import Annotated
from .base64data import Base64Data from .base64data import Base64Data
class url(BaseModel): class OptionUrl(BaseModel):
"""A URL to the identity provider metadata descriptor.""" """A URL to the identity provider metadata descriptor."""
type: Literal["url"] = "url" type: Literal["url"] = "url"
@ -16,7 +16,7 @@ class url(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class base64_encoded_xml(BaseModel): class OptionBase64EncodedXml(BaseModel):
"""A base64 encoded XML document containing the identity provider metadata descriptor.""" """A base64 encoded XML document containing the identity provider metadata descriptor."""
data: Base64Data data: Base64Data
@ -29,8 +29,8 @@ class base64_encoded_xml(BaseModel):
IdpMetadataSource = RootModel[ IdpMetadataSource = RootModel[
Annotated[ Annotated[
Union[ Union[
url, OptionUrl,
base64_encoded_xml, OptionBase64EncodedXml,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -7,7 +7,7 @@ from ..models.system import System
from ..models.unit_length import UnitLength from ..models.unit_length import UnitLength
class fbx(BaseModel): class OptionFbx(BaseModel):
"""Autodesk Filmbox (FBX) format.""" """Autodesk Filmbox (FBX) format."""
type: Literal["fbx"] = "fbx" type: Literal["fbx"] = "fbx"
@ -15,7 +15,7 @@ class fbx(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class gltf(BaseModel): class OptionGltf(BaseModel):
"""Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" """Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb)."""
type: Literal["gltf"] = "gltf" type: Literal["gltf"] = "gltf"
@ -23,7 +23,7 @@ class gltf(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class obj(BaseModel): class OptionObj(BaseModel):
"""Wavefront OBJ format.""" """Wavefront OBJ format."""
coords: System coords: System
@ -35,7 +35,7 @@ class obj(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class ply(BaseModel): class OptionPly(BaseModel):
"""The PLY Polygon File Format.""" """The PLY Polygon File Format."""
coords: System coords: System
@ -47,7 +47,7 @@ class ply(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class sldprt(BaseModel): class OptionSldprt(BaseModel):
"""SolidWorks part (SLDPRT) format.""" """SolidWorks part (SLDPRT) format."""
split_closed_faces: bool = False split_closed_faces: bool = False
@ -57,7 +57,7 @@ class sldprt(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class step(BaseModel): class OptionStep(BaseModel):
"""ISO 10303-21 (STEP) format.""" """ISO 10303-21 (STEP) format."""
split_closed_faces: bool = False split_closed_faces: bool = False
@ -67,7 +67,7 @@ class step(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class stl(BaseModel): class OptionStl(BaseModel):
"""*ST**ereo**L**ithography format.""" """*ST**ereo**L**ithography format."""
coords: System coords: System
@ -82,13 +82,13 @@ class stl(BaseModel):
InputFormat = RootModel[ InputFormat = RootModel[
Annotated[ Annotated[
Union[ Union[
fbx, OptionFbx,
gltf, OptionGltf,
obj, OptionObj,
ply, OptionPly,
sldprt, OptionSldprt,
step, OptionStep,
stl, OptionStl,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@ from ..models.volume import Volume
from ..models.zoom_to_fit import ZoomToFit from ..models.zoom_to_fit import ZoomToFit
class empty(BaseModel): class OptionEmpty(BaseModel):
"""An empty response, used for any command that does not explicitly have a response defined here.""" """An empty response, used for any command that does not explicitly have a response defined here."""
type: Literal["empty"] = "empty" type: Literal["empty"] = "empty"
@ -68,7 +68,7 @@ class empty(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class export(BaseModel): class OptionExport(BaseModel):
"""The response to the 'Export' endpoint""" """The response to the 'Export' endpoint"""
data: Export data: Export
@ -78,7 +78,7 @@ class export(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class select_with_point(BaseModel): class OptionSelectWithPoint(BaseModel):
"""The response to the 'SelectWithPoint' endpoint""" """The response to the 'SelectWithPoint' endpoint"""
data: SelectWithPoint data: SelectWithPoint
@ -88,7 +88,7 @@ class select_with_point(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class highlight_set_entity(BaseModel): class OptionHighlightSetEntity(BaseModel):
"""The response to the 'HighlightSetEntity' endpoint""" """The response to the 'HighlightSetEntity' endpoint"""
data: HighlightSetEntity data: HighlightSetEntity
@ -98,7 +98,7 @@ class highlight_set_entity(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_child_uuid(BaseModel): class OptionEntityGetChildUuid(BaseModel):
"""The response to the 'EntityGetChildUuid' endpoint""" """The response to the 'EntityGetChildUuid' endpoint"""
data: EntityGetChildUuid data: EntityGetChildUuid
@ -108,7 +108,7 @@ class entity_get_child_uuid(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_num_children(BaseModel): class OptionEntityGetNumChildren(BaseModel):
"""The response to the 'EntityGetNumChildren' endpoint""" """The response to the 'EntityGetNumChildren' endpoint"""
data: EntityGetNumChildren data: EntityGetNumChildren
@ -118,7 +118,7 @@ class entity_get_num_children(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_parent_id(BaseModel): class OptionEntityGetParentId(BaseModel):
"""The response to the 'EntityGetParentId' endpoint""" """The response to the 'EntityGetParentId' endpoint"""
data: EntityGetParentId data: EntityGetParentId
@ -128,7 +128,7 @@ class entity_get_parent_id(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_all_child_uuids(BaseModel): class OptionEntityGetAllChildUuids(BaseModel):
"""The response to the 'EntityGetAllChildUuids' endpoint""" """The response to the 'EntityGetAllChildUuids' endpoint"""
data: EntityGetAllChildUuids data: EntityGetAllChildUuids
@ -138,7 +138,7 @@ class entity_get_all_child_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_sketch_paths(BaseModel): class OptionEntityGetSketchPaths(BaseModel):
"""The response to the 'EntityGetSketchPaths' endpoint""" """The response to the 'EntityGetSketchPaths' endpoint"""
data: EntityGetSketchPaths data: EntityGetSketchPaths
@ -148,7 +148,7 @@ class entity_get_sketch_paths(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class loft(BaseModel): class OptionLoft(BaseModel):
"""The response to the 'Loft' endpoint""" """The response to the 'Loft' endpoint"""
data: Loft data: Loft
@ -158,7 +158,7 @@ class loft(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class close_path(BaseModel): class OptionClosePath(BaseModel):
"""The response to the 'ClosePath' endpoint""" """The response to the 'ClosePath' endpoint"""
data: ClosePath data: ClosePath
@ -168,7 +168,7 @@ class close_path(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class camera_drag_move(BaseModel): class OptionCameraDragMove(BaseModel):
"""The response to the 'CameraDragMove' endpoint""" """The response to the 'CameraDragMove' endpoint"""
data: CameraDragMove data: CameraDragMove
@ -178,7 +178,7 @@ class camera_drag_move(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class camera_drag_end(BaseModel): class OptionCameraDragEnd(BaseModel):
"""The response to the 'CameraDragEnd' endpoint""" """The response to the 'CameraDragEnd' endpoint"""
data: CameraDragEnd data: CameraDragEnd
@ -188,7 +188,7 @@ class camera_drag_end(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class default_camera_get_settings(BaseModel): class OptionDefaultCameraGetSettings(BaseModel):
"""The response to the 'DefaultCameraGetSettings' endpoint""" """The response to the 'DefaultCameraGetSettings' endpoint"""
data: DefaultCameraGetSettings data: DefaultCameraGetSettings
@ -198,7 +198,7 @@ class default_camera_get_settings(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class default_camera_zoom(BaseModel): class OptionDefaultCameraZoom(BaseModel):
"""The response to the 'DefaultCameraZoom' endpoint""" """The response to the 'DefaultCameraZoom' endpoint"""
data: DefaultCameraZoom data: DefaultCameraZoom
@ -208,7 +208,7 @@ class default_camera_zoom(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class zoom_to_fit(BaseModel): class OptionZoomToFit(BaseModel):
"""The response to the 'ZoomToFit' endpoint""" """The response to the 'ZoomToFit' endpoint"""
data: ZoomToFit data: ZoomToFit
@ -218,7 +218,7 @@ class zoom_to_fit(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class view_isometric(BaseModel): class OptionViewIsometric(BaseModel):
"""The response to the 'ViewIsometric' endpoint""" """The response to the 'ViewIsometric' endpoint"""
data: ViewIsometric data: ViewIsometric
@ -228,7 +228,7 @@ class view_isometric(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class get_num_objects(BaseModel): class OptionGetNumObjects(BaseModel):
"""The response to the 'GetNumObjects' endpoint""" """The response to the 'GetNumObjects' endpoint"""
data: GetNumObjects data: GetNumObjects
@ -238,7 +238,7 @@ class get_num_objects(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class default_camera_focus_on(BaseModel): class OptionDefaultCameraFocusOn(BaseModel):
"""The response to the 'DefaultCameraFocusOn' endpoint""" """The response to the 'DefaultCameraFocusOn' endpoint"""
data: DefaultCameraFocusOn data: DefaultCameraFocusOn
@ -248,7 +248,7 @@ class default_camera_focus_on(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class select_get(BaseModel): class OptionSelectGet(BaseModel):
"""The response to the 'SelectGet' endpoint""" """The response to the 'SelectGet' endpoint"""
data: SelectGet data: SelectGet
@ -258,7 +258,7 @@ class select_get(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_all_edge_faces(BaseModel): class OptionSolid3DGetAllEdgeFaces(BaseModel):
"""The response to the 'Solid3dGetAllEdgeFaces' endpoint""" """The response to the 'Solid3dGetAllEdgeFaces' endpoint"""
data: Solid3dGetAllEdgeFaces data: Solid3dGetAllEdgeFaces
@ -268,7 +268,7 @@ class solid3d_get_all_edge_faces(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_all_opposite_edges(BaseModel): class OptionSolid3DGetAllOppositeEdges(BaseModel):
"""The response to the 'Solid3dGetAllOppositeEdges' endpoint""" """The response to the 'Solid3dGetAllOppositeEdges' endpoint"""
data: Solid3dGetAllOppositeEdges data: Solid3dGetAllOppositeEdges
@ -278,7 +278,7 @@ class solid3d_get_all_opposite_edges(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_opposite_edge(BaseModel): class OptionSolid3DGetOppositeEdge(BaseModel):
"""The response to the 'Solid3dGetOppositeEdge' endpoint""" """The response to the 'Solid3dGetOppositeEdge' endpoint"""
data: Solid3dGetOppositeEdge data: Solid3dGetOppositeEdge
@ -288,7 +288,7 @@ class solid3d_get_opposite_edge(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_next_adjacent_edge(BaseModel): class OptionSolid3DGetNextAdjacentEdge(BaseModel):
"""The response to the 'Solid3dGetNextAdjacentEdge' endpoint""" """The response to the 'Solid3dGetNextAdjacentEdge' endpoint"""
data: Solid3dGetNextAdjacentEdge data: Solid3dGetNextAdjacentEdge
@ -298,7 +298,7 @@ class solid3d_get_next_adjacent_edge(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_prev_adjacent_edge(BaseModel): class OptionSolid3DGetPrevAdjacentEdge(BaseModel):
"""The response to the 'Solid3dGetPrevAdjacentEdge' endpoint""" """The response to the 'Solid3dGetPrevAdjacentEdge' endpoint"""
data: Solid3dGetPrevAdjacentEdge data: Solid3dGetPrevAdjacentEdge
@ -308,7 +308,7 @@ class solid3d_get_prev_adjacent_edge(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class get_entity_type(BaseModel): class OptionGetEntityType(BaseModel):
"""The response to the 'GetEntityType' endpoint""" """The response to the 'GetEntityType' endpoint"""
data: GetEntityType data: GetEntityType
@ -318,7 +318,7 @@ class get_entity_type(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class curve_get_control_points(BaseModel): class OptionCurveGetControlPoints(BaseModel):
"""The response to the 'CurveGetControlPoints' endpoint""" """The response to the 'CurveGetControlPoints' endpoint"""
data: CurveGetControlPoints data: CurveGetControlPoints
@ -328,7 +328,7 @@ class curve_get_control_points(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class curve_get_type(BaseModel): class OptionCurveGetType(BaseModel):
"""The response to the 'CurveGetType' endpoint""" """The response to the 'CurveGetType' endpoint"""
data: CurveGetType data: CurveGetType
@ -338,7 +338,7 @@ class curve_get_type(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class mouse_click(BaseModel): class OptionMouseClick(BaseModel):
"""The response to the 'MouseClick' endpoint""" """The response to the 'MouseClick' endpoint"""
data: MouseClick data: MouseClick
@ -348,7 +348,7 @@ class mouse_click(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class take_snapshot(BaseModel): class OptionTakeSnapshot(BaseModel):
"""The response to the 'TakeSnapshot' endpoint""" """The response to the 'TakeSnapshot' endpoint"""
data: TakeSnapshot data: TakeSnapshot
@ -358,7 +358,7 @@ class take_snapshot(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_info(BaseModel): class OptionPathGetInfo(BaseModel):
"""The response to the 'PathGetInfo' endpoint""" """The response to the 'PathGetInfo' endpoint"""
data: PathGetInfo data: PathGetInfo
@ -368,7 +368,7 @@ class path_get_info(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_segment_info(BaseModel): class OptionPathSegmentInfo(BaseModel):
"""The response to the 'PathSegmentInfo' endpoint""" """The response to the 'PathSegmentInfo' endpoint"""
data: PathSegmentInfo data: PathSegmentInfo
@ -378,7 +378,7 @@ class path_segment_info(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_curve_uuids_for_vertices(BaseModel): class OptionPathGetCurveUuidsForVertices(BaseModel):
"""The response to the 'PathGetCurveUuidsForVertices' endpoint""" """The response to the 'PathGetCurveUuidsForVertices' endpoint"""
data: PathGetCurveUuidsForVertices data: PathGetCurveUuidsForVertices
@ -390,7 +390,7 @@ class path_get_curve_uuids_for_vertices(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_curve_uuid(BaseModel): class OptionPathGetCurveUuid(BaseModel):
"""The response to the 'PathGetCurveUuid' endpoint""" """The response to the 'PathGetCurveUuid' endpoint"""
data: PathGetCurveUuid data: PathGetCurveUuid
@ -400,7 +400,7 @@ class path_get_curve_uuid(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_vertex_uuids(BaseModel): class OptionPathGetVertexUuids(BaseModel):
"""The response to the 'PathGetVertexUuids' endpoint""" """The response to the 'PathGetVertexUuids' endpoint"""
data: PathGetVertexUuids data: PathGetVertexUuids
@ -410,7 +410,7 @@ class path_get_vertex_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_sketch_target_uuid(BaseModel): class OptionPathGetSketchTargetUuid(BaseModel):
"""The response to the 'PathGetSketchTargetUuid' endpoint""" """The response to the 'PathGetSketchTargetUuid' endpoint"""
data: PathGetSketchTargetUuid data: PathGetSketchTargetUuid
@ -420,7 +420,7 @@ class path_get_sketch_target_uuid(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class curve_get_end_points(BaseModel): class OptionCurveGetEndPoints(BaseModel):
"""The response to the 'CurveGetEndPoints' endpoint""" """The response to the 'CurveGetEndPoints' endpoint"""
data: CurveGetEndPoints data: CurveGetEndPoints
@ -430,7 +430,7 @@ class curve_get_end_points(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class face_is_planar(BaseModel): class OptionFaceIsPlanar(BaseModel):
"""The response to the 'FaceIsPlanar' endpoint""" """The response to the 'FaceIsPlanar' endpoint"""
data: FaceIsPlanar data: FaceIsPlanar
@ -440,7 +440,7 @@ class face_is_planar(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class face_get_position(BaseModel): class OptionFaceGetPosition(BaseModel):
"""The response to the 'FaceGetPosition' endpoint""" """The response to the 'FaceGetPosition' endpoint"""
data: FaceGetPosition data: FaceGetPosition
@ -450,7 +450,7 @@ class face_get_position(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class face_get_center(BaseModel): class OptionFaceGetCenter(BaseModel):
"""The response to the 'FaceGetCenter' endpoint""" """The response to the 'FaceGetCenter' endpoint"""
data: FaceGetCenter data: FaceGetCenter
@ -460,7 +460,7 @@ class face_get_center(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class face_get_gradient(BaseModel): class OptionFaceGetGradient(BaseModel):
"""The response to the 'FaceGetGradient' endpoint""" """The response to the 'FaceGetGradient' endpoint"""
data: FaceGetGradient data: FaceGetGradient
@ -470,7 +470,7 @@ class face_get_gradient(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class plane_intersect_and_project(BaseModel): class OptionPlaneIntersectAndProject(BaseModel):
"""The response to the 'PlaneIntersectAndProject' endpoint""" """The response to the 'PlaneIntersectAndProject' endpoint"""
data: PlaneIntersectAndProject data: PlaneIntersectAndProject
@ -480,7 +480,7 @@ class plane_intersect_and_project(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class import_files(BaseModel): class OptionImportFiles(BaseModel):
"""The response to the 'ImportFiles' endpoint""" """The response to the 'ImportFiles' endpoint"""
data: ImportFiles data: ImportFiles
@ -490,7 +490,7 @@ class import_files(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class imported_geometry(BaseModel): class OptionImportedGeometry(BaseModel):
"""The response to the 'ImportedGeometry' endpoint""" """The response to the 'ImportedGeometry' endpoint"""
data: ImportedGeometry data: ImportedGeometry
@ -500,7 +500,7 @@ class imported_geometry(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class mass(BaseModel): class OptionMass(BaseModel):
"""The response to the 'Mass' endpoint""" """The response to the 'Mass' endpoint"""
data: Mass data: Mass
@ -510,7 +510,7 @@ class mass(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class volume(BaseModel): class OptionVolume(BaseModel):
"""The response to the 'Volume' endpoint""" """The response to the 'Volume' endpoint"""
data: Volume data: Volume
@ -520,7 +520,7 @@ class volume(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class density(BaseModel): class OptionDensity(BaseModel):
"""The response to the 'Density' endpoint""" """The response to the 'Density' endpoint"""
data: Density data: Density
@ -530,7 +530,7 @@ class density(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class surface_area(BaseModel): class OptionSurfaceArea(BaseModel):
"""The response to the 'SurfaceArea' endpoint""" """The response to the 'SurfaceArea' endpoint"""
data: SurfaceArea data: SurfaceArea
@ -540,7 +540,7 @@ class surface_area(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class center_of_mass(BaseModel): class OptionCenterOfMass(BaseModel):
"""The response to the 'CenterOfMass' endpoint""" """The response to the 'CenterOfMass' endpoint"""
data: CenterOfMass data: CenterOfMass
@ -550,7 +550,7 @@ class center_of_mass(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class get_sketch_mode_plane(BaseModel): class OptionGetSketchModePlane(BaseModel):
"""The response to the 'GetSketchModePlane' endpoint""" """The response to the 'GetSketchModePlane' endpoint"""
data: GetSketchModePlane data: GetSketchModePlane
@ -560,7 +560,7 @@ class get_sketch_mode_plane(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_distance(BaseModel): class OptionEntityGetDistance(BaseModel):
"""The response to the 'EntityGetDistance' endpoint""" """The response to the 'EntityGetDistance' endpoint"""
data: EntityGetDistance data: EntityGetDistance
@ -570,7 +570,7 @@ class entity_get_distance(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_linear_pattern_transform(BaseModel): class OptionEntityLinearPatternTransform(BaseModel):
"""The response to the 'EntityLinearPatternTransform' endpoint""" """The response to the 'EntityLinearPatternTransform' endpoint"""
data: EntityLinearPatternTransform data: EntityLinearPatternTransform
@ -580,7 +580,7 @@ class entity_linear_pattern_transform(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_linear_pattern(BaseModel): class OptionEntityLinearPattern(BaseModel):
"""The response to the 'EntityLinearPattern' endpoint""" """The response to the 'EntityLinearPattern' endpoint"""
data: EntityLinearPattern data: EntityLinearPattern
@ -590,7 +590,7 @@ class entity_linear_pattern(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_circular_pattern(BaseModel): class OptionEntityCircularPattern(BaseModel):
"""The response to the 'EntityCircularPattern' endpoint""" """The response to the 'EntityCircularPattern' endpoint"""
data: EntityCircularPattern data: EntityCircularPattern
@ -600,7 +600,7 @@ class entity_circular_pattern(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class solid3d_get_extrusion_face_info(BaseModel): class OptionSolid3DGetExtrusionFaceInfo(BaseModel):
"""The response to the 'Solid3dGetExtrusionFaceInfo' endpoint""" """The response to the 'Solid3dGetExtrusionFaceInfo' endpoint"""
data: Solid3dGetExtrusionFaceInfo data: Solid3dGetExtrusionFaceInfo
@ -610,7 +610,7 @@ class solid3d_get_extrusion_face_info(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class extrusion_face_info(BaseModel): class OptionExtrusionFaceInfo(BaseModel):
"""The response to the 'ExtrusionFaceInfo' endpoint""" """The response to the 'ExtrusionFaceInfo' endpoint"""
data: ExtrusionFaceInfo data: ExtrusionFaceInfo
@ -623,62 +623,62 @@ class extrusion_face_info(BaseModel):
OkModelingCmdResponse = RootModel[ OkModelingCmdResponse = RootModel[
Annotated[ Annotated[
Union[ Union[
empty, OptionEmpty,
export, OptionExport,
select_with_point, OptionSelectWithPoint,
highlight_set_entity, OptionHighlightSetEntity,
entity_get_child_uuid, OptionEntityGetChildUuid,
entity_get_num_children, OptionEntityGetNumChildren,
entity_get_parent_id, OptionEntityGetParentId,
entity_get_all_child_uuids, OptionEntityGetAllChildUuids,
entity_get_sketch_paths, OptionEntityGetSketchPaths,
loft, OptionLoft,
close_path, OptionClosePath,
camera_drag_move, OptionCameraDragMove,
camera_drag_end, OptionCameraDragEnd,
default_camera_get_settings, OptionDefaultCameraGetSettings,
default_camera_zoom, OptionDefaultCameraZoom,
zoom_to_fit, OptionZoomToFit,
view_isometric, OptionViewIsometric,
get_num_objects, OptionGetNumObjects,
default_camera_focus_on, OptionDefaultCameraFocusOn,
select_get, OptionSelectGet,
solid3d_get_all_edge_faces, OptionSolid3DGetAllEdgeFaces,
solid3d_get_all_opposite_edges, OptionSolid3DGetAllOppositeEdges,
solid3d_get_opposite_edge, OptionSolid3DGetOppositeEdge,
solid3d_get_next_adjacent_edge, OptionSolid3DGetNextAdjacentEdge,
solid3d_get_prev_adjacent_edge, OptionSolid3DGetPrevAdjacentEdge,
get_entity_type, OptionGetEntityType,
curve_get_control_points, OptionCurveGetControlPoints,
curve_get_type, OptionCurveGetType,
mouse_click, OptionMouseClick,
take_snapshot, OptionTakeSnapshot,
path_get_info, OptionPathGetInfo,
path_segment_info, OptionPathSegmentInfo,
path_get_curve_uuids_for_vertices, OptionPathGetCurveUuidsForVertices,
path_get_curve_uuid, OptionPathGetCurveUuid,
path_get_vertex_uuids, OptionPathGetVertexUuids,
path_get_sketch_target_uuid, OptionPathGetSketchTargetUuid,
curve_get_end_points, OptionCurveGetEndPoints,
face_is_planar, OptionFaceIsPlanar,
face_get_position, OptionFaceGetPosition,
face_get_center, OptionFaceGetCenter,
face_get_gradient, OptionFaceGetGradient,
plane_intersect_and_project, OptionPlaneIntersectAndProject,
import_files, OptionImportFiles,
imported_geometry, OptionImportedGeometry,
mass, OptionMass,
volume, OptionVolume,
density, OptionDensity,
surface_area, OptionSurfaceArea,
center_of_mass, OptionCenterOfMass,
get_sketch_mode_plane, OptionGetSketchModePlane,
entity_get_distance, OptionEntityGetDistance,
entity_linear_pattern_transform, OptionEntityLinearPatternTransform,
entity_linear_pattern, OptionEntityLinearPattern,
entity_circular_pattern, OptionEntityCircularPattern,
solid3d_get_extrusion_face_info, OptionSolid3DGetExtrusionFaceInfo,
extrusion_face_info, OptionExtrusionFaceInfo,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -20,7 +20,7 @@ class IceServerInfoData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class ice_server_info(BaseModel): class OptionIceServerInfo(BaseModel):
"""Information about the ICE servers.""" """Information about the ICE servers."""
data: IceServerInfoData data: IceServerInfoData
@ -38,7 +38,7 @@ class TrickleIceData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class trickle_ice(BaseModel): class OptionTrickleIce(BaseModel):
"""The trickle ICE candidate response.""" """The trickle ICE candidate response."""
data: TrickleIceData data: TrickleIceData
@ -56,7 +56,7 @@ class SdpAnswerData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class sdp_answer(BaseModel): class OptionSdpAnswer(BaseModel):
"""The SDP answer response.""" """The SDP answer response."""
data: SdpAnswerData data: SdpAnswerData
@ -74,7 +74,7 @@ class ModelingData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class modeling(BaseModel): class OptionModeling(BaseModel):
"""The modeling command response.""" """The modeling command response."""
data: ModelingData data: ModelingData
@ -92,7 +92,7 @@ class ModelingBatchData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class modeling_batch(BaseModel): class OptionModelingBatch(BaseModel):
"""Response to a ModelingBatch.""" """Response to a ModelingBatch."""
data: ModelingBatchData data: ModelingBatchData
@ -110,7 +110,7 @@ class ExportData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class export(BaseModel): class OptionExport(BaseModel):
"""The exported files.""" """The exported files."""
data: ExportData data: ExportData
@ -126,7 +126,7 @@ class MetricsRequestData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class metrics_request(BaseModel): class OptionMetricsRequest(BaseModel):
"""Request a collection of metrics, to include WebRTC.""" """Request a collection of metrics, to include WebRTC."""
data: MetricsRequestData data: MetricsRequestData
@ -144,7 +144,7 @@ class ModelingSessionDataData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class modeling_session_data(BaseModel): class OptionModelingSessionData(BaseModel):
"""Data about the Modeling Session (application-level).""" """Data about the Modeling Session (application-level)."""
data: ModelingSessionDataData data: ModelingSessionDataData
@ -160,7 +160,7 @@ class PongData(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class pong(BaseModel): class OptionPong(BaseModel):
"""Pong response to a Ping message.""" """Pong response to a Ping message."""
data: PongData data: PongData
@ -173,15 +173,15 @@ class pong(BaseModel):
OkWebSocketResponseData = RootModel[ OkWebSocketResponseData = RootModel[
Annotated[ Annotated[
Union[ Union[
ice_server_info, OptionIceServerInfo,
trickle_ice, OptionTrickleIce,
sdp_answer, OptionSdpAnswer,
modeling, OptionModeling,
modeling_batch, OptionModelingBatch,
export, OptionExport,
metrics_request, OptionMetricsRequest,
modeling_session_data, OptionModelingSessionData,
pong, OptionPong,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -6,7 +6,7 @@ from typing_extensions import Annotated
from ..models.point3d import Point3d from ..models.point3d import Point3d
class local(BaseModel): class OptionLocal(BaseModel):
"""Local Origin (center of object bounding box).""" """Local Origin (center of object bounding box)."""
type: Literal["local"] = "local" type: Literal["local"] = "local"
@ -14,7 +14,7 @@ class local(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class global_(BaseModel): class OptionGlobal(BaseModel):
"""Global Origin (0, 0, 0).""" """Global Origin (0, 0, 0)."""
type: Literal["global"] = "global" type: Literal["global"] = "global"
@ -22,7 +22,7 @@ class global_(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class custom(BaseModel): class OptionCustom(BaseModel):
"""Custom Origin (user specified point).""" """Custom Origin (user specified point)."""
origin: Point3d origin: Point3d
@ -35,9 +35,9 @@ class custom(BaseModel):
OriginType = RootModel[ OriginType = RootModel[
Annotated[ Annotated[
Union[ Union[
local, OptionLocal,
global_, OptionGlobal,
custom, OptionCustom,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -13,7 +13,7 @@ from ..models.system import System
from ..models.unit_length import UnitLength from ..models.unit_length import UnitLength
class fbx(BaseModel): class OptionFbx(BaseModel):
"""Autodesk Filmbox (FBX) format.""" """Autodesk Filmbox (FBX) format."""
storage: FbxStorage storage: FbxStorage
@ -23,7 +23,7 @@ class fbx(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class gltf(BaseModel): class OptionGltf(BaseModel):
"""glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ASCII output, you can set that option for the export.""" """glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ASCII output, you can set that option for the export."""
presentation: GltfPresentation presentation: GltfPresentation
@ -35,7 +35,7 @@ class gltf(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class obj(BaseModel): class OptionObj(BaseModel):
"""Wavefront OBJ format.""" """Wavefront OBJ format."""
coords: System coords: System
@ -47,7 +47,7 @@ class obj(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class ply(BaseModel): class OptionPly(BaseModel):
"""The PLY Polygon File Format.""" """The PLY Polygon File Format."""
coords: System coords: System
@ -63,7 +63,7 @@ class ply(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class step(BaseModel): class OptionStep(BaseModel):
"""ISO 10303-21 (STEP) format.""" """ISO 10303-21 (STEP) format."""
coords: System coords: System
@ -73,7 +73,7 @@ class step(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class stl(BaseModel): class OptionStl(BaseModel):
"""*ST**ereo**L**ithography format.""" """*ST**ereo**L**ithography format."""
coords: System coords: System
@ -92,12 +92,12 @@ class stl(BaseModel):
OutputFormat = RootModel[ OutputFormat = RootModel[
Annotated[ Annotated[
Union[ Union[
fbx, OptionFbx,
gltf, OptionGltf,
obj, OptionObj,
ply, OptionPly,
step, OptionStep,
stl, OptionStl,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -9,7 +9,7 @@ from ..models.point2d import Point2d
from ..models.point3d import Point3d from ..models.point3d import Point3d
class line(BaseModel): class OptionLine(BaseModel):
"""A straight line segment. Goes from the current path \"pen\" to the given endpoint.""" """A straight line segment. Goes from the current path \"pen\" to the given endpoint."""
end: Point3d end: Point3d
@ -21,7 +21,7 @@ class line(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class arc(BaseModel): class OptionArc(BaseModel):
"""A circular arc segment. Arcs can be drawn clockwise when start > end.""" """A circular arc segment. Arcs can be drawn clockwise when start > end."""
center: Point2d center: Point2d
@ -39,7 +39,7 @@ class arc(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class bezier(BaseModel): class OptionBezier(BaseModel):
"""A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.""" """A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point."""
control1: Point3d control1: Point3d
@ -55,7 +55,7 @@ class bezier(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class tangential_arc(BaseModel): class OptionTangentialArc(BaseModel):
"""Adds a tangent arc from current pen position with the given radius and angle.""" """Adds a tangent arc from current pen position with the given radius and angle."""
offset: Angle offset: Angle
@ -67,7 +67,7 @@ class tangential_arc(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class tangential_arc_to(BaseModel): class OptionTangentialArcTo(BaseModel):
"""Adds a tangent arc from current pen position to the new position. Arcs will choose a clockwise or counter-clockwise direction based on the arc end position.""" """Adds a tangent arc from current pen position to the new position. Arcs will choose a clockwise or counter-clockwise direction based on the arc end position."""
angle_snap_increment: Optional[Angle] = None angle_snap_increment: Optional[Angle] = None
@ -82,11 +82,11 @@ class tangential_arc_to(BaseModel):
PathSegment = RootModel[ PathSegment = RootModel[
Annotated[ Annotated[
Union[ Union[
line, OptionLine,
arc, OptionArc,
bezier, OptionBezier,
tangential_arc, OptionTangentialArc,
tangential_arc_to, OptionTangentialArcTo,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -4,7 +4,7 @@ from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated from typing_extensions import Annotated
class default_scene(BaseModel): class OptionDefaultScene(BaseModel):
"""Visit the default scene.""" """Visit the default scene."""
type: Literal["default_scene"] = "default_scene" type: Literal["default_scene"] = "default_scene"
@ -12,7 +12,7 @@ class default_scene(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class scene_by_index(BaseModel): class OptionSceneByIndex(BaseModel):
"""Visit the indexed scene.""" """Visit the indexed scene."""
index: int index: int
@ -22,7 +22,7 @@ class scene_by_index(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class scene_by_name(BaseModel): class OptionSceneByName(BaseModel):
"""Visit the first scene with the given name.""" """Visit the first scene with the given name."""
name: str name: str
@ -32,7 +32,7 @@ class scene_by_name(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class mesh_by_index(BaseModel): class OptionMeshByIndex(BaseModel):
"""Visit the indexed mesh.""" """Visit the indexed mesh."""
index: int index: int
@ -42,7 +42,7 @@ class mesh_by_index(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class mesh_by_name(BaseModel): class OptionMeshByName(BaseModel):
"""Visit the first mesh with the given name.""" """Visit the first mesh with the given name."""
name: str name: str
@ -55,11 +55,11 @@ class mesh_by_name(BaseModel):
Selection = RootModel[ Selection = RootModel[
Annotated[ Annotated[
Union[ Union[
default_scene, OptionDefaultScene,
scene_by_index, OptionSceneByIndex,
scene_by_name, OptionSceneByName,
mesh_by_index, OptionMeshByIndex,
mesh_by_name, OptionMeshByName,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -6,7 +6,7 @@ from typing_extensions import Annotated
from ..models.plan_interval import PlanInterval from ..models.plan_interval import PlanInterval
class flat(BaseModel): class OptionFlat(BaseModel):
"""A flat price that we publicly list.""" """A flat price that we publicly list."""
interval: PlanInterval interval: PlanInterval
@ -18,7 +18,7 @@ class flat(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class per_user(BaseModel): class OptionPerUser(BaseModel):
"""A per user price that we publicly list.""" """A per user price that we publicly list."""
interval: PlanInterval interval: PlanInterval
@ -30,7 +30,7 @@ class per_user(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class enterprise(BaseModel): class OptionEnterprise(BaseModel):
"""Enterprise: The price is not listed and the user needs to contact sales.""" """Enterprise: The price is not listed and the user needs to contact sales."""
type: Literal["enterprise"] = "enterprise" type: Literal["enterprise"] = "enterprise"
@ -41,9 +41,9 @@ class enterprise(BaseModel):
SubscriptionTierPrice = RootModel[ SubscriptionTierPrice = RootModel[
Annotated[ Annotated[
Union[ Union[
flat, OptionFlat,
per_user, OptionPerUser,
enterprise, OptionEnterprise,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -4,7 +4,7 @@ from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated from typing_extensions import Annotated
class individual(BaseModel): class OptionIndividual(BaseModel):
"""A subscription tier that can be applied to individuals only.""" """A subscription tier that can be applied to individuals only."""
type: Literal["individual"] = "individual" type: Literal["individual"] = "individual"
@ -12,7 +12,7 @@ class individual(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class organization(BaseModel): class OptionOrganization(BaseModel):
"""An subscription tier that can be applied to organizations only.""" """An subscription tier that can be applied to organizations only."""
saml_sso: bool saml_sso: bool
@ -25,8 +25,8 @@ class organization(BaseModel):
SubscriptionTierType = RootModel[ SubscriptionTierType = RootModel[
Annotated[ Annotated[
Union[ Union[
individual, OptionIndividual,
organization, OptionOrganization,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

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

View File

@ -1,6 +1,6 @@
from typing import List, Optional, Union from typing import List, Optional
from pydantic import BaseModel, ConfigDict, RootModel from pydantic import BaseModel, ConfigDict
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
from ..models.subscription_tier_feature import SubscriptionTierFeature from ..models.subscription_tier_feature import SubscriptionTierFeature
@ -13,7 +13,7 @@ from ..models.support_tier import SupportTier
from ..models.zoo_tool import ZooTool from ..models.zoo_tool import ZooTool
class ZooProductSubscription0(BaseModel): class ZooProductSubscription(BaseModel):
"""A subscription to the modeling app.""" """A subscription to the modeling app."""
description: str description: str
@ -35,6 +35,3 @@ class ZooProductSubscription0(BaseModel):
zoo_tools_included: Optional[List[ZooTool]] = None zoo_tools_included: Optional[List[ZooTool]] = None
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
ZooProductSubscription = RootModel[Union[ZooProductSubscription0,]]