// @generated
// -----------------------------------------------------------------------------
// Auto-generated by tools/c_api_gen/auto_simple_bindings.py.
// DO NOT EDIT THIS FILE DIRECTLY.
// Sources:
//   - include/rocksdb/options.h
//   - tools/c_api_gen/auto_simple_bindings_blocklist.json
//   - include/rocksdb/c.h
//   - tools/c_api_gen/c_base.cc
// -----------------------------------------------------------------------------

// To regenerate this file:
//   python3 tools/c_api_gen/auto_simple_bindings.py

// Output group: Auto-discovered ReadOptions simple

/* ReadOptions */

void rocksdb_readoptions_set_deadline(rocksdb_readoptions_t* opt,
                                      uint64_t microseconds) {
  opt->rep.deadline = std::chrono::microseconds(microseconds);
}

uint64_t rocksdb_readoptions_get_deadline(rocksdb_readoptions_t* opt) {
  return opt->rep.deadline.count();
}

void rocksdb_readoptions_set_io_timeout(rocksdb_readoptions_t* opt,
                                        uint64_t microseconds) {
  opt->rep.io_timeout = std::chrono::microseconds(microseconds);
}

uint64_t rocksdb_readoptions_get_io_timeout(rocksdb_readoptions_t* opt) {
  return opt->rep.io_timeout.count();
}

void rocksdb_readoptions_set_read_tier(rocksdb_readoptions_t* opt, int v) {
  opt->rep.read_tier = static_cast<decltype(opt->rep.read_tier)>(v);
}

int rocksdb_readoptions_get_read_tier(rocksdb_readoptions_t* opt) {
  return static_cast<int>(opt->rep.read_tier);
}

void rocksdb_readoptions_set_rate_limiter_priority(rocksdb_readoptions_t* opt,
                                                   int v) {
  opt->rep.rate_limiter_priority =
      static_cast<decltype(opt->rep.rate_limiter_priority)>(v);
}

int rocksdb_readoptions_get_rate_limiter_priority(rocksdb_readoptions_t* opt) {
  return static_cast<int>(opt->rep.rate_limiter_priority);
}

void rocksdb_readoptions_set_value_size_soft_limit(rocksdb_readoptions_t* opt,
                                                   uint64_t v) {
  opt->rep.value_size_soft_limit = v;
}

uint64_t rocksdb_readoptions_get_value_size_soft_limit(
    rocksdb_readoptions_t* opt) {
  return opt->rep.value_size_soft_limit;
}

void rocksdb_readoptions_set_verify_checksums(rocksdb_readoptions_t* opt,
                                              unsigned char v) {
  opt->rep.verify_checksums = v;
}

unsigned char rocksdb_readoptions_get_verify_checksums(
    rocksdb_readoptions_t* opt) {
  return opt->rep.verify_checksums;
}

void rocksdb_readoptions_set_fill_cache(rocksdb_readoptions_t* opt,
                                        unsigned char v) {
  opt->rep.fill_cache = v;
}

unsigned char rocksdb_readoptions_get_fill_cache(rocksdb_readoptions_t* opt) {
  return opt->rep.fill_cache;
}

void rocksdb_readoptions_set_ignore_range_deletions(rocksdb_readoptions_t* opt,
                                                    unsigned char v) {
  opt->rep.ignore_range_deletions = v;
}

unsigned char rocksdb_readoptions_get_ignore_range_deletions(
    rocksdb_readoptions_t* opt) {
  return opt->rep.ignore_range_deletions;
}

void rocksdb_readoptions_set_async_io(rocksdb_readoptions_t* opt,
                                      unsigned char v) {
  opt->rep.async_io = v;
}

unsigned char rocksdb_readoptions_get_async_io(rocksdb_readoptions_t* opt) {
  return opt->rep.async_io;
}

void rocksdb_readoptions_set_optimize_multiget_for_io(
    rocksdb_readoptions_t* opt, unsigned char v) {
  opt->rep.optimize_multiget_for_io = v;
}

unsigned char rocksdb_readoptions_get_optimize_multiget_for_io(
    rocksdb_readoptions_t* opt) {
  return opt->rep.optimize_multiget_for_io;
}

void rocksdb_readoptions_set_readahead_size(rocksdb_readoptions_t* opt,
                                            size_t v) {
  opt->rep.readahead_size = v;
}

