toMap method
Implementation
Map<String, Object> toMap() => <String, Object>{
keyMode: getReadPreferenceModeString(mode),
if (tags != null) keyTags: tags!,
if (maxStalenessSeconds != null)
keyMaxStalenessSecond: maxStalenessSeconds!,
if (hedgeOptions != null) keyHedgeOptions: hedgeOptions!
};