// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin
#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_

#include <stdint.h>
#include <bitset>
#include <vector>
#include <string>
#include <type_traits>

#include "perfetto/protozero/cpp_message_obj.h"
#include "perfetto/protozero/copyable_ptr.h"
#include "perfetto/base/export.h"

namespace perfetto {
namespace protos {
namespace gen {
class NetworkPacketTraceConfig;
}  // namespace perfetto
}  // namespace protos
}  // namespace gen

namespace protozero {
class Message;
}  // namespace protozero

namespace perfetto {
namespace protos {
namespace gen {

class PERFETTO_EXPORT_COMPONENT NetworkPacketTraceConfig : public ::protozero::CppMessageObj {
 public:
  enum FieldNumbers {
    kPollMsFieldNumber = 1,
    kAggregationThresholdFieldNumber = 2,
    kInternLimitFieldNumber = 3,
    kDropLocalPortFieldNumber = 4,
    kDropRemotePortFieldNumber = 5,
    kDropTcpFlagsFieldNumber = 6,
  };

  NetworkPacketTraceConfig();
  ~NetworkPacketTraceConfig() override;
  NetworkPacketTraceConfig(NetworkPacketTraceConfig&&) noexcept;
  NetworkPacketTraceConfig& operator=(NetworkPacketTraceConfig&&);
  NetworkPacketTraceConfig(const NetworkPacketTraceConfig&);
  NetworkPacketTraceConfig& operator=(const NetworkPacketTraceConfig&);
  bool operator==(const NetworkPacketTraceConfig&) const;
  bool operator!=(const NetworkPacketTraceConfig& other) const { return !(*this == other); }

  bool ParseFromArray(const void*, size_t) override;
  std::string SerializeAsString() const override;
  std::vector<uint8_t> SerializeAsArray() const override;
  void Serialize(::protozero::Message*) const;

  bool has_poll_ms() const { return _has_field_[1]; }
  uint32_t poll_ms() const { return poll_ms_; }
  void set_poll_ms(uint32_t value) { poll_ms_ = value; _has_field_.set(1); }

  bool has_aggregation_threshold() const { return _has_field_[2]; }
  uint32_t aggregation_threshold() const { return aggregation_threshold_; }
  void set_aggregation_threshold(uint32_t value) { aggregation_threshold_ = value; _has_field_.set(2); }

  bool has_intern_limit() const { return _has_field_[3]; }
  uint32_t intern_limit() const { return intern_limit_; }
  void set_intern_limit(uint32_t value) { intern_limit_ = value; _has_field_.set(3); }

  bool has_drop_local_port() const { return _has_field_[4]; }
  bool drop_local_port() const { return drop_local_port_; }
  void set_drop_local_port(bool value) { drop_local_port_ = value; _has_field_.set(4); }

  bool has_drop_remote_port() const { return _has_field_[5]; }
  bool drop_remote_port() const { return drop_remote_port_; }
  void set_drop_remote_port(bool value) { drop_remote_port_ = value; _has_field_.set(5); }

  bool has_drop_tcp_flags() const { return _has_field_[6]; }
  bool drop_tcp_flags() const { return drop_tcp_flags_; }
  void set_drop_tcp_flags(bool value) { drop_tcp_flags_ = value; _has_field_.set(6); }

 private:
  uint32_t poll_ms_{};
  uint32_t aggregation_threshold_{};
  uint32_t intern_limit_{};
  bool drop_local_port_{};
  bool drop_remote_port_{};
  bool drop_tcp_flags_{};

  // Allows to preserve unknown protobuf fields for compatibility
  // with future versions of .proto files.
  std::string unknown_fields_;

  std::bitset<7> _has_field_{};
};

}  // namespace perfetto
}  // namespace protos
}  // namespace gen

#endif  // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_NETWORK_TRACE_CONFIG_PROTO_CPP_H_
