// @generated by thrift-lite.py; do not edit.
#pragma once

#include <bitset>
#include <cstddef>
#include <cstdint>
#include <map>
#include <set>
#include <span>
#include <string>
#include <string_view>
#include <vector>

#include <dwarfs/thrift_lite/concepts.h>
#include <dwarfs/thrift_lite/enum_traits.h>
#include <dwarfs/thrift_lite/field_ref.h>
#include <dwarfs/thrift_lite/types.h>

namespace dwarfs::thrift_lite {

struct writer_options;

} // namespace dwarfs::thrift_lite

namespace dwarfs::thrift::compression {

using UInt8 = std::uint8_t;
using UInt16 = std::uint16_t;
using UInt32 = std::uint32_t;
using UInt64 = std::uint64_t;

class flac_block_header final {
 public:
  flac_block_header();
  flac_block_header(flac_block_header const&);
  flac_block_header(flac_block_header&&) noexcept;
  auto operator=(flac_block_header const&) -> flac_block_header&;
  auto operator=(flac_block_header&&) noexcept -> flac_block_header&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(flac_block_header const& lhs, flac_block_header const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto num_channels() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{num_channels_};
  }
  auto num_channels_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{num_channels_};
  }
  auto num_channels() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{num_channels_};
  }
  auto num_channels_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{num_channels_};
  }

  auto bits_per_sample() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{bits_per_sample_};
  }
  auto bits_per_sample_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{bits_per_sample_};
  }
  auto bits_per_sample() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{bits_per_sample_};
  }
  auto bits_per_sample_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{bits_per_sample_};
  }

  auto flags() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{flags_};
  }
  auto flags_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{flags_};
  }
  auto flags() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{flags_};
  }
  auto flags_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{flags_};
  }

 private:
  UInt16 num_channels_{};
  UInt8 bits_per_sample_{};
  UInt8 flags_{};
};

class ricepp_block_header final {
 public:
  ricepp_block_header();
  ricepp_block_header(ricepp_block_header const&);
  ricepp_block_header(ricepp_block_header&&) noexcept;
  auto operator=(ricepp_block_header const&) -> ricepp_block_header&;
  auto operator=(ricepp_block_header&&) noexcept -> ricepp_block_header&;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
  friend bool operator==(ricepp_block_header const& lhs, ricepp_block_header const& rhs) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

  void read(::dwarfs::thrift_lite::protocol_reader_type auto& r);
  void write(::dwarfs::thrift_lite::protocol_writer_type auto& w) const;

  [[nodiscard]] auto has_any_fields_for_write(::dwarfs::thrift_lite::writer_options const& opts) const noexcept -> bool;

  auto block_size() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32&>{block_size_};
  }
  auto block_size() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }
  auto block_size_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt32 const&>{block_size_};
  }

  auto component_count() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{component_count_};
  }
  auto component_count_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{component_count_};
  }
  auto component_count() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{component_count_};
  }
  auto component_count_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{component_count_};
  }

  auto bytes_per_sample() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{bytes_per_sample_};
  }
  auto bytes_per_sample_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{bytes_per_sample_};
  }
  auto bytes_per_sample() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{bytes_per_sample_};
  }
  auto bytes_per_sample_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{bytes_per_sample_};
  }

  auto unused_lsb_count() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{unused_lsb_count_};
  }
  auto unused_lsb_count_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8&>{unused_lsb_count_};
  }
  auto unused_lsb_count() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{unused_lsb_count_};
  }
  auto unused_lsb_count_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt8 const&>{unused_lsb_count_};
  }

  auto big_endian() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{big_endian_};
  }
  auto big_endian_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool&>{big_endian_};
  }
  auto big_endian() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{big_endian_};
  }
  auto big_endian_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<bool const&>{big_endian_};
  }

  auto ricepp_version() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{ricepp_version_};
  }
  auto ricepp_version_ref() & noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16&>{ricepp_version_};
  }
  auto ricepp_version() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{ricepp_version_};
  }
  auto ricepp_version_ref() const& noexcept {
    return ::dwarfs::thrift_lite::field_ref<UInt16 const&>{ricepp_version_};
  }

 private:
  UInt32 block_size_{};
  UInt16 component_count_{};
  UInt8 bytes_per_sample_{};
  UInt8 unused_lsb_count_{};
  bool big_endian_{};
  UInt16 ricepp_version_{};
};

} // namespace dwarfs::thrift::compression

namespace dwarfs::thrift_lite {

} // namespace dwarfs::thrift_lite

#include "compression_types-inl.h"
