// @generated
// -----------------------------------------------------------------------------
// Auto-generated by tools/c_api_gen/generate_c_api.py.
// DO NOT EDIT THIS FILE DIRECTLY.
// Source: tools/c_api_gen/spec.json
// -----------------------------------------------------------------------------

// To regenerate this file:
//   python3 tools/c_api_gen/generate_c_api.py
//     --spec tools/c_api_gen/spec.json --section 'JobInfo metadata simple'
//     --header-out
//     c_api_gen/c_generated_jobinfo_metadata_subset.h.inc
//     --source-out
//     c_api_gen/c_generated_jobinfo_metadata_subset.cc.inc

/* JobInfo metadata simple */

size_t rocksdb_compactionjobinfo_input_files_count(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.input_files.size();
}

size_t rocksdb_compactionjobinfo_output_files_count(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.output_files.size();
}

uint64_t rocksdb_compactionjobinfo_elapsed_micros(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.elapsed_micros;
}

uint64_t rocksdb_compactionjobinfo_num_corrupt_keys(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.num_corrupt_keys;
}

uint64_t rocksdb_compactionjobinfo_input_records(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.num_input_records;
}

uint64_t rocksdb_compactionjobinfo_output_records(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.num_output_records;
}

uint64_t rocksdb_compactionjobinfo_total_input_bytes(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.total_input_bytes;
}

uint64_t rocksdb_compactionjobinfo_total_output_bytes(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.total_output_bytes;
}

size_t rocksdb_compactionjobinfo_num_input_files(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.num_input_files;
}

size_t rocksdb_compactionjobinfo_num_input_files_at_output_level(
    const rocksdb_compactionjobinfo_t* info) {
  return info->rep.stats.num_input_files_at_output_level;
}

const char* rocksdb_writestallinfo_cf_name(const rocksdb_writestallinfo_t* info,
                                           size_t* size) {
  *size = info->rep.cf_name.size();
  return info->rep.cf_name.data();
}

const rocksdb_writestallcondition_t* rocksdb_writestallinfo_cur(
    const rocksdb_writestallinfo_t* info) {
  return reinterpret_cast<const rocksdb_writestallcondition_t*>(
      &info->rep.condition.cur);
}

const rocksdb_writestallcondition_t* rocksdb_writestallinfo_prev(
    const rocksdb_writestallinfo_t* info) {
  return reinterpret_cast<const rocksdb_writestallcondition_t*>(
      &info->rep.condition.prev);
}
