// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin
#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_PROTOLOG_CONFIG_PROTO_CPP_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_PROTOLOG_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 ProtoLogGroup;
class ProtoLogConfig;
enum ProtoLogLevel : int;
enum ProtoLogConfig_TracingMode : int;
}  // namespace perfetto
}  // namespace protos
}  // namespace gen

namespace protozero {
class Message;
}  // namespace protozero

namespace perfetto {
namespace protos {
namespace gen {
enum ProtoLogConfig_TracingMode : int {
  ProtoLogConfig_TracingMode_DEFAULT = 0,
  ProtoLogConfig_TracingMode_ENABLE_ALL = 1,
};

class PERFETTO_EXPORT_COMPONENT ProtoLogGroup : public ::protozero::CppMessageObj {
 public:
  enum FieldNumbers {
    kGroupNameFieldNumber = 1,
    kLogFromFieldNumber = 2,
    kCollectStacktraceFieldNumber = 3,
  };

  ProtoLogGroup();
  ~ProtoLogGroup() override;
  ProtoLogGroup(ProtoLogGroup&&) noexcept;
  ProtoLogGroup& operator=(ProtoLogGroup&&);
  ProtoLogGroup(const ProtoLogGroup&);
  ProtoLogGroup& operator=(const ProtoLogGroup&);
  bool operator==(const ProtoLogGroup&) const;
  bool operator!=(const ProtoLogGroup& 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_group_name() const { return _has_field_[1]; }
  const std::string& group_name() const { return group_name_; }
  void set_group_name(const std::string& value) { group_name_ = value; _has_field_.set(1); }

  bool has_log_from() const { return _has_field_[2]; }
  ProtoLogLevel log_from() const { return log_from_; }
  void set_log_from(ProtoLogLevel value) { log_from_ = value; _has_field_.set(2); }

  bool has_collect_stacktrace() const { return _has_field_[3]; }
  bool collect_stacktrace() const { return collect_stacktrace_; }
  void set_collect_stacktrace(bool value) { collect_stacktrace_ = value; _has_field_.set(3); }

 private:
  std::string group_name_{};
  ProtoLogLevel log_from_{};
  bool collect_stacktrace_{};

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

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


class PERFETTO_EXPORT_COMPONENT ProtoLogConfig : public ::protozero::CppMessageObj {
 public:
  using TracingMode = ProtoLogConfig_TracingMode;
  static constexpr auto DEFAULT = ProtoLogConfig_TracingMode_DEFAULT;
  static constexpr auto ENABLE_ALL = ProtoLogConfig_TracingMode_ENABLE_ALL;
  static constexpr auto TracingMode_MIN = ProtoLogConfig_TracingMode_DEFAULT;
  static constexpr auto TracingMode_MAX = ProtoLogConfig_TracingMode_ENABLE_ALL;
  enum FieldNumbers {
    kGroupOverridesFieldNumber = 1,
    kTracingModeFieldNumber = 2,
    kDefaultLogFromLevelFieldNumber = 3,
  };

  ProtoLogConfig();
  ~ProtoLogConfig() override;
  ProtoLogConfig(ProtoLogConfig&&) noexcept;
  ProtoLogConfig& operator=(ProtoLogConfig&&);
  ProtoLogConfig(const ProtoLogConfig&);
  ProtoLogConfig& operator=(const ProtoLogConfig&);
  bool operator==(const ProtoLogConfig&) const;
  bool operator!=(const ProtoLogConfig& 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;

  const std::vector<ProtoLogGroup>& group_overrides() const { return group_overrides_; }
  std::vector<ProtoLogGroup>* mutable_group_overrides() { return &group_overrides_; }
  int group_overrides_size() const;
  void clear_group_overrides();
  ProtoLogGroup* add_group_overrides();

  bool has_tracing_mode() const { return _has_field_[2]; }
  ProtoLogConfig_TracingMode tracing_mode() const { return tracing_mode_; }
  void set_tracing_mode(ProtoLogConfig_TracingMode value) { tracing_mode_ = value; _has_field_.set(2); }

  bool has_default_log_from_level() const { return _has_field_[3]; }
  ProtoLogLevel default_log_from_level() const { return default_log_from_level_; }
  void set_default_log_from_level(ProtoLogLevel value) { default_log_from_level_ = value; _has_field_.set(3); }

 private:
  std::vector<ProtoLogGroup> group_overrides_;
  ProtoLogConfig_TracingMode tracing_mode_{};
  ProtoLogLevel default_log_from_level_{};

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

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

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

#endif  // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_ANDROID_PROTOLOG_CONFIG_PROTO_CPP_H_
