Validates the state of this entity locally. Raises: ValueError: The entity does not have a name or does not have a type.
(self)
| 147 | return self.name < other.name |
| 148 | |
| 149 | def is_valid(self): |
| 150 | """ |
| 151 | Validates the state of this entity locally. |
| 152 | |
| 153 | Raises: |
| 154 | ValueError: The entity does not have a name or does not have a type. |
| 155 | """ |
| 156 | if not self.name: |
| 157 | raise ValueError("The entity does not have a name.") |
| 158 | |
| 159 | if not self.value_type: |
| 160 | raise ValueError(f"The entity {self.name} does not have a type.") |
| 161 | |
| 162 | @classmethod |
| 163 | def from_proto(cls, entity_proto: EntityProto): |