toJson method

Map<String, Object> toJson()

Converts a LimitRangeItem instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final temp$default = $default;
  final tempDefaultRequest = defaultRequest;
  final tempMax = max;
  final tempMaxLimitRequestRatio = maxLimitRequestRatio;
  final tempMin = min;
  final tempType = type;

  if (temp$default != null) {
    jsonData['default'] = temp$default;
  }

  if (tempDefaultRequest != null) {
    jsonData['defaultRequest'] = tempDefaultRequest;
  }

  if (tempMax != null) {
    jsonData['max'] = tempMax;
  }

  if (tempMaxLimitRequestRatio != null) {
    jsonData['maxLimitRequestRatio'] = tempMaxLimitRequestRatio;
  }

  if (tempMin != null) {
    jsonData['min'] = tempMin;
  }

  jsonData['type'] = tempType;

  return jsonData;
}