// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.

#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_PERF_TRACE_COUNTERS_PROTO_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_FTRACE_PERF_TRACE_COUNTERS_PROTO_H_

#include <stddef.h>
#include <stdint.h>

#include "perfetto/protozero/field_writer.h"
#include "perfetto/protozero/message.h"
#include "perfetto/protozero/packed_repeated_fields.h"
#include "perfetto/protozero/proto_decoder.h"
#include "perfetto/protozero/proto_utils.h"


namespace perfetto {
namespace protos {
namespace pbzero {

class SchedSwitchWithCtrsFtraceEvent_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/23, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
 public:
  SchedSwitchWithCtrsFtraceEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
  explicit SchedSwitchWithCtrsFtraceEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
  explicit SchedSwitchWithCtrsFtraceEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
  bool has_old_pid() const { return at<1>().valid(); }
  int32_t old_pid() const { return at<1>().as_int32(); }
  bool has_new_pid() const { return at<2>().valid(); }
  int32_t new_pid() const { return at<2>().as_int32(); }
  bool has_cctr() const { return at<3>().valid(); }
  uint64_t cctr() const { return at<3>().as_uint64(); }
  bool has_ctr0() const { return at<4>().valid(); }
  uint64_t ctr0() const { return at<4>().as_uint64(); }
  bool has_ctr1() const { return at<5>().valid(); }
  uint64_t ctr1() const { return at<5>().as_uint64(); }
  bool has_ctr2() const { return at<6>().valid(); }
  uint64_t ctr2() const { return at<6>().as_uint64(); }
  bool has_ctr3() const { return at<7>().valid(); }
  uint64_t ctr3() const { return at<7>().as_uint64(); }
  bool has_lctr0() const { return at<8>().valid(); }
  uint32_t lctr0() const { return at<8>().as_uint32(); }
  bool has_lctr1() const { return at<9>().valid(); }
  uint32_t lctr1() const { return at<9>().as_uint32(); }
  bool has_ctr4() const { return at<10>().valid(); }
  uint64_t ctr4() const { return at<10>().as_uint64(); }
  bool has_ctr5() const { return at<11>().valid(); }
  uint64_t ctr5() const { return at<11>().as_uint64(); }
  bool has_prev_comm() const { return at<12>().valid(); }
  ::protozero::ConstChars prev_comm() const { return at<12>().as_string(); }
  bool has_prev_pid() const { return at<13>().valid(); }
  int32_t prev_pid() const { return at<13>().as_int32(); }
  bool has_cyc() const { return at<14>().valid(); }
  uint32_t cyc() const { return at<14>().as_uint32(); }
  bool has_inst() const { return at<15>().valid(); }
  uint32_t inst() const { return at<15>().as_uint32(); }
  bool has_stallbm() const { return at<16>().valid(); }
  uint32_t stallbm() const { return at<16>().as_uint32(); }
  bool has_l3dm() const { return at<17>().valid(); }
  uint32_t l3dm() const { return at<17>().as_uint32(); }
  bool has_next_pid() const { return at<18>().valid(); }
  int32_t next_pid() const { return at<18>().as_int32(); }
  bool has_next_comm() const { return at<19>().valid(); }
  ::protozero::ConstChars next_comm() const { return at<19>().as_string(); }
  bool has_prev_state() const { return at<20>().valid(); }
  int64_t prev_state() const { return at<20>().as_int64(); }
  bool has_amu0() const { return at<21>().valid(); }
  uint64_t amu0() const { return at<21>().as_uint64(); }
  bool has_amu1() const { return at<22>().valid(); }
  uint64_t amu1() const { return at<22>().as_uint64(); }
  bool has_amu2() const { return at<23>().valid(); }
  uint64_t amu2() const { return at<23>().as_uint64(); }
};

class SchedSwitchWithCtrsFtraceEvent : public ::protozero::Message {
 public:
  using Decoder = SchedSwitchWithCtrsFtraceEvent_Decoder;
  enum : int32_t {
    kOldPidFieldNumber = 1,
    kNewPidFieldNumber = 2,
    kCctrFieldNumber = 3,
    kCtr0FieldNumber = 4,
    kCtr1FieldNumber = 5,
    kCtr2FieldNumber = 6,
    kCtr3FieldNumber = 7,
    kLctr0FieldNumber = 8,
    kLctr1FieldNumber = 9,
    kCtr4FieldNumber = 10,
    kCtr5FieldNumber = 11,
    kPrevCommFieldNumber = 12,
    kPrevPidFieldNumber = 13,
    kCycFieldNumber = 14,
    kInstFieldNumber = 15,
    kStallbmFieldNumber = 16,
    kL3dmFieldNumber = 17,
    kNextPidFieldNumber = 18,
    kNextCommFieldNumber = 19,
    kPrevStateFieldNumber = 20,
    kAmu0FieldNumber = 21,
    kAmu1FieldNumber = 22,
    kAmu2FieldNumber = 23,
  };
  static constexpr const char* GetName() { return ".perfetto.protos.SchedSwitchWithCtrsFtraceEvent"; }