size_t rocksdb_readoptions_get_readahead_size(rocksdb_readoptions_t* opt) {
  return opt->rep.readahead_size;
}

void rocksdb_readoptions_set_max_skippable_internal_keys(
    rocksdb_readoptions_t* opt, uint64_t v) {
  opt->rep.max_skippable_internal_keys = v;
}

uint64_t rocksdb_readoptions_get_max_skippable_internal_keys(
    rocksdb_readoptions_t* opt) {
  return opt->rep.max_skippable_internal_keys;
}

void rocksdb_readoptions_set_tailing(rocksdb_readoptions_t* opt,
                                     unsigned char v) {
  opt->rep.tailing = v;
}

unsigned char rocksdb_readoptions_get_tailing(rocksdb_readoptions_t* opt) {
  return opt->rep.tailing;
}

void rocksdb_readoptions_set_total_order_seek(rocksdb_readoptions_t* opt,
                                              unsigned char v) {
  opt->rep.total_order_seek = v;
}

unsigned char rocksdb_readoptions_get_total_order_seek(
    rocksdb_readoptions_t* opt) {
  return opt->rep.total_order_seek;
}

void rocksdb_readoptions_set_auto_prefix_mode(rocksdb_readoptions_t* opt,
                                              unsigned char v) {
  opt->rep.auto_prefix_mode = v;
}

unsigned char rocksdb_readoptions_get_auto_prefix_mode(
    rocksdb_readoptions_t* opt) {
  return opt->rep.auto_prefix_mode;
}

void rocksdb_readoptions_set_prefix_same_as_start(rocksdb_readoptions_t* opt,
                                                  unsigned char v) {
  opt->rep.prefix_same_as_start = v;
}

unsigned char rocksdb_readoptions_get_prefix_same_as_start(
    rocksdb_readoptions_t* opt) {
  return opt->rep.prefix_same_as_start;
}

void rocksdb_readoptions_set_pin_data(rocksdb_readoptions_t* opt,
                                      unsigned char v) {
  opt->rep.pin_data = v;
}

unsigned char rocksdb_readoptions_get_pin_data(rocksdb_readoptions_t* opt) {
  return opt->rep.pin_data;
}

void rocksdb_readoptions_set_adaptive_readahead(rocksdb_readoptions_t* opt,
                                                unsigned char v) {
  opt->rep.adaptive_readahead = v;
}

unsigned char rocksdb_readoptions_get_adaptive_readahead(
    rocksdb_readoptions_t* opt) {
  return opt->rep.adaptive_readahead;
}

void rocksdb_readoptions_set_background_purge_on_iterator_cleanup(
    rocksdb_readoptions_t* opt, unsigned char v) {
  opt->rep.background_purge_on_iterator_cleanup = v;
}

unsigned char rocksdb_readoptions_get_background_purge_on_iterator_cleanup(
    rocksdb_readoptions_t* opt) {
  return opt->rep.background_purge_on_iterator_cleanup;
}

void rocksdb_readoptions_set_auto_readahead_size(rocksdb_readoptions_t* opt,
                                                 unsigned char v) {
  opt->rep.auto_readahead_size = v;
}

unsigned char rocksdb_readoptions_get_auto_readahead_size(
    rocksdb_readoptions_t* opt) {
  return opt->rep.auto_readahead_size;
}

void rocksdb_readoptions_set_allow_unprepared_value(rocksdb_readoptions_t* opt,
                                                    unsigned char v) {
  opt->rep.allow_unprepared_value = v;
}

unsigned char rocksdb_readoptions_get_allow_unprepared_value(
    rocksdb_readoptions_t* opt) {
  return opt->rep.allow_unprepared_value;
}

void rocksdb_readoptions_set_auto_refresh_iterator_with_snapshot(
    rocksdb_readoptions_t* opt, unsigned char v) {
  opt->rep.auto_refresh_iterator_with_snapshot = v;
}

unsigned char rocksdb_readoptions_get_auto_refresh_iterator_with_snapshot(
    rocksdb_readoptions_t* opt) {
  return opt->rep.auto_refresh_iterator_with_snapshot;
}

void rocksdb_readoptions_set_io_activity(rocksdb_readoptions_t* opt, int v) {
  opt->rep.io_activity = static_cast<decltype(opt->rep.io_activity)>(v);
}

int rocksdb_readoptions_get_io_activity(rocksdb_readoptions_t* opt) {
  return static_cast<int>(opt->rep.io_activity);
}
