InventoryConfiguration.fromXml constructor

InventoryConfiguration.fromXml(
  1. XmlElement elem
)

Implementation

factory InventoryConfiguration.fromXml(_s.XmlElement elem) {
  return InventoryConfiguration(
    destination: InventoryDestination.fromXml(
        _s.extractXmlChild(elem, 'Destination')!),
    id: _s.extractXmlStringValue(elem, 'Id')!,
    includedObjectVersions: _s
        .extractXmlStringValue(elem, 'IncludedObjectVersions')!
        .toInventoryIncludedObjectVersions(),
    isEnabled: _s.extractXmlBoolValue(elem, 'IsEnabled')!,
    schedule:
        InventorySchedule.fromXml(_s.extractXmlChild(elem, 'Schedule')!),
    filter: _s
        .extractXmlChild(elem, 'Filter')
        ?.let((e) => InventoryFilter.fromXml(e)),
    optionalFields: _s.extractXmlChild(elem, 'OptionalFields')?.let((elem) =>
        _s
            .extractXmlStringListValues(elem, 'Field')
            .map((s) => s.toInventoryOptionalField())
            .toList()),
  );
}