Workflows
albert.resources.workflows
IntervalParameter
Bases: BaseAlbertModel
A class representing the interval parameter of a workflow. This is not a platform entity, but a helper class to make parsing the interval_combinations easier.
Attributes:
Name | Type | Description |
---|---|---|
interval_param_name |
str
|
The name of the interval parameter. |
interval_id |
IntervalId
|
The id of the interval parameter. |
interval_value |
str
|
The value of the interval parameter. |
interval_unit |
str
|
The unit of the interval parameter. |
Show JSON schema:
{
"description": "A class representing the interval parameter of a workflow.\nThis is not a platform entity, but a helper class to make parsing\nthe interval_combinations easier.\n\nAttributes\n----------\ninterval_param_name : str\n The name of the interval parameter.\ninterval_id : IntervalId\n The id of the interval parameter.\ninterval_value : str\n The value of the interval parameter.\ninterval_unit : str\n The unit of the interval parameter.",
"properties": {
"interval_param_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval Param Name"
},
"interval_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval Id"
},
"interval_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval Value"
},
"interval_unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval Unit"
}
},
"title": "IntervalParameter",
"type": "object"
}
Fields:
-
interval_param_name
(str | None
) -
interval_id
(IntervalId | None
) -
interval_value
(str | None
) -
interval_unit
(str | None
)
Interval
Bases: BaseAlbertModel
A Pydantic class representing an interval.
Attrubutes
value : str The value of the interval setpoint. unit : Unit The unit of the related value.
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Unit": {
"description": "Unit is a Pydantic model representing a unit entity.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the unit. Set when the unit is retrieved from Albert.\nname : str\n The name of the unit.\nsymbol : str | None\n The symbol of the unit.\nsynonyms : List[str] | None\n The list of synonyms for the unit.\ncategory : UnitCategory\n The category of the unit.\nverified : bool | None\n Whether the unit is verified.\nstatus : Status | None\n The status of the unit. Allowed values are `active`, and `inactive`",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "UnitCategory is an enumeration of possible unit categories.\n\nAttributes\n----------\nLENGTH : str\n Represents length units.\nVOLUME : str\n Represents volume units.\nLIQUID_VOLUME : str\n Represents liquid volume units.\nANGLES : str\n Represents angle units.\nTIME : str\n Represents time units.\nFREQUENCY : str\n Represents frequency units.\nMASS : str\n Represents mass units.\nCURRENT : str\n Represents electric current units.\nTEMPERATURE : str\n Represents temperature units.\nAMOUNT : str\n Represents amount of substance units.\nLUMINOSITY : str\n Represents luminous intensity units.\nFORCE : str\n Represents force units.\nENERGY : str\n Represents energy units.\nPOWER : str\n Represents power units.\nPRESSURE : str\n Represents pressure units.\nELECTRICITY_AND_MAGNETISM : str\n Represents electricity and magnetism units.\nOTHER : str\n Represents other units.\nWEIGHT : str\n Represents weight units.",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
}
},
"description": "A Pydantic class representing an interval.\n\nAttrubutes\n----------\nvalue : str\n The value of the interval setpoint.\nunit : Unit\n The unit of the related value.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
}
Fields:
IntervalCombination
Bases: BaseAlbertModel
A class representing the interval combinations of on a workflow. This is returned by the workflow endpoint when at least one parameter in the workflow has been intervalized.
Interval Combinations can be single intervalized parameters or cartesian prodcuts of two intervalized parameters.
Attributes:
Name | Type | Description |
---|---|---|
interval_id |
IntervalId | None
|
forign key reference to the interval id this combination is associated with It will have the form ROW# or ROW#XROW# depending on if it is a single interval or a product of two intervals |
interval_params |
str | None
|
The parameters participating in the interval. |
interval_string |
str | None
|
The string representation of the interval combination This will have the form "[Parameter Name]: [Parameter Value][Parameter Unit]" for each parameter in the interval combination |
Show JSON schema:
{
"description": "A class representing the interval combinations of on a workflow.\nThis is returned by the workflow endpoint when at least one parameter\nin the workflow has been intervalized.\n\nInterval Combinations can be single intervalized parameters or cartesian prodcuts of\ntwo intervalized parameters.\n\nAttributes\n----------\ninterval_id: IntervalId | None\n forign key reference to the interval id\n this combination is associated with\n It will have the form ROW# or ROW#XROW# depending on\n if it is a single interval or a product of two intervals\ninterval_params: str | None\n The parameters participating in the interval.\ninterval_string: str | None\n The string representation of the interval combination\n This will have the form \"[Parameter Name]: [Parameter Value] [Parameter Unit]\"\n for each parameter in the interval combination",
"properties": {
"interval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval"
},
"intervalParams": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervalparams"
},
"intervalString": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervalstring"
}
},
"title": "IntervalCombination",
"type": "object"
}
Fields:
-
interval_id
(IntervalId | None
) -
interval_params
(str | None
) -
interval_string
(str | None
)
ParameterSetpoint
Bases: BaseAlbertModel
A Pydantic class representing the setpoint or intervals of a parameter to use. For a single value, provide the value and unit. For multiple values, provide intervals. a parameter or parameter_id must be provided.
Attributes:
Name | Type | Description |
---|---|---|
parameter |
Parameter
|
The parameter to set the setpoint on. Provide either a parameter or a parameter_id. |
parameter_id |
ParameterId
|
The id of the parameter. Provide either a parameter or a parameter_id. |
value |
str | EntityLink
|
The value of the setpoint. If the parameter is a InventoryItem, provide the EntityLink of the InventoryItem. |
unit |
Unit
|
The unit of the setpoint. |
intervals |
list[Interval]
|
The intervals of the setpoint. Either ether intervals or value + unit |
category |
ParameterCategory
|
The category of the parameter. Special for InventoryItem (then use name to specify "Equipment", "Consumeable", etc), normal for all others |
short_name |
str
|
The short / display name of the parameter. Required if value is a dictionary. |
row_id |
RowId
|
The id of the parameter with respect to the interval row id. |
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"Interval": {
"description": "A Pydantic class representing an interval.\n\nAttrubutes\n----------\nvalue : str\n The value of the interval setpoint.\nunit : Unit\n The unit of the related value.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"Parameter": {
"description": "A parameter in Albert.\n\nAttributes\n----------\nname : str\n The name of the parameter. Names must be unique.\nid : str | None\n The Albert ID of the parameter. Set when the parameter is retrieved from Albert.\ncategory : ParameterCategory\n The category of the parameter. Allowed values are `Normal` and `Special`. Read-only.\nrank : int\n The rank of the returned parameter. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Rank"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "The category of a parameter",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Unit": {
"description": "Unit is a Pydantic model representing a unit entity.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the unit. Set when the unit is retrieved from Albert.\nname : str\n The name of the unit.\nsymbol : str | None\n The symbol of the unit.\nsynonyms : List[str] | None\n The list of synonyms for the unit.\ncategory : UnitCategory\n The category of the unit.\nverified : bool | None\n Whether the unit is verified.\nstatus : Status | None\n The status of the unit. Allowed values are `active`, and `inactive`",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "UnitCategory is an enumeration of possible unit categories.\n\nAttributes\n----------\nLENGTH : str\n Represents length units.\nVOLUME : str\n Represents volume units.\nLIQUID_VOLUME : str\n Represents liquid volume units.\nANGLES : str\n Represents angle units.\nTIME : str\n Represents time units.\nFREQUENCY : str\n Represents frequency units.\nMASS : str\n Represents mass units.\nCURRENT : str\n Represents electric current units.\nTEMPERATURE : str\n Represents temperature units.\nAMOUNT : str\n Represents amount of substance units.\nLUMINOSITY : str\n Represents luminous intensity units.\nFORCE : str\n Represents force units.\nENERGY : str\n Represents energy units.\nPOWER : str\n Represents power units.\nPRESSURE : str\n Represents pressure units.\nELECTRICITY_AND_MAGNETISM : str\n Represents electricity and magnetism units.\nOTHER : str\n Represents other units.\nWEIGHT : str\n Represents weight units.",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
}
},
"description": "A Pydantic class representing the setpoint or intervals of a parameter to use.\nFor a single value, provide the value and unit. For multiple values, provide intervals.\na parameter or parameter_id must be provided.\n\nAttributes\n----------\nparameter : Parameter\n The parameter to set the setpoint on. Provide either a parameter or a parameter_id.\nparameter_id : ParameterId\n The id of the parameter. Provide either a parameter or a parameter_id.\nvalue : str | EntityLink\n The value of the setpoint. If the parameter is a InventoryItem, provide the EntityLink of the InventoryItem.\nunit : Unit\n The unit of the setpoint.\nintervals : list[Interval]\n The intervals of the setpoint. Either ether intervals or value + unit\ncategory : ParameterCategory\n The category of the parameter. Special for InventoryItem (then use name to specify \"Equipment\", \"Consumeable\", etc), normal for all others\nshort_name : str\n The short / display name of the parameter. Required if value is a dictionary.\nrow_id : RowId\n The id of the parameter with respect to the interval row id.",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
}
Fields:
-
parameter
(Parameter | None
) -
value
(str | EntityLink | None
) -
unit
(SerializeAsEntityLink[Unit] | None
) -
parameter_id
(ParameterId | None
) -
intervals
(list[Interval] | None
) -
category
(ParameterCategory | None
) -
short_name
(str | None
) -
name
(str | None
) -
row_id
(RowId | None
)
Validators:
model_post_init
Note: We use post init here rather than doing the assignment
in the validator because name
is a pydantic field
and setting it will trigger the model validation again
causing an infinite recursion error
Source code in src/albert/resources/workflows.py
check_parameter_setpoint_validity
Source code in src/albert/resources/workflows.py
ParameterGroupSetpoints
Bases: BaseAlbertModel
A class that represents the setpoints on a parameter group.
Attributes:
Name | Type | Description |
---|---|---|
parameter_group |
ParameterGroup
|
The parameter group to set the setpoints on. Provide either a parameter_group or a paramerter_group_id |
parameter_group_id |
ParameterGroupId
|
The id of the parameter group. Provide either a parameter_group or a paramerter_group_id |
parameter_group_name |
str
|
The name of the parameter group. This is a read-only field. |
parameter_setpoints |
list[ParameterSetpoint]
|
The setpoints to apply to the parameter group. |
Show JSON schema:
{
"$defs": {
"ACL": {
"description": "The Access Control List (ACL) for a user",
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
}
},
"required": [
"id"
],
"title": "ACL",
"type": "object"
},
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner"
],
"title": "AccessControlLevel",
"type": "string"
},
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Cas": {
"description": "Represents a CAS entity.",
"properties": {
"number": {
"description": "The CAS number.",
"title": "Number",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the CAS.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The description or name of the CAS.",
"title": "Description"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Notes related to the CAS.",
"title": "Notes"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/CasCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the CAS."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS SMILES notation.",
"title": "Cassmiles"
},
"inchiKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "InChIKey of the CAS.",
"title": "Inchikey"
},
"iUpacName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "IUPAC name of the CAS.",
"title": "Iupacname"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The AlbertID of the CAS.",
"title": "Albertid"
},
"hazards": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Hazard"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazards associated with the CAS.",
"title": "Hazards"
},
"wgk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "German Water Hazard Class (WGK) number.",
"title": "Wgk"
},
"ecListNo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "European Community (EC) number.",
"title": "Eclistno"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Type of the CAS.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Classification type of the CAS.",
"title": "Classificationtype"
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS order.",
"title": "Order"
}
},
"required": [
"number"
],
"title": "Cas",
"type": "object"
},
"CasAmount": {
"description": "CasAmount is a Pydantic model representing an amount of a given CAS.\n\nAttributes\n----------\nmin : float\n The minimum amount of the CAS in the formulation.\nmax : float\n The maximum amount of the CAS in the formulation.\nid : str | None\n The Albert ID of the CAS Number Resource this amount represents. Provide either a Cas or an ID.\ncas : Cas | None\n The CAS object associated with this amount. Provide either a Cas or an id.\ncas_smiles: str | None\n The SMILES string of the CAS Number resource. Obtained from the Cas object when provided.\nnumber: str | None\n The CAS number. Obtained from the Cas object when provided.",
"properties": {
"min": {
"title": "Min",
"type": "number"
},
"max": {
"title": "Max",
"type": "number"
},
"inventoryValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Inventoryvalue"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"casCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cascategory"
},
"cas": {
"anyOf": [
{
"$ref": "#/$defs/Cas"
},
{
"type": "null"
}
],
"default": null
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cassmiles"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
}
},
"required": [
"min",
"max"
],
"title": "CasAmount",
"type": "object"
},
"CasCategory": {
"enum": [
"User",
"Verisk",
"TSCA - Public",
"TSCA - Private",
"not TSCA",
"CAS linked to External Database",
"Unknown (Trade Secret)",
"CL_Inventory Upload"
],
"title": "CasCategory",
"type": "string"
},
"Company": {
"description": "Company is a Pydantic model representing a company entity.\n\nAttributes\n----------\nname : str\n The name of the company.\nid : str | None\n The Albert ID of the company. Set when the company is retrieved from Albert.\ndistance : float | None\n The scores of a company in a search result, optional. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"DataType": {
"enum": [
"number",
"string",
"enum"
],
"title": "DataType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Hazard": {
"description": "Represents a chemical hazard.",
"properties": {
"subCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard subcategory",
"title": "Subcategory"
},
"hCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code",
"title": "Hcode"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard category",
"title": "Category"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard classification",
"title": "Class"
},
"hCodeText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code text",
"title": "Hcodetext"
}
},
"title": "Hazard",
"type": "object"
},
"Interval": {
"description": "A Pydantic class representing an interval.\n\nAttrubutes\n----------\nvalue : str\n The value of the interval setpoint.\nunit : Unit\n The unit of the related value.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"InventoryCategory": {
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"InventoryItem": {
"description": "An InventoryItem is a Pydantic model representing an item in the inventory. Can be a raw material, consumable, equipment, or formula.\nNote: Formulas should be registered via the Worksheet collection / Sheet resource.\n\nReturns\n-------\nInventoryItem\n An InventoryItem that can be used to represent an item in the inventory. Can be a raw material, consumable, equipment, or formula.\n\nAttributes\n------\n\nname : str\n The name of the InventoryItem.\nid : str | None\n The Albert ID of the InventoryItem. Set when the InventoryItem is retrieved from Albert.\ndescription : str | None\n The description of the InventoryItem.\ncategory : InventoryCategory\n The category of the InventoryItem. Allowed values are `RawMaterials`, `Consumables`, `Equipment`, and `Formulas`.\nunit_category : InventoryUnitCategory\n The unit category of the InventoryItem. Can be mass, volume, length, pressure, or units. By default, mass is used for RawMaterials and Formulas, and units is used for Equipment and Consumables.\nsecurity_class : SecurityClass | None\n The security class of the InventoryItem. Optional. Can be confidential, shared, or restricted.\ncompany : Company | str | None\n The company associated with the InventoryItem. Can be a Company object or a string. If a String is provided, a Company object with the name of the provided string will be first-or-created.\nminimum : list[InventoryMinimum] | None\n The minimum amount of the InventoryItem that must be kept in stock at a given Location. Optional.\nalias : str | None\n An alias for the InventoryItem. Optional.\ncas : list[CasAmount] | None\n The CAS numbers associated with the InventoryItem. This is how a compositional breakdown can be provided. Optional.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None\n Metadata associated with the InventoryItem. Optional. Allowed metadata fields can be found in the CustomFields documentation.\nproject_id : str | None\n The project ID associated with the InventoryItem. Read Only. Required for Formulas.\nformula_id : str | None\n The formula ID associated with the InventoryItem. Read Only.\ntags : list[str|Tag] | None\n The tags associated with the InventoryItem. Optional. If a string is provided, a Tag object with the name of the provided string will be first-or-created.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"category": {
"$ref": "#/$defs/InventoryCategory"
},
"unitCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryUnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"class": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Company"
},
"minimum": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/InventoryMinimum"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Minimum"
},
"alias": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Alias"
},
"Cas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasAmount"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Cas"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentid"
},
"ACL": {
"items": {
"$ref": "#/$defs/ACL"
},
"title": "Acl",
"type": "array"
},
"TaskConfig": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Taskconfig"
},
"formulaId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Formulaid"
},
"Symbols": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbols"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unnumber"
},
"recentAttachmentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Recentattachmentid"
}
},
"required": [
"category"
],
"title": "InventoryItem",
"type": "object"
},
"InventoryMinimum": {
"description": "Defined the minimum amount of an InventoryItem that must be kept in stock at a given Location.\n\nAttributes\n----------\nid : str\n The unique identifier of the Location object associated with this InventoryMinimum.\n Provide either a Location or a location id.\nlocation : Location\n The Location object associated with this InventoryMinimum. Provide either a Location or a location id.\nminimum : float\n The minimum amount of the InventoryItem that must be kept in stock at the given Location.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"type": "null"
}
],
"default": null
},
"minimum": {
"maximum": 1000000000000000,
"minimum": 0,
"title": "Minimum",
"type": "number"
}
},
"required": [
"minimum"
],
"title": "InventoryMinimum",
"type": "object"
},
"InventoryUnitCategory": {
"enum": [
"mass",
"volume",
"length",
"pressure",
"units"
],
"title": "InventoryUnitCategory",
"type": "string"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq"
],
"title": "Operator",
"type": "string"
},
"PGType": {
"description": "The type of a parameter group",
"enum": [
"general",
"batch",
"property"
],
"title": "PGType",
"type": "string"
},
"Parameter": {
"description": "A parameter in Albert.\n\nAttributes\n----------\nname : str\n The name of the parameter. Names must be unique.\nid : str | None\n The Albert ID of the parameter. Set when the parameter is retrieved from Albert.\ncategory : ParameterCategory\n The category of the parameter. Allowed values are `Normal` and `Special`. Read-only.\nrank : int\n The rank of the returned parameter. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Rank"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "The category of a parameter",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"ParameterGroup": {
"description": "Use 'Standards' key in metadata to store standards",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/PGType"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"class": {
"$ref": "#/$defs/SecurityClass",
"default": "restricted"
},
"ACL": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Acl"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"title": "Metadata",
"type": "object"
},
"Parameters": {
"items": {
"$ref": "#/$defs/ParameterValue"
},
"title": "Parameters",
"type": "array"
},
"verified": {
"default": false,
"title": "Verified",
"type": "boolean"
},
"documents": {
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Documents",
"type": "array"
}
},
"required": [
"name"
],
"title": "ParameterGroup",
"type": "object"
},
"ParameterSetpoint": {
"description": "A Pydantic class representing the setpoint or intervals of a parameter to use.\nFor a single value, provide the value and unit. For multiple values, provide intervals.\na parameter or parameter_id must be provided.\n\nAttributes\n----------\nparameter : Parameter\n The parameter to set the setpoint on. Provide either a parameter or a parameter_id.\nparameter_id : ParameterId\n The id of the parameter. Provide either a parameter or a parameter_id.\nvalue : str | EntityLink\n The value of the setpoint. If the parameter is a InventoryItem, provide the EntityLink of the InventoryItem.\nunit : Unit\n The unit of the setpoint.\nintervals : list[Interval]\n The intervals of the setpoint. Either ether intervals or value + unit\ncategory : ParameterCategory\n The category of the parameter. Special for InventoryItem (then use name to specify \"Equipment\", \"Consumeable\", etc), normal for all others\nshort_name : str\n The short / display name of the parameter. Required if value is a dictionary.\nrow_id : RowId\n The id of the parameter with respect to the interval row id.",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
},
"ParameterValue": {
"description": "The value of a parameter in a parameter group.\n\nAttributes\n----------\nparameter : Parameter\n The Parameter resource this value is associated with. Provide either an id or a parameter keyword argument.\nid : str | None\n The Albert ID of the Parameter resource this value is associated with. Provide either an id or a parameter keyword argument.\ncategory: ParameterCategory\n The category of the parameter.\nshort_name : str | None\n The short name of the parameter value.\nvalue : str | None\n The default value of the parameter. Can be a string or an InventoryItem (if, for example, the parameter is an instrumnt choice).\nunit : Unit | None\n The unit of measure for the provided parameter value.\nname : str\n The name of the parameter. Read-only.\nsequence : int\n The sequence of the parameter. Read-only.",
"properties": {
"parameter": {
"$ref": "#/$defs/Parameter",
"default": null
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Shortname"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/InventoryItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"Added": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"validation": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ValueValidation"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Validation"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"sequence": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence"
},
"originalShortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalshortname"
},
"originalName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalname"
}
},
"title": "ParameterValue",
"type": "object"
},
"Role": {
"description": "A role in Albert. Note: Roles are not currently creatable via the SDK.\n\nAttributes\n----------\nname : str\n The name of the role.\nid : str\n The Albert ID of the role. Set when the role is retrieved from Albert.\npolicies : list[Any] | None\n The policies associated with the role.\ntenant : str\n The tenant ID of the role.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Policies"
},
"tenant": {
"title": "Tenant",
"type": "string"
}
},
"required": [
"name",
"tenant"
],
"title": "Role",
"type": "object"
},
"SecurityClass": {
"description": "The security class of a resource",
"enum": [
"shared",
"restricted",
"confidential",
"private",
"public"
],
"title": "SecurityClass",
"type": "string"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Tag": {
"description": "Tag is a Pydantic model representing a tag entity.\n\nAttributes\n----------\ntag : str\n The name of the tag.\nid : str | None\n The Albert ID of the tag. Set when the tag is retrieved from Albert.\n\nMethods\n-------\nfrom_string(tag: str) -> \"Tag\"\n Creates a Tag object from a string.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
}
},
"required": [
"name"
],
"title": "Tag",
"type": "object"
},
"Unit": {
"description": "Unit is a Pydantic model representing a unit entity.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the unit. Set when the unit is retrieved from Albert.\nname : str\n The name of the unit.\nsymbol : str | None\n The symbol of the unit.\nsynonyms : List[str] | None\n The list of synonyms for the unit.\ncategory : UnitCategory\n The category of the unit.\nverified : bool | None\n Whether the unit is verified.\nstatus : Status | None\n The status of the unit. Allowed values are `active`, and `inactive`",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "UnitCategory is an enumeration of possible unit categories.\n\nAttributes\n----------\nLENGTH : str\n Represents length units.\nVOLUME : str\n Represents volume units.\nLIQUID_VOLUME : str\n Represents liquid volume units.\nANGLES : str\n Represents angle units.\nTIME : str\n Represents time units.\nFREQUENCY : str\n Represents frequency units.\nMASS : str\n Represents mass units.\nCURRENT : str\n Represents electric current units.\nTEMPERATURE : str\n Represents temperature units.\nAMOUNT : str\n Represents amount of substance units.\nLUMINOSITY : str\n Represents luminous intensity units.\nFORCE : str\n Represents force units.\nENERGY : str\n Represents energy units.\nPOWER : str\n Represents power units.\nPRESSURE : str\n Represents pressure units.\nELECTRICITY_AND_MAGNETISM : str\n Represents electricity and magnetism units.\nOTHER : str\n Represents other units.\nWEIGHT : str\n Represents weight units.",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
},
"User": {
"description": "Represents a User on the Albert Platform\n\nAttributes\n----------\nname : str\n The name of the user.\nid : str | None\n The Albert ID of the user. Set when the user is retrieved from Albert.\nlocation : Location | None\n The location of the user.\nemail : EmailStr | None\n The email of the user.\nroles : list[Role]\n The roles of the user.\nuser_class : UserClass\n The ACL class level of the user.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"email": {
"default": null,
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
},
"ValueValidation": {
"properties": {
"datatype": {
"$ref": "#/$defs/DataType"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"datatype"
],
"title": "ValueValidation",
"type": "object"
}
},
"description": "A class that represents the setpoints on a parameter group.\n\n\nAttributes\n----------\nparameter_group : ParameterGroup\n The parameter group to set the setpoints on. Provide either a parameter_group or a paramerter_group_id\nparameter_group_id : ParameterGroupId\n The id of the parameter group. Provide either a parameter_group or a paramerter_group_id\nparameter_group_name : str\n The name of the parameter group. This is a read-only field.\nparameter_setpoints : list[ParameterSetpoint]\n The setpoints to apply to the parameter group.",
"properties": {
"parameter_group": {
"anyOf": [
{
"$ref": "#/$defs/ParameterGroup"
},
{
"type": "null"
}
],
"default": null
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"Parameters": {
"items": {
"$ref": "#/$defs/ParameterSetpoint"
},
"title": "Parameters",
"type": "array"
}
},
"title": "ParameterGroupSetpoints",
"type": "object"
}
Fields:
-
parameter_group
(ParameterGroup | None
) -
parameter_group_id
(ParameterGroupId | None
) -
parameter_group_name
(str | None
) -
parameter_setpoints
(list[ParameterSetpoint]
)
Validators:
validate_pg_setpoint
Source code in src/albert/resources/workflows.py
Workflow
Bases: BaseResource
A Pydantic Class representing a workflow in Albert.
Workflows are combinations of Data Templates and Parameter groups and their associated setpoints.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the workflow. |
parameter_group_setpoints |
list[ParameterGroupSetpoints]
|
The setpoints to apply to the parameter groups in the workflow. |
id |
str | None
|
The AlbertID of the workflow. This is set when a workflow is retrived from the platform. |
Show JSON schema:
{
"$defs": {
"ACL": {
"description": "The Access Control List (ACL) for a user",
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
}
},
"required": [
"id"
],
"title": "ACL",
"type": "object"
},
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner"
],
"title": "AccessControlLevel",
"type": "string"
},
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Cas": {
"description": "Represents a CAS entity.",
"properties": {
"number": {
"description": "The CAS number.",
"title": "Number",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the CAS.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The description or name of the CAS.",
"title": "Description"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Notes related to the CAS.",
"title": "Notes"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/CasCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the CAS."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS SMILES notation.",
"title": "Cassmiles"
},
"inchiKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "InChIKey of the CAS.",
"title": "Inchikey"
},
"iUpacName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "IUPAC name of the CAS.",
"title": "Iupacname"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The AlbertID of the CAS.",
"title": "Albertid"
},
"hazards": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Hazard"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazards associated with the CAS.",
"title": "Hazards"
},
"wgk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "German Water Hazard Class (WGK) number.",
"title": "Wgk"
},
"ecListNo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "European Community (EC) number.",
"title": "Eclistno"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Type of the CAS.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Classification type of the CAS.",
"title": "Classificationtype"
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS order.",
"title": "Order"
}
},
"required": [
"number"
],
"title": "Cas",
"type": "object"
},
"CasAmount": {
"description": "CasAmount is a Pydantic model representing an amount of a given CAS.\n\nAttributes\n----------\nmin : float\n The minimum amount of the CAS in the formulation.\nmax : float\n The maximum amount of the CAS in the formulation.\nid : str | None\n The Albert ID of the CAS Number Resource this amount represents. Provide either a Cas or an ID.\ncas : Cas | None\n The CAS object associated with this amount. Provide either a Cas or an id.\ncas_smiles: str | None\n The SMILES string of the CAS Number resource. Obtained from the Cas object when provided.\nnumber: str | None\n The CAS number. Obtained from the Cas object when provided.",
"properties": {
"min": {
"title": "Min",
"type": "number"
},
"max": {
"title": "Max",
"type": "number"
},
"inventoryValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Inventoryvalue"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"casCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cascategory"
},
"cas": {
"anyOf": [
{
"$ref": "#/$defs/Cas"
},
{
"type": "null"
}
],
"default": null
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cassmiles"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
}
},
"required": [
"min",
"max"
],
"title": "CasAmount",
"type": "object"
},
"CasCategory": {
"enum": [
"User",
"Verisk",
"TSCA - Public",
"TSCA - Private",
"not TSCA",
"CAS linked to External Database",
"Unknown (Trade Secret)",
"CL_Inventory Upload"
],
"title": "CasCategory",
"type": "string"
},
"Company": {
"description": "Company is a Pydantic model representing a company entity.\n\nAttributes\n----------\nname : str\n The name of the company.\nid : str | None\n The Albert ID of the company. Set when the company is retrieved from Albert.\ndistance : float | None\n The scores of a company in a search result, optional. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"DataType": {
"enum": [
"number",
"string",
"enum"
],
"title": "DataType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Hazard": {
"description": "Represents a chemical hazard.",
"properties": {
"subCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard subcategory",
"title": "Subcategory"
},
"hCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code",
"title": "Hcode"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard category",
"title": "Category"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard classification",
"title": "Class"
},
"hCodeText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code text",
"title": "Hcodetext"
}
},
"title": "Hazard",
"type": "object"
},
"Interval": {
"description": "A Pydantic class representing an interval.\n\nAttrubutes\n----------\nvalue : str\n The value of the interval setpoint.\nunit : Unit\n The unit of the related value.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"IntervalCombination": {
"description": "A class representing the interval combinations of on a workflow.\nThis is returned by the workflow endpoint when at least one parameter\nin the workflow has been intervalized.\n\nInterval Combinations can be single intervalized parameters or cartesian prodcuts of\ntwo intervalized parameters.\n\nAttributes\n----------\ninterval_id: IntervalId | None\n forign key reference to the interval id\n this combination is associated with\n It will have the form ROW# or ROW#XROW# depending on\n if it is a single interval or a product of two intervals\ninterval_params: str | None\n The parameters participating in the interval.\ninterval_string: str | None\n The string representation of the interval combination\n This will have the form \"[Parameter Name]: [Parameter Value] [Parameter Unit]\"\n for each parameter in the interval combination",
"properties": {
"interval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Interval"
},
"intervalParams": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervalparams"
},
"intervalString": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervalstring"
}
},
"title": "IntervalCombination",
"type": "object"
},
"InventoryCategory": {
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"InventoryItem": {
"description": "An InventoryItem is a Pydantic model representing an item in the inventory. Can be a raw material, consumable, equipment, or formula.\nNote: Formulas should be registered via the Worksheet collection / Sheet resource.\n\nReturns\n-------\nInventoryItem\n An InventoryItem that can be used to represent an item in the inventory. Can be a raw material, consumable, equipment, or formula.\n\nAttributes\n------\n\nname : str\n The name of the InventoryItem.\nid : str | None\n The Albert ID of the InventoryItem. Set when the InventoryItem is retrieved from Albert.\ndescription : str | None\n The description of the InventoryItem.\ncategory : InventoryCategory\n The category of the InventoryItem. Allowed values are `RawMaterials`, `Consumables`, `Equipment`, and `Formulas`.\nunit_category : InventoryUnitCategory\n The unit category of the InventoryItem. Can be mass, volume, length, pressure, or units. By default, mass is used for RawMaterials and Formulas, and units is used for Equipment and Consumables.\nsecurity_class : SecurityClass | None\n The security class of the InventoryItem. Optional. Can be confidential, shared, or restricted.\ncompany : Company | str | None\n The company associated with the InventoryItem. Can be a Company object or a string. If a String is provided, a Company object with the name of the provided string will be first-or-created.\nminimum : list[InventoryMinimum] | None\n The minimum amount of the InventoryItem that must be kept in stock at a given Location. Optional.\nalias : str | None\n An alias for the InventoryItem. Optional.\ncas : list[CasAmount] | None\n The CAS numbers associated with the InventoryItem. This is how a compositional breakdown can be provided. Optional.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None\n Metadata associated with the InventoryItem. Optional. Allowed metadata fields can be found in the CustomFields documentation.\nproject_id : str | None\n The project ID associated with the InventoryItem. Read Only. Required for Formulas.\nformula_id : str | None\n The formula ID associated with the InventoryItem. Read Only.\ntags : list[str|Tag] | None\n The tags associated with the InventoryItem. Optional. If a string is provided, a Tag object with the name of the provided string will be first-or-created.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"category": {
"$ref": "#/$defs/InventoryCategory"
},
"unitCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryUnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"class": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Company"
},
"minimum": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/InventoryMinimum"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Minimum"
},
"alias": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Alias"
},
"Cas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasAmount"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Cas"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentid"
},
"ACL": {
"items": {
"$ref": "#/$defs/ACL"
},
"title": "Acl",
"type": "array"
},
"TaskConfig": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Taskconfig"
},
"formulaId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Formulaid"
},
"Symbols": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbols"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unnumber"
},
"recentAttachmentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Recentattachmentid"
}
},
"required": [
"category"
],
"title": "InventoryItem",
"type": "object"
},
"InventoryMinimum": {
"description": "Defined the minimum amount of an InventoryItem that must be kept in stock at a given Location.\n\nAttributes\n----------\nid : str\n The unique identifier of the Location object associated with this InventoryMinimum.\n Provide either a Location or a location id.\nlocation : Location\n The Location object associated with this InventoryMinimum. Provide either a Location or a location id.\nminimum : float\n The minimum amount of the InventoryItem that must be kept in stock at the given Location.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"type": "null"
}
],
"default": null
},
"minimum": {
"maximum": 1000000000000000,
"minimum": 0,
"title": "Minimum",
"type": "number"
}
},
"required": [
"minimum"
],
"title": "InventoryMinimum",
"type": "object"
},
"InventoryUnitCategory": {
"enum": [
"mass",
"volume",
"length",
"pressure",
"units"
],
"title": "InventoryUnitCategory",
"type": "string"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq"
],
"title": "Operator",
"type": "string"
},
"PGType": {
"description": "The type of a parameter group",
"enum": [
"general",
"batch",
"property"
],
"title": "PGType",
"type": "string"
},
"Parameter": {
"description": "A parameter in Albert.\n\nAttributes\n----------\nname : str\n The name of the parameter. Names must be unique.\nid : str | None\n The Albert ID of the parameter. Set when the parameter is retrieved from Albert.\ncategory : ParameterCategory\n The category of the parameter. Allowed values are `Normal` and `Special`. Read-only.\nrank : int\n The rank of the returned parameter. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Rank"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "The category of a parameter",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"ParameterGroup": {
"description": "Use 'Standards' key in metadata to store standards",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/PGType"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"class": {
"$ref": "#/$defs/SecurityClass",
"default": "restricted"
},
"ACL": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Acl"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"title": "Metadata",
"type": "object"
},
"Parameters": {
"items": {
"$ref": "#/$defs/ParameterValue"
},
"title": "Parameters",
"type": "array"
},
"verified": {
"default": false,
"title": "Verified",
"type": "boolean"
},
"documents": {
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Documents",
"type": "array"
}
},
"required": [
"name"
],
"title": "ParameterGroup",
"type": "object"
},
"ParameterGroupSetpoints": {
"description": "A class that represents the setpoints on a parameter group.\n\n\nAttributes\n----------\nparameter_group : ParameterGroup\n The parameter group to set the setpoints on. Provide either a parameter_group or a paramerter_group_id\nparameter_group_id : ParameterGroupId\n The id of the parameter group. Provide either a parameter_group or a paramerter_group_id\nparameter_group_name : str\n The name of the parameter group. This is a read-only field.\nparameter_setpoints : list[ParameterSetpoint]\n The setpoints to apply to the parameter group.",
"properties": {
"parameter_group": {
"anyOf": [
{
"$ref": "#/$defs/ParameterGroup"
},
{
"type": "null"
}
],
"default": null
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"Parameters": {
"items": {
"$ref": "#/$defs/ParameterSetpoint"
},
"title": "Parameters",
"type": "array"
}
},
"title": "ParameterGroupSetpoints",
"type": "object"
},
"ParameterSetpoint": {
"description": "A Pydantic class representing the setpoint or intervals of a parameter to use.\nFor a single value, provide the value and unit. For multiple values, provide intervals.\na parameter or parameter_id must be provided.\n\nAttributes\n----------\nparameter : Parameter\n The parameter to set the setpoint on. Provide either a parameter or a parameter_id.\nparameter_id : ParameterId\n The id of the parameter. Provide either a parameter or a parameter_id.\nvalue : str | EntityLink\n The value of the setpoint. If the parameter is a InventoryItem, provide the EntityLink of the InventoryItem.\nunit : Unit\n The unit of the setpoint.\nintervals : list[Interval]\n The intervals of the setpoint. Either ether intervals or value + unit\ncategory : ParameterCategory\n The category of the parameter. Special for InventoryItem (then use name to specify \"Equipment\", \"Consumeable\", etc), normal for all others\nshort_name : str\n The short / display name of the parameter. Required if value is a dictionary.\nrow_id : RowId\n The id of the parameter with respect to the interval row id.",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
},
"ParameterValue": {
"description": "The value of a parameter in a parameter group.\n\nAttributes\n----------\nparameter : Parameter\n The Parameter resource this value is associated with. Provide either an id or a parameter keyword argument.\nid : str | None\n The Albert ID of the Parameter resource this value is associated with. Provide either an id or a parameter keyword argument.\ncategory: ParameterCategory\n The category of the parameter.\nshort_name : str | None\n The short name of the parameter value.\nvalue : str | None\n The default value of the parameter. Can be a string or an InventoryItem (if, for example, the parameter is an instrumnt choice).\nunit : Unit | None\n The unit of measure for the provided parameter value.\nname : str\n The name of the parameter. Read-only.\nsequence : int\n The sequence of the parameter. Read-only.",
"properties": {
"parameter": {
"$ref": "#/$defs/Parameter",
"default": null
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Shortname"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/InventoryItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Unit"
},
"Added": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"validation": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ValueValidation"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Validation"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"sequence": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence"
},
"originalShortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalshortname"
},
"originalName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalname"
}
},
"title": "ParameterValue",
"type": "object"
},
"Role": {
"description": "A role in Albert. Note: Roles are not currently creatable via the SDK.\n\nAttributes\n----------\nname : str\n The name of the role.\nid : str\n The Albert ID of the role. Set when the role is retrieved from Albert.\npolicies : list[Any] | None\n The policies associated with the role.\ntenant : str\n The tenant ID of the role.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Policies"
},
"tenant": {
"title": "Tenant",
"type": "string"
}
},
"required": [
"name",
"tenant"
],
"title": "Role",
"type": "object"
},
"SecurityClass": {
"description": "The security class of a resource",
"enum": [
"shared",
"restricted",
"confidential",
"private",
"public"
],
"title": "SecurityClass",
"type": "string"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Tag": {
"description": "Tag is a Pydantic model representing a tag entity.\n\nAttributes\n----------\ntag : str\n The name of the tag.\nid : str | None\n The Albert ID of the tag. Set when the tag is retrieved from Albert.\n\nMethods\n-------\nfrom_string(tag: str) -> \"Tag\"\n Creates a Tag object from a string.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
}
},
"required": [
"name"
],
"title": "Tag",
"type": "object"
},
"Unit": {
"description": "Unit is a Pydantic model representing a unit entity.\n\nAttributes\n----------\nid : str | None\n The Albert ID of the unit. Set when the unit is retrieved from Albert.\nname : str\n The name of the unit.\nsymbol : str | None\n The symbol of the unit.\nsynonyms : List[str] | None\n The list of synonyms for the unit.\ncategory : UnitCategory\n The category of the unit.\nverified : bool | None\n Whether the unit is verified.\nstatus : Status | None\n The status of the unit. Allowed values are `active`, and `inactive`",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "UnitCategory is an enumeration of possible unit categories.\n\nAttributes\n----------\nLENGTH : str\n Represents length units.\nVOLUME : str\n Represents volume units.\nLIQUID_VOLUME : str\n Represents liquid volume units.\nANGLES : str\n Represents angle units.\nTIME : str\n Represents time units.\nFREQUENCY : str\n Represents frequency units.\nMASS : str\n Represents mass units.\nCURRENT : str\n Represents electric current units.\nTEMPERATURE : str\n Represents temperature units.\nAMOUNT : str\n Represents amount of substance units.\nLUMINOSITY : str\n Represents luminous intensity units.\nFORCE : str\n Represents force units.\nENERGY : str\n Represents energy units.\nPOWER : str\n Represents power units.\nPRESSURE : str\n Represents pressure units.\nELECTRICITY_AND_MAGNETISM : str\n Represents electricity and magnetism units.\nOTHER : str\n Represents other units.\nWEIGHT : str\n Represents weight units.",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
},
"User": {
"description": "Represents a User on the Albert Platform\n\nAttributes\n----------\nname : str\n The name of the user.\nid : str | None\n The Albert ID of the user. Set when the user is retrieved from Albert.\nlocation : Location | None\n The location of the user.\nemail : EmailStr | None\n The email of the user.\nroles : list[Role]\n The roles of the user.\nuser_class : UserClass\n The ACL class level of the user.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"email": {
"default": null,
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
},
"ValueValidation": {
"properties": {
"datatype": {
"$ref": "#/$defs/DataType"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"datatype"
],
"title": "ValueValidation",
"type": "object"
}
},
"description": "A Pydantic Class representing a workflow in Albert.\n\nWorkflows are combinations of Data Templates and Parameter groups and their associated setpoints.\n\nAttributes\n----------\nname : str\n The name of the workflow.\nparameter_group_setpoints : list[ParameterGroupSetpoints]\n The setpoints to apply to the parameter groups in the workflow.\nid : str | None\n The AlbertID of the workflow. This is set when a workflow is retrived from the platform.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"ParameterGroups": {
"items": {
"$ref": "#/$defs/ParameterGroupSetpoints"
},
"title": "Parametergroups",
"type": "array"
},
"IntervalCombinations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/IntervalCombination"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Intervalcombinations"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
}
},
"required": [
"name",
"ParameterGroups"
],
"title": "Workflow",
"type": "object"
}
Fields:
-
status
(Status | None
) -
created
(AuditFields | None
) -
updated
(AuditFields | None
) -
name
(str
) -
parameter_group_setpoints
(list[ParameterGroupSetpoints]
) -
interval_combinations
(list[IntervalCombination] | None
) -
id
(str | None
) -
_interval_parameters
(list[IntervalParameter]
)
model_post_init
get_interval_id
Get the interval ID for a set of parameter values.
This method matches parameter values to intervals defined in the workflow and constructs a composite interval ID. For multiple parameters, the interval IDs are joined with 'X'.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_values
|
dict[str, any]
|
Dictionary mapping parameter names to their values. Values can be numbers or strings that match the interval values defined in the workflow. |
required |
Returns:
Type | Description |
---|---|
str
|
The composite interval ID string. For a single parameter this is just the interval ID. For multiple parameters, interval IDs are joined with 'X' (e.g. "ROW1XROW2"). |
Raises:
Type | Description |
---|---|
ValueError
|
If any parameter value does not match a defined interval in the workflow. |
Examples:
>>> workflow = Workflow(...)
>>> # Single parameter
>>> workflow.get_interval_id({"Temperature": 25})
'ROW1'
>>> # Multiple parameters
>>> workflow.get_interval_id({"Temperature": 25, "Time": 60})
'ROW1XROW2'
>>> # Non-matching value raises error
>>> workflow.get_interval_id({"Temperature": 999})
AlbertException: No matching interval found for parameter 'Temperature' with value '999'