toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var description = this.description;
  var id = this.id;
  var name = this.name;
  var ruleKey = this.ruleKey;
  var ruleType = this.ruleType;

  final json = <String, Object?>{};
  if (description != null) {
    json[r'description'] = description;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (ruleKey != null) {
    json[r'ruleKey'] = ruleKey;
  }
  if (ruleType != null) {
    json[r'ruleType'] = ruleType.value;
  }
  return json;
}