Map<String, dynamic> toMap() { return <String, dynamic>{ 'maxInstances': maxInstances, 'minInstances': ?minInstances, 'weight': ?weight, }; }