toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final type = this.type;
  final method = this.method;
  final name = this.name;
  final path = this.path;
  final statusCode = this.statusCode;
  return {
    'type': type.toValue(),
    if (method != null) 'method': method,
    if (name != null) 'name': name,
    if (path != null) 'path': path,
    if (statusCode != null) 'statusCode': statusCode,
  };
}