create static method

OptimizeStorage create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "optimizeStorage",
  3. String special_return_type = "storageStatistics",
  4. bool? is_tdlib_method,
  5. num? size,
  6. num? ttl,
  7. num? count,
  8. num? immunity_delay,
  9. List<FileType>? file_types,
  10. List<num>? chat_ids,
  11. List<num>? exclude_chat_ids,
  12. bool? return_deleted_file_statistics,
  13. num? chat_limit,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static OptimizeStorage create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "optimizeStorage",
  String special_return_type = "storageStatistics",
  bool? is_tdlib_method,
  num? size,
  num? ttl,
  num? count,
  num? immunity_delay,
  List<FileType>? file_types,
  List<num>? chat_ids,
  List<num>? exclude_chat_ids,
  bool? return_deleted_file_statistics,
  num? chat_limit,
}) {
  // OptimizeStorage optimizeStorage = OptimizeStorage({
  final Map optimizeStorage_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "size": size,
    "ttl": ttl,
    "count": count,
    "immunity_delay": immunity_delay,
    "file_types": (file_types != null) ? file_types.toJson() : null,
    "chat_ids": chat_ids,
    "exclude_chat_ids": exclude_chat_ids,
    "return_deleted_file_statistics": return_deleted_file_statistics,
    "chat_limit": chat_limit,
  };

  optimizeStorage_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (optimizeStorage_data_create_json.containsKey(key) == false) {
        optimizeStorage_data_create_json[key] = value;
      }
    });
  }
  return OptimizeStorage(optimizeStorage_data_create_json);
}