toJson method

Map<String, Object?> toJson()

Encodes this value to its wire object.

Implementation

Map<String, Object?> toJson() {
  final result = <String, Object?>{};
  result['groupId'] = sessionConfigGroupIdCodec.encode(groupId);
  result['name'] = name;
  result['options'] = <Object?>[
    for (final item in options) sessionConfigSelectOptionCodec.encode(item),
  ];
  if (meta != null) {
    result['_meta'] = meta!.toObject();
  }
  return result;
}