Map<String, dynamic> toMap() { return <String, dynamic>{ 'retainAtLeast': ?retainAtLeast, 'type': type, 'unit': ?unit, 'value': value, }; }