// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: flwr/proto/task.proto

#include "flwr/proto/task.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace flwr {
namespace proto {
constexpr Task::Task(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : ancestry_()
  , delivered_at_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , task_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , producer_(nullptr)
  , consumer_(nullptr)
  , recordset_(nullptr)
  , error_(nullptr)
  , created_at_(0)
  , pushed_at_(0)
  , ttl_(0){}
struct TaskDefaultTypeInternal {
  constexpr TaskDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TaskDefaultTypeInternal() {}
  union {
    Task _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TaskDefaultTypeInternal _Task_default_instance_;
constexpr TaskIns::TaskIns(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : task_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , group_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , task_(nullptr)
  , run_id_(int64_t{0}){}
struct TaskInsDefaultTypeInternal {
  constexpr TaskInsDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TaskInsDefaultTypeInternal() {}
  union {
    TaskIns _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TaskInsDefaultTypeInternal _TaskIns_default_instance_;
constexpr TaskRes::TaskRes(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : task_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , group_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , task_(nullptr)
  , run_id_(int64_t{0}){}
struct TaskResDefaultTypeInternal {
  constexpr TaskResDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TaskResDefaultTypeInternal() {}
  union {
    TaskRes _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TaskResDefaultTypeInternal _TaskRes_default_instance_;
}  // namespace proto
}  // namespace flwr
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_flwr_2fproto_2ftask_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_flwr_2fproto_2ftask_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_flwr_2fproto_2ftask_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_flwr_2fproto_2ftask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, producer_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, consumer_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, created_at_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, delivered_at_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, pushed_at_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, ttl_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, ancestry_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, task_type_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, recordset_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::Task, error_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskIns, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskIns, task_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskIns, group_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskIns, run_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskIns, task_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskRes, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskRes, task_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskRes, group_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskRes, run_id_),
  PROTOBUF_FIELD_OFFSET(::flwr::proto::TaskRes, task_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::flwr::proto::Task)},
  { 16, -1, -1, sizeof(::flwr::proto::TaskIns)},
  { 26, -1, -1, sizeof(::flwr::proto::TaskRes)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::flwr::proto::_Task_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::flwr::proto::_TaskIns_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::flwr::proto::_TaskRes_default_instance_),
};

const char descriptor_table_protodef_flwr_2fproto_2ftask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\025flwr/proto/task.proto\022\nflwr.proto\032\025flw"
  "r/proto/node.proto\032\032flwr/proto/recordset"
  ".proto\032\032flwr/proto/transport.proto\032\026flwr"
  "/proto/error.proto\"\211\002\n\004Task\022\"\n\010producer\030"
  "\001 \001(\0132\020.flwr.proto.Node\022\"\n\010consumer\030\002 \001("
  "\0132\020.flwr.proto.Node\022\022\n\ncreated_at\030\003 \001(\001\022"
  "\024\n\014delivered_at\030\004 \001(\t\022\021\n\tpushed_at\030\005 \001(\001"
  "\022\013\n\003ttl\030\006 \001(\001\022\020\n\010ancestry\030\007 \003(\t\022\021\n\ttask_"
  "type\030\010 \001(\t\022(\n\trecordset\030\t \001(\0132\025.flwr.pro"
  "to.RecordSet\022 \n\005error\030\n \001(\0132\021.flwr.proto"
  ".Error\"\\\n\007TaskIns\022\017\n\007task_id\030\001 \001(\t\022\020\n\010gr"
  "oup_id\030\002 \001(\t\022\016\n\006run_id\030\003 \001(\022\022\036\n\004task\030\004 \001"
  "(\0132\020.flwr.proto.Task\"\\\n\007TaskRes\022\017\n\007task_"
  "id\030\001 \001(\t\022\020\n\010group_id\030\002 \001(\t\022\016\n\006run_id\030\003 \001"
  "(\022\022\036\n\004task\030\004 \001(\0132\020.flwr.proto.Taskb\006prot"
  "o3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_flwr_2fproto_2ftask_2eproto_deps[4] = {
  &::descriptor_table_flwr_2fproto_2ferror_2eproto,
  &::descriptor_table_flwr_2fproto_2fnode_2eproto,
  &::descriptor_table_flwr_2fproto_2frecordset_2eproto,
  &::descriptor_table_flwr_2fproto_2ftransport_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_flwr_2fproto_2ftask_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_flwr_2fproto_2ftask_2eproto = {
  false, false, 602, descriptor_table_protodef_flwr_2fproto_2ftask_2eproto, "flwr/proto/task.proto", 
  &descriptor_table_flwr_2fproto_2ftask_2eproto_once, descriptor_table_flwr_2fproto_2ftask_2eproto_deps, 4, 3,
  schemas, file_default_instances, TableStruct_flwr_2fproto_2ftask_2eproto::offsets,
  file_level_metadata_flwr_2fproto_2ftask_2eproto, file_level_enum_descriptors_flwr_2fproto_2ftask_2eproto, file_level_service_descriptors_flwr_2fproto_2ftask_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_flwr_2fproto_2ftask_2eproto_getter() {
  return &descriptor_table_flwr_2fproto_2ftask_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_flwr_2fproto_2ftask_2eproto(&descriptor_table_flwr_2fproto_2ftask_2eproto);
namespace flwr {
namespace proto {

// ===================================================================

class Task::_Internal {
 public:
  static const ::flwr::proto::Node& producer(const Task* msg);
  static const ::flwr::proto::Node& consumer(const Task* msg);
  static const ::flwr::proto::RecordSet& recordset(const Task* msg);
  static const ::flwr::proto::Error& error(const Task* msg);
};

const ::flwr::proto::Node&
Task::_Internal::producer(const Task* msg) {
  return *msg->producer_;
}
const ::flwr::proto::Node&
Task::_Internal::consumer(const Task* msg) {
  return *msg->consumer_;
}
const ::flwr::proto::RecordSet&
Task::_Internal::recordset(const Task* msg) {
  return *msg->recordset_;
}
const ::flwr::proto::Error&
Task::_Internal::error(const Task* msg) {
  return *msg->error_;
}
void Task::clear_producer() {
  if (GetArenaForAllocation() == nullptr && producer_ != nullptr) {
    delete producer_;
  }
  producer_ = nullptr;
}
void Task::clear_consumer() {
  if (GetArenaForAllocation() == nullptr && consumer_ != nullptr) {
    delete consumer_;
  }
  consumer_ = nullptr;
}
void Task::clear_recordset() {
  if (GetArenaForAllocation() == nullptr && recordset_ != nullptr) {
    delete recordset_;
  }
  recordset_ = nullptr;
}
void Task::clear_error() {
  if (GetArenaForAllocation() == nullptr && error_ != nullptr) {
    delete error_;
  }
  error_ = nullptr;
}
Task::Task(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  ancestry_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:flwr.proto.Task)
}
Task::Task(const Task& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      ancestry_(from.ancestry_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  delivered_at_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_delivered_at().empty()) {
    delivered_at_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_delivered_at(), 
      GetArenaForAllocation());
  }
  task_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_task_type().empty()) {
    task_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_task_type(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_producer()) {
    producer_ = new ::flwr::proto::Node(*from.producer_);
  } else {
    producer_ = nullptr;
  }
  if (from._internal_has_consumer()) {
    consumer_ = new ::flwr::proto::Node(*from.consumer_);
  } else {
    consumer_ = nullptr;
  }
  if (from._internal_has_recordset()) {
    recordset_ = new ::flwr::proto::RecordSet(*from.recordset_);
  } else {
    recordset_ = nullptr;
  }
  if (from._internal_has_error()) {
    error_ = new ::flwr::proto::Error(*from.error_);
  } else {
    error_ = nullptr;
  }
  ::memcpy(&created_at_, &from.created_at_,
    static_cast<size_t>(reinterpret_cast<char*>(&ttl_) -
    reinterpret_cast<char*>(&created_at_)) + sizeof(ttl_));
  // @@protoc_insertion_point(copy_constructor:flwr.proto.Task)
}

void Task::SharedCtor() {
delivered_at_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
task_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&producer_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&ttl_) -
    reinterpret_cast<char*>(&producer_)) + sizeof(ttl_));
}

Task::~Task() {
  // @@protoc_insertion_point(destructor:flwr.proto.Task)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void Task::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  delivered_at_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  task_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete producer_;
  if (this != internal_default_instance()) delete consumer_;
  if (this != internal_default_instance()) delete recordset_;
  if (this != internal_default_instance()) delete error_;
}

void Task::ArenaDtor(void* object) {
  Task* _this = reinterpret_cast< Task* >(object);
  (void)_this;
}
void Task::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Task::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Task::Clear() {
// @@protoc_insertion_point(message_clear_start:flwr.proto.Task)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ancestry_.Clear();
  delivered_at_.ClearToEmpty();
  task_type_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && producer_ != nullptr) {
    delete producer_;
  }
  producer_ = nullptr;
  if (GetArenaForAllocation() == nullptr && consumer_ != nullptr) {
    delete consumer_;
  }
  consumer_ = nullptr;
  if (GetArenaForAllocation() == nullptr && recordset_ != nullptr) {
    delete recordset_;
  }
  recordset_ = nullptr;
  if (GetArenaForAllocation() == nullptr && error_ != nullptr) {
    delete error_;
  }
  error_ = nullptr;
  ::memset(&created_at_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&ttl_) -
      reinterpret_cast<char*>(&created_at_)) + sizeof(ttl_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Task::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .flwr.proto.Node producer = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_producer(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .flwr.proto.Node consumer = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_consumer(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // double created_at = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 25)) {
          created_at_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // string delivered_at = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_delivered_at();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.Task.delivered_at"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // double pushed_at = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) {
          pushed_at_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // double ttl = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) {
          ttl_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // repeated string ancestry = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_ancestry();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.Task.ancestry"));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else
          goto handle_unusual;
        continue;
      // string task_type = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
          auto str = _internal_mutable_task_type();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.Task.task_type"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .flwr.proto.RecordSet recordset = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_recordset(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .flwr.proto.Error error = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Task::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:flwr.proto.Task)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .flwr.proto.Node producer = 1;
  if (this->_internal_has_producer()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::producer(this), target, stream);
  }

  // .flwr.proto.Node consumer = 2;
  if (this->_internal_has_consumer()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::consumer(this), target, stream);
  }

  // double created_at = 3;
  if (!(this->_internal_created_at() <= 0 && this->_internal_created_at() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(3, this->_internal_created_at(), target);
  }

  // string delivered_at = 4;
  if (!this->_internal_delivered_at().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_delivered_at().data(), static_cast<int>(this->_internal_delivered_at().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.Task.delivered_at");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_delivered_at(), target);
  }

  // double pushed_at = 5;
  if (!(this->_internal_pushed_at() <= 0 && this->_internal_pushed_at() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->_internal_pushed_at(), target);
  }

  // double ttl = 6;
  if (!(this->_internal_ttl() <= 0 && this->_internal_ttl() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->_internal_ttl(), target);
  }

  // repeated string ancestry = 7;
  for (int i = 0, n = this->_internal_ancestry_size(); i < n; i++) {
    const auto& s = this->_internal_ancestry(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.Task.ancestry");
    target = stream->WriteString(7, s, target);
  }

  // string task_type = 8;
  if (!this->_internal_task_type().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_task_type().data(), static_cast<int>(this->_internal_task_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.Task.task_type");
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_task_type(), target);
  }

  // .flwr.proto.RecordSet recordset = 9;
  if (this->_internal_has_recordset()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::recordset(this), target, stream);
  }

  // .flwr.proto.Error error = 10;
  if (this->_internal_has_error()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::error(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:flwr.proto.Task)
  return target;
}

size_t Task::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:flwr.proto.Task)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string ancestry = 7;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(ancestry_.size());
  for (int i = 0, n = ancestry_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      ancestry_.Get(i));
  }

  // string delivered_at = 4;
  if (!this->_internal_delivered_at().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_delivered_at());
  }

  // string task_type = 8;
  if (!this->_internal_task_type().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_task_type());
  }

  // .flwr.proto.Node producer = 1;
  if (this->_internal_has_producer()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *producer_);
  }

