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

#include "datastruct.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 _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace satllite {
namespace protobuf {
namespace TDSCmd {
PROTOBUF_CONSTEXPR TDSCmd::TDSCmd(
    ::_pbi::ConstantInitialized)
  : parameters_()
  , cmd_(0)

  , dstsuid_(0u)
  , srcsuid_(0u)
  , forwardflag_(0u){}
struct TDSCmdDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TDSCmdDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TDSCmdDefaultTypeInternal() {}
  union {
    TDSCmd _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TDSCmdDefaultTypeInternal _TDSCmd_default_instance_;
}  // namespace TDSCmd
}  // namespace protobuf
}  // namespace satllite
static ::_pb::Metadata file_level_metadata_datastruct_2eproto[1];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_datastruct_2eproto[1];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_datastruct_2eproto = nullptr;

const uint32_t TableStruct_datastruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, cmd_),
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, dstsuid_),
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, srcsuid_),
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, forwardflag_),
  PROTOBUF_FIELD_OFFSET(::satllite::protobuf::TDSCmd::TDSCmd, parameters_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::satllite::protobuf::TDSCmd::TDSCmd)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::satllite::protobuf::TDSCmd::_TDSCmd_default_instance_._instance,
};

const char descriptor_table_protodef_datastruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\020datastruct.proto\022\030satllite.protobuf.TD"
  "SCmd\032\031google/protobuf/any.proto\"\256\004\n\006TDSC"
  "md\0221\n\003Cmd\030\001 \001(\0162$.satllite.protobuf.TDSC"
  "md.TDSCmd.IID\022\017\n\007DstSUID\030\002 \001(\r\022\017\n\007SrcSUI"
  "D\030\003 \001(\r\022\023\n\013ForwardFlag\030\004 \001(\r\022(\n\nParamete"
  "rs\030\005 \003(\0132\024.google.protobuf.Any\"\217\003\n\003IID\022\014"
  "\n\010IID_Base\020\000\022\024\n\017IID_Server_Base\020\350\007\022\023\n\016II"
  "D_Server_xxx\020\351\007\022\033\n\026IID_Server_xxx_respon"
  "d\020\352\007\022\020\n\013IID_UI_Base\020\320\017\022\017\n\nIID_UI_xxx\020\321\017\022"
  "\027\n\022IID_UI_xxx_respond\020\322\017\022\024\n\017IID_Device_B"
  "ase\020\270\027\022\023\n\016IID_Device_xxx\020\271\027\022\033\n\026IID_Devic"
  "e_xxx_respond\020\272\027\022\021\n\014IID_AGI_Base\020\240\037\022\020\n\013I"
  "ID_AGI_TLE\020\241\037\022\030\n\023IID_AGI_TLE_respond\020\242\037\022"
  "\023\n\016IID_AGI_Report\020\243\037\022\033\n\026IID_AGI_Report_r"
  "espond\020\244\037\022\021\n\014IID_OAM_Base\020\210\'\022\020\n\013IID_OAM_"
  "xxx\020\211\'\022\030\n\023IID_OAM_xxx_respond\020\212\'b\006proto3"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_datastruct_2eproto_deps[1] = {
  &::descriptor_table_google_2fprotobuf_2fany_2eproto,
};
static ::_pbi::once_flag descriptor_table_datastruct_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_datastruct_2eproto = {
    false, false, 640, descriptor_table_protodef_datastruct_2eproto,
    "datastruct.proto",
    &descriptor_table_datastruct_2eproto_once, descriptor_table_datastruct_2eproto_deps, 1, 1,
    schemas, file_default_instances, TableStruct_datastruct_2eproto::offsets,
    file_level_metadata_datastruct_2eproto, file_level_enum_descriptors_datastruct_2eproto,
    file_level_service_descriptors_datastruct_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_datastruct_2eproto_getter() {
  return &descriptor_table_datastruct_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_datastruct_2eproto(&descriptor_table_datastruct_2eproto);
namespace satllite {
namespace protobuf {
namespace TDSCmd {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TDSCmd_IID_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_datastruct_2eproto);
  return file_level_enum_descriptors_datastruct_2eproto[0];
}
bool TDSCmd_IID_IsValid(int value) {
  switch (value) {
    case 0:
    case 1000:
    case 1001:
    case 1002:
    case 2000:
    case 2001:
    case 2002:
    case 3000:
    case 3001:
    case 3002:
    case 4000:
    case 4001:
    case 4002:
    case 4003:
    case 4004:
    case 5000:
    case 5001:
    case 5002:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr TDSCmd_IID TDSCmd::IID_Base;
constexpr TDSCmd_IID TDSCmd::IID_Server_Base;
constexpr TDSCmd_IID TDSCmd::IID_Server_xxx;
constexpr TDSCmd_IID TDSCmd::IID_Server_xxx_respond;
constexpr TDSCmd_IID TDSCmd::IID_UI_Base;
constexpr TDSCmd_IID TDSCmd::IID_UI_xxx;
constexpr TDSCmd_IID TDSCmd::IID_UI_xxx_respond;
constexpr TDSCmd_IID TDSCmd::IID_Device_Base;
constexpr TDSCmd_IID TDSCmd::IID_Device_xxx;
constexpr TDSCmd_IID TDSCmd::IID_Device_xxx_respond;
constexpr TDSCmd_IID TDSCmd::IID_AGI_Base;
constexpr TDSCmd_IID TDSCmd::IID_AGI_TLE;
constexpr TDSCmd_IID TDSCmd::IID_AGI_TLE_respond;
constexpr TDSCmd_IID TDSCmd::IID_AGI_Report;
constexpr TDSCmd_IID TDSCmd::IID_AGI_Report_respond;
constexpr TDSCmd_IID TDSCmd::IID_OAM_Base;
constexpr TDSCmd_IID TDSCmd::IID_OAM_xxx;
constexpr TDSCmd_IID TDSCmd::IID_OAM_xxx_respond;
constexpr TDSCmd_IID TDSCmd::IID_MIN;
constexpr TDSCmd_IID TDSCmd::IID_MAX;
constexpr int TDSCmd::IID_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

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

class TDSCmd::_Internal {
 public:
};

void TDSCmd::clear_parameters() {
  parameters_.Clear();
}
TDSCmd::TDSCmd(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  parameters_(arena) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:satllite.protobuf.TDSCmd.TDSCmd)
}
TDSCmd::TDSCmd(const TDSCmd& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      parameters_(from.parameters_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&cmd_, &from.cmd_,
    static_cast<size_t>(reinterpret_cast<char*>(&forwardflag_) -
    reinterpret_cast<char*>(&cmd_)) + sizeof(forwardflag_));
  // @@protoc_insertion_point(copy_constructor:satllite.protobuf.TDSCmd.TDSCmd)
}

inline void TDSCmd::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&cmd_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&forwardflag_) -
    reinterpret_cast<char*>(&cmd_)) + sizeof(forwardflag_));
}

