Coverage for backend/common/models/idaes/payloads/build_state_request_schema.py: 100%
12 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-11-06 23:27 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2025-11-06 23:27 +0000
1# request types for the build_state endpoint
2from typing import Optional
3from pydantic import BaseModel
4from common.models.idaes.flowsheet_schema import PropertyPackageType
5from common.models.idaes.unit_model_schema import PropertySchema, SolvedPropertyValueSchema
8class BuildStateRequestSchema(BaseModel):
9 """build_state request schema"""
10 property_package: PropertyPackageType # property package to use
11 properties: dict[str, PropertySchema] # properties to initialize the state block with
13class BuildStateResponseSchema(BaseModel):
14 """build_state response schema"""
15 properties: Optional[list[SolvedPropertyValueSchema]] # properties in the state block
16 error: Optional[str] # error message if applicable
17 log: Optional[str] # log
18 traceback: Optional[str] # traceback if applicable