  // .flwr.proto.Node consumer = 2;
  if (this->_internal_has_consumer()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *consumer_);
  }

  // .flwr.proto.RecordSet recordset = 9;
  if (this->_internal_has_recordset()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *recordset_);
  }

  // .flwr.proto.Error error = 10;
  if (this->_internal_has_error()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *error_);
  }

  // double created_at = 3;
  if (!(this->_internal_created_at() <= 0 && this->_internal_created_at() >= 0)) {
    total_size += 1 + 8;
  }

  // double pushed_at = 5;
  if (!(this->_internal_pushed_at() <= 0 && this->_internal_pushed_at() >= 0)) {
    total_size += 1 + 8;
  }

  // double ttl = 6;
  if (!(this->_internal_ttl() <= 0 && this->_internal_ttl() >= 0)) {
    total_size += 1 + 8;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Task::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    Task::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Task::GetClassData() const { return &_class_data_; }

void Task::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Task *>(to)->MergeFrom(
      static_cast<const Task &>(from));
}


void Task::MergeFrom(const Task& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:flwr.proto.Task)
  GOOGLE_DCHECK_NE(&from, this);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  ancestry_.MergeFrom(from.ancestry_);
  if (!from._internal_delivered_at().empty()) {
    _internal_set_delivered_at(from._internal_delivered_at());
  }
  if (!from._internal_task_type().empty()) {
    _internal_set_task_type(from._internal_task_type());
  }
  if (from._internal_has_producer()) {
    _internal_mutable_producer()->::flwr::proto::Node::MergeFrom(from._internal_producer());
  }
  if (from._internal_has_consumer()) {
    _internal_mutable_consumer()->::flwr::proto::Node::MergeFrom(from._internal_consumer());
  }
  if (from._internal_has_recordset()) {
    _internal_mutable_recordset()->::flwr::proto::RecordSet::MergeFrom(from._internal_recordset());
  }
  if (from._internal_has_error()) {
    _internal_mutable_error()->::flwr::proto::Error::MergeFrom(from._internal_error());
  }
  if (!(from._internal_created_at() <= 0 && from._internal_created_at() >= 0)) {
    _internal_set_created_at(from._internal_created_at());
  }
  if (!(from._internal_pushed_at() <= 0 && from._internal_pushed_at() >= 0)) {
    _internal_set_pushed_at(from._internal_pushed_at());
  }
  if (!(from._internal_ttl() <= 0 && from._internal_ttl() >= 0)) {
    _internal_set_ttl(from._internal_ttl());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Task::CopyFrom(const Task& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:flwr.proto.Task)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Task::IsInitialized() const {
  return true;
}

void Task::InternalSwap(Task* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ancestry_.InternalSwap(&other->ancestry_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &delivered_at_, lhs_arena,
      &other->delivered_at_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &task_type_, lhs_arena,
      &other->task_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Task, ttl_)
      + sizeof(Task::ttl_)
      - PROTOBUF_FIELD_OFFSET(Task, producer_)>(
          reinterpret_cast<char*>(&producer_),
          reinterpret_cast<char*>(&other->producer_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Task::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_flwr_2fproto_2ftask_2eproto_getter, &descriptor_table_flwr_2fproto_2ftask_2eproto_once,
      file_level_metadata_flwr_2fproto_2ftask_2eproto[0]);
}

// ===================================================================

class TaskIns::_Internal {
 public:
  static const ::flwr::proto::Task& task(const TaskIns* msg);
};

const ::flwr::proto::Task&
TaskIns::_Internal::task(const TaskIns* msg) {
  return *msg->task_;
}
TaskIns::TaskIns(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:flwr.proto.TaskIns)
}
TaskIns::TaskIns(const TaskIns& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  task_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_task_id().empty()) {
    task_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_task_id(), 
      GetArenaForAllocation());
  }
  group_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_group_id().empty()) {
    group_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_group_id(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_task()) {
    task_ = new ::flwr::proto::Task(*from.task_);
  } else {
    task_ = nullptr;
  }
  run_id_ = from.run_id_;
  // @@protoc_insertion_point(copy_constructor:flwr.proto.TaskIns)
}