TDSCmd::~TDSCmd() {
  // @@protoc_insertion_point(destructor:satllite.protobuf.TDSCmd.TDSCmd)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TDSCmd::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void TDSCmd::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void TDSCmd::Clear() {
// @@protoc_insertion_point(message_clear_start:satllite.protobuf.TDSCmd.TDSCmd)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parameters_.Clear();
  ::memset(&cmd_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&forwardflag_) -
      reinterpret_cast<char*>(&cmd_)) + sizeof(forwardflag_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TDSCmd::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .satllite.protobuf.TDSCmd.TDSCmd.IID Cmd = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_cmd(static_cast<::satllite::protobuf::TDSCmd::TDSCmd_IID>(val));
        } else
          goto handle_unusual;
        continue;
      // uint32 DstSUID = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          dstsuid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 SrcSUID = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          srcsuid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 ForwardFlag = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          forwardflag_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .google.protobuf.Any Parameters = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_parameters(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(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_
}

uint8_t* TDSCmd::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:satllite.protobuf.TDSCmd.TDSCmd)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .satllite.protobuf.TDSCmd.TDSCmd.IID Cmd = 1;
  if (this->_internal_cmd() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_cmd(), target);
  }

  // uint32 DstSUID = 2;
  if (this->_internal_dstsuid() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_dstsuid(), target);
  }

  // uint32 SrcSUID = 3;
  if (this->_internal_srcsuid() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_srcsuid(), target);
  }

  // uint32 ForwardFlag = 4;
  if (this->_internal_forwardflag() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_forwardflag(), target);
  }

  // repeated .google.protobuf.Any Parameters = 5;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_parameters_size()); i < n; i++) {
    const auto& repfield = this->_internal_parameters(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::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:satllite.protobuf.TDSCmd.TDSCmd)
  return target;
}

size_t TDSCmd::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:satllite.protobuf.TDSCmd.TDSCmd)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.protobuf.Any Parameters = 5;
  total_size += 1UL * this->_internal_parameters_size();
  for (const auto& msg : this->parameters_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // .satllite.protobuf.TDSCmd.TDSCmd.IID Cmd = 1;
  if (this->_internal_cmd() != 0) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_cmd());
  }

  // uint32 DstSUID = 2;
  if (this->_internal_dstsuid() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dstsuid());
  }

  // uint32 SrcSUID = 3;
  if (this->_internal_srcsuid() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_srcsuid());
  }

  // uint32 ForwardFlag = 4;
  if (this->_internal_forwardflag() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_forwardflag());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void TDSCmd::MergeFrom(const TDSCmd& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:satllite.protobuf.TDSCmd.TDSCmd)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  parameters_.MergeFrom(from.parameters_);
  if (from._internal_cmd() != 0) {
    _internal_set_cmd(from._internal_cmd());
  }
  if (from._internal_dstsuid() != 0) {
    _internal_set_dstsuid(from._internal_dstsuid());
  }
  if (from._internal_srcsuid() != 0) {
    _internal_set_srcsuid(from._internal_srcsuid());
  }
  if (from._internal_forwardflag() != 0) {
    _internal_set_forwardflag(from._internal_forwardflag());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TDSCmd::CopyFrom(const TDSCmd& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:satllite.protobuf.TDSCmd.TDSCmd)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void TDSCmd::InternalSwap(TDSCmd* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  parameters_.InternalSwap(&other->parameters_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TDSCmd, forwardflag_)
      + sizeof(TDSCmd::forwardflag_)
      - PROTOBUF_FIELD_OFFSET(TDSCmd, cmd_)>(
          reinterpret_cast<char*>(&cmd_),
          reinterpret_cast<char*>(&other->cmd_));
}

::PROTOBUF_NAMESPACE_ID::Metadata TDSCmd::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_datastruct_2eproto_getter, &descriptor_table_datastruct_2eproto_once,
      file_level_metadata_datastruct_2eproto[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace TDSCmd
}  // namespace protobuf
}  // namespace satllite
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::satllite::protobuf::TDSCmd::TDSCmd*
Arena::CreateMaybeMessage< ::satllite::protobuf::TDSCmd::TDSCmd >(Arena* arena) {
  return Arena::CreateMessageInternal< ::satllite::protobuf::TDSCmd::TDSCmd >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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