nv_dfm_core.api.If#
- class nv_dfm_core.api.If(*, dfm_body=[], dfm_node_id=<factory>, dfm_after=None, dfm_class_name='nv_dfm_core.api.If', cond)[source]#
IfTrue is a statement that executes the body if the condition is true.
Usage: cond = … with If(cond=cond) as test:
# body
- Parameters:
dfm_body (list[Statement])
dfm_node_id (NodeId)
dfm_class_name (Literal['nv_dfm_core.api.If'])
cond (Expression | NodeRef | list[JsonValue] | str | bool | int | float | None | And | Or | Not | Equal | NotEqual | GreaterThan | GreaterThanOrEqual | LessThan | LessThanOrEqual)
- model_config: ConfigDict = {'extra': 'forbid', 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].