void TaskIns::SharedCtor() {
task_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
group_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&task_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&run_id_) -
    reinterpret_cast<char*>(&task_)) + sizeof(run_id_));
}

TaskIns::~TaskIns() {
  // @@protoc_insertion_point(destructor:flwr.proto.TaskIns)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void TaskIns::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  task_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  group_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete task_;
}

void TaskIns::ArenaDtor(void* object) {
  TaskIns* _this = reinterpret_cast< TaskIns* >(object);
  (void)_this;
}
void TaskIns::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TaskIns::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void TaskIns::Clear() {
// @@protoc_insertion_point(message_clear_start:flwr.proto.TaskIns)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  task_id_.ClearToEmpty();
  group_id_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && task_ != nullptr) {
    delete task_;
  }
  task_ = nullptr;
  run_id_ = int64_t{0};
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TaskIns::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string task_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_task_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.TaskIns.task_id"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string group_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_group_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.TaskIns.group_id"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // sint64 run_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          run_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .flwr.proto.Task task = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_task(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* TaskIns::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:flwr.proto.TaskIns)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string task_id = 1;
  if (!this->_internal_task_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_task_id().data(), static_cast<int>(this->_internal_task_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.TaskIns.task_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_task_id(), target);
  }

  // string group_id = 2;
  if (!this->_internal_group_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_group_id().data(), static_cast<int>(this->_internal_group_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.TaskIns.group_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_group_id(), target);
  }

  // sint64 run_id = 3;
  if (this->_internal_run_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt64ToArray(3, this->_internal_run_id(), target);
  }

  // .flwr.proto.Task task = 4;
  if (this->_internal_has_task()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::task(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:flwr.proto.TaskIns)
  return target;
}

