toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var deprecatedKey = this.deprecatedKey;
  var description = this.description;
  var havePermission = this.havePermission;
  var id = this.id;
  var key = this.key;
  var name = this.name;
  var type = this.type;

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