toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final protocols = this.protocols;
  final role = this.role;
  return {
    if (protocols != null)
      'Protocols': protocols.map((e) => e.toValue()).toList(),
    if (role != null) 'Role': role.toValue(),
  };
}