size_t TaskIns::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:flwr.proto.TaskIns)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string task_id = 1;
  if (!this->_internal_task_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_task_id());
  }

  // string group_id = 2;
  if (!this->_internal_group_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_group_id());
  }

  // .flwr.proto.Task task = 4;
  if (this->_internal_has_task()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *task_);
  }

  // sint64 run_id = 3;
  if (this->_internal_run_id() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt64SizePlusOne(this->_internal_run_id());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TaskIns::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    TaskIns::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TaskIns::GetClassData() const { return &_class_data_; }

void TaskIns::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TaskIns *>(to)->MergeFrom(
      static_cast<const TaskIns &>(from));
}


void TaskIns::MergeFrom(const TaskIns& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:flwr.proto.TaskIns)
  GOOGLE_DCHECK_NE(&from, this);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_task_id().empty()) {
    _internal_set_task_id(from._internal_task_id());
  }
  if (!from._internal_group_id().empty()) {
    _internal_set_group_id(from._internal_group_id());
  }
  if (from._internal_has_task()) {
    _internal_mutable_task()->::flwr::proto::Task::MergeFrom(from._internal_task());
  }
  if (from._internal_run_id() != 0) {
    _internal_set_run_id(from._internal_run_id());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TaskIns::CopyFrom(const TaskIns& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:flwr.proto.TaskIns)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TaskIns::IsInitialized() const {
  return true;
}

void TaskIns::InternalSwap(TaskIns* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &task_id_, lhs_arena,
      &other->task_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &group_id_, lhs_arena,
      &other->group_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TaskIns, run_id_)
      + sizeof(TaskIns::run_id_)
      - PROTOBUF_FIELD_OFFSET(TaskIns, task_)>(
          reinterpret_cast<char*>(&task_),
          reinterpret_cast<char*>(&other->task_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TaskIns::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_flwr_2fproto_2ftask_2eproto_getter, &descriptor_table_flwr_2fproto_2ftask_2eproto_once,
      file_level_metadata_flwr_2fproto_2ftask_2eproto[1]);
}

// ===================================================================

class TaskRes::_Internal {
 public:
  static const ::flwr::proto::Task& task(const TaskRes* msg);
};

const ::flwr::proto::Task&
TaskRes::_Internal::task(const TaskRes* msg) {
  return *msg->task_;
}
TaskRes::TaskRes(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:flwr.proto.TaskRes)
}
TaskRes::TaskRes(const TaskRes& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  task_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_task_id().empty()) {
    task_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_task_id(), 
      GetArenaForAllocation());
  }
  group_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_group_id().empty()) {
    group_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_group_id(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_task()) {
    task_ = new ::flwr::proto::Task(*from.task_);
  } else {
    task_ = nullptr;
  }
  run_id_ = from.run_id_;
  // @@protoc_insertion_point(copy_constructor:flwr.proto.TaskRes)
}

