toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'name'] = this.name;
  json[r'code'] = this.code;
  if (this.content != null) {
    json[r'content'] = this.content;
  } else {
    json[r'content'] = null;
  }
  json[r'maps'] = this.maps;
  json[r'duration'] = this.duration;
  json[r'rate'] = this.rate;
  json[r'cooldown'] = this.cooldown;
  if (this.price != null) {
    json[r'price'] = this.price;
  } else {
    json[r'price'] = null;
  }
  if (this.transition != null) {
    json[r'transition'] = this.transition;
  } else {
    json[r'transition'] = null;
  }
  if (this.cooldownExpiration != null) {
    json[r'cooldown_expiration'] =
        this.cooldownExpiration!.toUtc().toIso8601String();
  } else {
    json[r'cooldown_expiration'] = null;
  }
  return json;
}