  using FieldMetadata_OldPid =
    ::protozero::proto_utils::FieldMetadata<
      1,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kInt32,
      int32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_OldPid kOldPid{};
  void set_old_pid(int32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_OldPid::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kInt32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_NewPid =
    ::protozero::proto_utils::FieldMetadata<
      2,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kInt32,
      int32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_NewPid kNewPid{};
  void set_new_pid(int32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_NewPid::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kInt32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Cctr =
    ::protozero::proto_utils::FieldMetadata<
      3,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Cctr kCctr{};
  void set_cctr(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Cctr::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr0 =
    ::protozero::proto_utils::FieldMetadata<
      4,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr0 kCtr0{};
  void set_ctr0(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr0::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr1 =
    ::protozero::proto_utils::FieldMetadata<
      5,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr1 kCtr1{};
  void set_ctr1(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr1::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr2 =
    ::protozero::proto_utils::FieldMetadata<
      6,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr2 kCtr2{};
  void set_ctr2(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr2::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr3 =
    ::protozero::proto_utils::FieldMetadata<
      7,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr3 kCtr3{};
  void set_ctr3(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr3::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Lctr0 =
    ::protozero::proto_utils::FieldMetadata<
      8,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Lctr0 kLctr0{};
  void set_lctr0(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Lctr0::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Lctr1 =
    ::protozero::proto_utils::FieldMetadata<
      9,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Lctr1 kLctr1{};
  void set_lctr1(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Lctr1::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr4 =
    ::protozero::proto_utils::FieldMetadata<
      10,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr4 kCtr4{};
  void set_ctr4(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr4::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Ctr5 =
    ::protozero::proto_utils::FieldMetadata<
      11,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Ctr5 kCtr5{};
  void set_ctr5(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Ctr5::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_PrevComm =
    ::protozero::proto_utils::FieldMetadata<
      12,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kString,
      std::string,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_PrevComm kPrevComm{};
  void set_prev_comm(const char* data, size_t size) {
    AppendBytes(FieldMetadata_PrevComm::kFieldId, data, size);
  }
  void set_prev_comm(::protozero::ConstChars chars) {
    AppendBytes(FieldMetadata_PrevComm::kFieldId, chars.data, chars.size);
  }
  void set_prev_comm(std::string value) {
    static constexpr uint32_t field_id = FieldMetadata_PrevComm::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kString>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_PrevPid =
    ::protozero::proto_utils::FieldMetadata<
      13,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kInt32,
      int32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_PrevPid kPrevPid{};
  void set_prev_pid(int32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_PrevPid::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kInt32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Cyc =
    ::protozero::proto_utils::FieldMetadata<
      14,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Cyc kCyc{};
  void set_cyc(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Cyc::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Inst =
    ::protozero::proto_utils::FieldMetadata<
      15,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Inst kInst{};
  void set_inst(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Inst::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Stallbm =
    ::protozero::proto_utils::FieldMetadata<
      16,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Stallbm kStallbm{};
  void set_stallbm(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Stallbm::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_L3dm =
    ::protozero::proto_utils::FieldMetadata<
      17,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint32,
      uint32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_L3dm kL3dm{};
  void set_l3dm(uint32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_L3dm::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_NextPid =
    ::protozero::proto_utils::FieldMetadata<
      18,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kInt32,
      int32_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_NextPid kNextPid{};
  void set_next_pid(int32_t value) {
    static constexpr uint32_t field_id = FieldMetadata_NextPid::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kInt32>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_NextComm =
    ::protozero::proto_utils::FieldMetadata<
      19,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kString,
      std::string,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_NextComm kNextComm{};
  void set_next_comm(const char* data, size_t size) {
    AppendBytes(FieldMetadata_NextComm::kFieldId, data, size);
  }
  void set_next_comm(::protozero::ConstChars chars) {
    AppendBytes(FieldMetadata_NextComm::kFieldId, chars.data, chars.size);
  }
  void set_next_comm(std::string value) {
    static constexpr uint32_t field_id = FieldMetadata_NextComm::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kString>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_PrevState =
    ::protozero::proto_utils::FieldMetadata<
      20,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kInt64,
      int64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_PrevState kPrevState{};
  void set_prev_state(int64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_PrevState::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kInt64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Amu0 =
    ::protozero::proto_utils::FieldMetadata<
      21,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Amu0 kAmu0{};
  void set_amu0(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Amu0::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Amu1 =
    ::protozero::proto_utils::FieldMetadata<
      22,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Amu1 kAmu1{};
  void set_amu1(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Amu1::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }

  using FieldMetadata_Amu2 =
    ::protozero::proto_utils::FieldMetadata<
      23,
      ::protozero::proto_utils::RepetitionType::kNotRepeated,
      ::protozero::proto_utils::ProtoSchemaType::kUint64,
      uint64_t,
      SchedSwitchWithCtrsFtraceEvent>;

  static constexpr FieldMetadata_Amu2 kAmu2{};
  void set_amu2(uint64_t value) {
    static constexpr uint32_t field_id = FieldMetadata_Amu2::kFieldId;
    // Call the appropriate protozero::Message::Append(field_id, ...)
    // method based on the type of the field.
    ::protozero::internal::FieldWriter<
      ::protozero::proto_utils::ProtoSchemaType::kUint64>
        ::Append(*this, field_id, value);
  }
};

} // Namespace.
} // Namespace.
} // Namespace.
#endif  // Include guard.