void TaskRes::SharedCtor() {
task_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
group_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&task_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&run_id_) -
    reinterpret_cast<char*>(&task_)) + sizeof(run_id_));
}

TaskRes::~TaskRes() {
  // @@protoc_insertion_point(destructor:flwr.proto.TaskRes)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void TaskRes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  task_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  group_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete task_;
}

void TaskRes::ArenaDtor(void* object) {
  TaskRes* _this = reinterpret_cast< TaskRes* >(object);
  (void)_this;
}
void TaskRes::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TaskRes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void TaskRes::Clear() {
// @@protoc_insertion_point(message_clear_start:flwr.proto.TaskRes)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  task_id_.ClearToEmpty();
  group_id_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && task_ != nullptr) {
    delete task_;
  }
  task_ = nullptr;
  run_id_ = int64_t{0};
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TaskRes::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string task_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_task_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.TaskRes.task_id"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string group_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_group_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "flwr.proto.TaskRes.group_id"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // sint64 run_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          run_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .flwr.proto.Task task = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_task(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* TaskRes::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:flwr.proto.TaskRes)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string task_id = 1;
  if (!this->_internal_task_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_task_id().data(), static_cast<int>(this->_internal_task_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.TaskRes.task_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_task_id(), target);
  }

  // string group_id = 2;
  if (!this->_internal_group_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_group_id().data(), static_cast<int>(this->_internal_group_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "flwr.proto.TaskRes.group_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_group_id(), target);
  }

  // sint64 run_id = 3;
  if (this->_internal_run_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt64ToArray(3, this->_internal_run_id(), target);
  }

  // .flwr.proto.Task task = 4;
  if (this->_internal_has_task()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::task(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:flwr.proto.TaskRes)
  return target;
}

size_t TaskRes::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:flwr.proto.TaskRes)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string task_id = 1;
  if (!this->_internal_task_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_task_id());
  }

  // string group_id = 2;
  if (!this->_internal_group_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_group_id());
  }

  // .flwr.proto.Task task = 4;
  if (this->_internal_has_task()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *task_);
  }

  // sint64 run_id = 3;
  if (this->_internal_run_id() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt64SizePlusOne(this->_internal_run_id());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TaskRes::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    TaskRes::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TaskRes::GetClassData() const { return &_class_data_; }

void TaskRes::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TaskRes *>(to)->MergeFrom(
      static_cast<const TaskRes &>(from));
}


