"""Auto-generated by generate.sh script."""

# generated by datamodel-codegen:
#   filename:  openapi.json
#   timestamp: 2025-01-22T23:12:27+00:00

from __future__ import annotations

from typing import Dict, List, Optional, Union

from pydantic import BaseModel, Field


class APIKeyRequest(BaseModel):
    num_hours: Optional[int] = Field(24, title="Num Hours")


class APIKeyResponse(BaseModel):
    api_key: str = Field(..., title="Api Key")


class AddRobotClassRequest(BaseModel):
    description: Optional[str] = Field(None, title="Description")


class AddRobotRequest(BaseModel):
    description: Optional[str] = Field(None, title="Description")
    class_name: str = Field(..., title="Class Name")


class JointMetadataInput(BaseModel):
    id: Optional[int] = Field(None, title="Id")
    kp: Optional[Union[float, str]] = Field(None, title="Kp")
    kd: Optional[Union[float, str]] = Field(None, title="Kd")
    armature: Optional[Union[float, str]] = Field(None, title="Armature")
    friction: Optional[Union[float, str]] = Field(None, title="Friction")
    offset: Optional[Union[float, str]] = Field(None, title="Offset")
    flipped: Optional[bool] = Field(None, title="Flipped")
    actuator_type: Optional[str] = Field(None, title="Actuator Type")
    nn_id: Optional[int] = Field(None, title="Neural Network Id")
    soft_torque_limit: Optional[str] = Field(None, title="Soft Torque Limit")


class JointMetadataOutput(BaseModel):
    id: Optional[int] = Field(None, title="Id")
    kp: Optional[str] = Field(None, title="Kp")
    kd: Optional[str] = Field(None, title="Kd")
    armature: Optional[str] = Field(None, title="Armature")
    friction: Optional[str] = Field(None, title="Friction")
    offset: Optional[str] = Field(None, title="Offset")
    flipped: Optional[bool] = Field(None, title="Flipped")
    actuator_type: Optional[str] = Field(None, title="Actuator Type")
    nn_id: Optional[int] = Field(None, title="Neural Network Id")
    soft_torque_limit: Optional[str] = Field(None, title="Soft Torque Limit")


class OICDInfo(BaseModel):
    authority: str = Field(..., title="Authority")
    client_id: str = Field(..., title="Client Id")


class Robot(BaseModel):
    id: str = Field(..., title="Id")
    robot_name: str = Field(..., title="Robot Name")
    description: str = Field(..., title="Description")
    user_id: str = Field(..., title="User Id")
    class_id: str = Field(..., title="Class Id")


class RobotDownloadURDFResponse(BaseModel):
    url: str = Field(..., title="Url")
    md5_hash: str = Field(..., title="Md5 Hash")


class RobotResponse(BaseModel):
    id: str = Field(..., title="Id")
    robot_name: str = Field(..., title="Robot Name")
    description: str = Field(..., title="Description")
    user_id: str = Field(..., title="User Id")
    class_name: str = Field(..., title="Class Name")


class RobotURDFMetadataInput(BaseModel):
    joint_name_to_metadata: Optional[Dict[str, JointMetadataInput]] = Field(None, title="Joint Name To Metadata")
    control_frequency: Optional[Union[float, str]] = Field(None, title="Control Frequency")


class RobotURDFMetadataOutput(BaseModel):
    joint_name_to_metadata: Optional[Dict[str, JointMetadataOutput]] = Field(None, title="Joint Name To Metadata")
    control_frequency: Optional[str] = Field(None, title="Control Frequency")


class RobotUploadURDFRequest(BaseModel):
    filename: str = Field(..., title="Filename")
    content_type: str = Field(..., title="Content Type")


class RobotUploadURDFResponse(BaseModel):
    url: str = Field(..., title="Url")
    filename: str = Field(..., title="Filename")
    content_type: str = Field(..., title="Content Type")


class UpdateRobotClassRequest(BaseModel):
    new_class_name: Optional[str] = Field(None, title="New Class Name")
    new_description: Optional[str] = Field(None, title="New Description")
    new_metadata: Optional[RobotURDFMetadataInput] = None


class UpdateRobotRequest(BaseModel):
    new_robot_name: Optional[str] = Field(None, title="New Robot Name")
    new_description: Optional[str] = Field(None, title="New Description")


class UserResponse(BaseModel):
    user_id: str = Field(..., title="User Id")
    is_admin: bool = Field(..., title="Is Admin")
    can_upload: bool = Field(..., title="Can Upload")
    can_test: bool = Field(..., title="Can Test")


class ValidationError(BaseModel):
    loc: List[Union[str, int]] = Field(..., title="Location")
    msg: str = Field(..., title="Message")
    type: str = Field(..., title="Error Type")


class HTTPValidationError(BaseModel):
    detail: Optional[List[ValidationError]] = Field(None, title="Detail")


class ProfileResponse(BaseModel):
    email: str = Field(..., title="Email")
    email_verified: bool = Field(..., title="Email Verified")
    user: UserResponse


class RobotClass(BaseModel):
    id: str = Field(..., title="Id")
    class_name: str = Field(..., title="Class Name")
    description: str = Field(..., title="Description")
    user_id: str = Field(..., title="User Id")
    metadata: Optional[RobotURDFMetadataOutput] = None
