Robot Models#

This documentation auto-generates details about the Pydantic models defined in app/domain/robots/models/models.py.

Domain model for robots.

pydantic model app.domain.robots.models.models.Robot[source]#

Core Robot model.

Show Entity Relationship Diagram
digraph "Entity Relationship Diagram created by erdantic" {
   graph [fontcolor=gray66,
      fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=9,
      nodesep=0.5,
      rankdir=LR,
      ranksep=1.5
   ];
   node [fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=14,
      label="\N",
      shape=plain
   ];
   edge [dir=both];
   "app.domain.robots.models.models.Robot"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Robot</b></td></tr><tr><td>id</td><td port="id">UUID</td></tr><tr><td>description</td><td port="description">str</td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>owner</td><td port="owner">str</td></tr><tr><td>client_secret</td><td port="client_secret">SecretStr | None</td></tr></table>>,
      tooltip="app.domain.robots.models.models.Robot&#xA;&#xA;Core Robot model.&#xA;"];
}

Show JSON schema
{
   "title": "Robot",
   "description": "Core Robot model.",
   "type": "object",
   "properties": {
      "id": {
         "description": "The autogenerated database ID.",
         "format": "uuid",
         "title": "Id",
         "type": "string"
      },
      "description": {
         "description": "Description of the robot.",
         "title": "Description",
         "type": "string"
      },
      "name": {
         "description": "The name of the robot.",
         "title": "Name",
         "type": "string"
      },
      "owner": {
         "description": "Owner of the robot.",
         "title": "Owner",
         "type": "string"
      },
      "client_secret": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The secret key used for communicating with this robot.",
         "title": "Client Secret"
      }
   },
   "additionalProperties": false,
   "required": [
      "description",
      "name",
      "owner"
   ]
}

Config:
  • from_attributes: bool = True

  • extra: str = forbid

Fields:
field client_secret: SecretStr | None = None[source]#

The secret key used for communicating with this robot.

field description: str [Required][source]#

Description of the robot.

field id: uuid.UUID [Optional][source]#

The autogenerated database ID.

field name: str [Required][source]#

The name of the robot.

field owner: str [Required][source]#

Owner of the robot.

check_serializability() None[source]#

Check that incoming SDK model is json-serializable.

This should be called during all domain model conversions.

Raises:

ValidationError: If the model is not json-serializable.

get_client_secret() str[source]#

Return the client secret for the robot.