void TaskRes::MergeFrom(const TaskRes& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:flwr.proto.TaskRes)
  GOOGLE_DCHECK_NE(&from, this);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_task_id().empty()) {
    _internal_set_task_id(from._internal_task_id());
  }
  if (!from._internal_group_id().empty()) {
    _internal_set_group_id(from._internal_group_id());
  }
  if (from._internal_has_task()) {
    _internal_mutable_task()->::flwr::proto::Task::MergeFrom(from._internal_task());
  }
  if (from._internal_run_id() != 0) {
    _internal_set_run_id(from._internal_run_id());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TaskRes::CopyFrom(const TaskRes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:flwr.proto.TaskRes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TaskRes::IsInitialized() const {
  return true;
}

void TaskRes::InternalSwap(TaskRes* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &task_id_, lhs_arena,
      &other->task_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &group_id_, lhs_arena,
      &other->group_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TaskRes, run_id_)
      + sizeof(TaskRes::run_id_)
      - PROTOBUF_FIELD_OFFSET(TaskRes, task_)>(
          reinterpret_cast<char*>(&task_),
          reinterpret_cast<char*>(&other->task_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TaskRes::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_flwr_2fproto_2ftask_2eproto_getter, &descriptor_table_flwr_2fproto_2ftask_2eproto_once,
      file_level_metadata_flwr_2fproto_2ftask_2eproto[2]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace proto
}  // namespace flwr
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::flwr::proto::Task* Arena::CreateMaybeMessage< ::flwr::proto::Task >(Arena* arena) {
  return Arena::CreateMessageInternal< ::flwr::proto::Task >(arena);
}
template<> PROTOBUF_NOINLINE ::flwr::proto::TaskIns* Arena::CreateMaybeMessage< ::flwr::proto::TaskIns >(Arena* arena) {
  return Arena::CreateMessageInternal< ::flwr::proto::TaskIns >(arena);
}
template<> PROTOBUF_NOINLINE ::flwr::proto::TaskRes* Arena::CreateMaybeMessage< ::flwr::proto::TaskRes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::flwr::proto::TaskRes >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
