Class AssetStatus
- Namespace
- Azure.Iot.Operations.Services.AssetAndDeviceRegistry.Models
- Assembly
- Azure.Iot.Operations.Services.dll
public record AssetStatus : IEquatable<AssetStatus>
- Inheritance
-
AssetStatus
- Implements
- Inherited Members
Properties
Config
The status of the asset
public ConfigStatus? Config { get; set; }
Property Value
Remarks
This status is independent from the status of any nested event groups/datasets/streams. That means that, even if a dataset has a config error, the asset status may still be okay.
Datasets
The status of all datasets associated with this asset (if it has any datasets).
public List<AssetDatasetEventStreamStatus>? Datasets { get; set; }
Property Value
Remarks
Each dataset should only report its latest status.
EventGroups
The status of all event groups associated with this asset (if it has any event groups).
public List<AssetEventGroupStatus>? EventGroups { get; set; }
Property Value
Remarks
Each event group should only report its latest status.
ManagementGroups
The status of all management groups associated with this asset (if it has any management groups).
public List<AssetManagementGroupStatus>? ManagementGroups { get; set; }
Property Value
Remarks
Each management group should only report its latest status.
Streams
The status of all streams associated with this asset (if it has any streams).
public List<AssetDatasetEventStreamStatus>? Streams { get; set; }
Property Value
Remarks
Each stream should only report its latest status.
Methods
ClearEventGroupStatus(string)
Remove any statuses related to the provided event group name from EventGroups.
public void ClearEventGroupStatus(string eventGroupName)
Parameters
eventGroupNamestringThe name of the event group to clear all statuses from.
EqualTo(AssetStatus)
Compare two asset states.
public bool EqualTo(AssetStatus other)
Parameters
otherAssetStatusThe other asset state to compare against.
Returns
- bool
False if there is any difference between the two asset states (ignoring 'LastUpdateTime' field values). True otherwise.
Remarks
The 'LastUpdateTime' fields are deliberately ignored in this comparison.
UpdateDatasetStatus(AssetDatasetEventStreamStatus)
Update Datasets to replace any existing status for the dataset named in newStatus.
public void UpdateDatasetStatus(AssetDatasetEventStreamStatus newStatus)
Parameters
newStatusAssetDatasetEventStreamStatusThe new status of the dataset.
Remarks
If the dataset has no status in Datasets yet, newStatus will be added. If the
dataset does have status in Datasets already, that status will be replaced entirely by newStatus.
UpdateEventStatus(string, AssetDatasetEventStreamStatus)
Update EventGroups to replace any existing status for the provided event group's event's status.
public void UpdateEventStatus(string eventGroupName, AssetDatasetEventStreamStatus eventNewStatus)
Parameters
eventGroupNamestringThe name of the event group that this event belongs to.
eventNewStatusAssetDatasetEventStreamStatusThe new status of the event within this event group.
UpdateManagementGroupStatus(string, AssetManagementGroupActionStatus)
Update ManagementGroups to replace any existing status for the provided management group action.
public void UpdateManagementGroupStatus(string managementGroupName, AssetManagementGroupActionStatus actionNewStatus)
Parameters
managementGroupNamestringThe name of the management group that this action belongs to.
actionNewStatusAssetManagementGroupActionStatusThe new status of this action.
UpdateStreamStatus(AssetDatasetEventStreamStatus)
Update Streams to replace any existing status for the stream named in newStatus.
public void UpdateStreamStatus(AssetDatasetEventStreamStatus newStatus)
Parameters
newStatusAssetDatasetEventStreamStatusThe new status of the stream.