toJson method

Map<String, Object?> toJson()

Encodes this value to its wire object.

Implementation

Map<String, Object?> toJson() {
  final result = <String, Object?>{};
  result['methodId'] = authMethodIdCodec.encode(methodId);
  result['name'] = name;
  if (description != null) {
    result['description'] = description!;
  }
  if (meta != null) {
    result['_meta'] = meta!.toObject();
  }
  return result;
}