ProtobufSealerMessages.cpp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: ProtobufSealerMessages.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "ProtobufSealerMessages.pb.h"
  5. #include <algorithm>
  6. #include <google/protobuf/stubs/common.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // @@protoc_insertion_point(includes)
  15. namespace {
  16. const ::google::protobuf::Descriptor* protobuf_sgx_mc_uuid_t_descriptor_ = NULL;
  17. const ::google::protobuf::internal::GeneratedMessageReflection*
  18. protobuf_sgx_mc_uuid_t_reflection_ = NULL;
  19. const ::google::protobuf::Descriptor* protobuf_plaintext_seal_message_descriptor_ = NULL;
  20. const ::google::protobuf::internal::GeneratedMessageReflection*
  21. protobuf_plaintext_seal_message_reflection_ = NULL;
  22. } // namespace
  23. void protobuf_AssignDesc_ProtobufSealerMessages_2eproto() {
  24. protobuf_AddDesc_ProtobufSealerMessages_2eproto();
  25. const ::google::protobuf::FileDescriptor* file =
  26. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  27. "ProtobufSealerMessages.proto");
  28. GOOGLE_CHECK(file != NULL);
  29. protobuf_sgx_mc_uuid_t_descriptor_ = file->message_type(0);
  30. static const int protobuf_sgx_mc_uuid_t_offsets_[2] = {
  31. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_sgx_mc_uuid_t, nonce_),
  32. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_sgx_mc_uuid_t, counter_id_),
  33. };
  34. protobuf_sgx_mc_uuid_t_reflection_ =
  35. new ::google::protobuf::internal::GeneratedMessageReflection(
  36. protobuf_sgx_mc_uuid_t_descriptor_,
  37. protobuf_sgx_mc_uuid_t::default_instance_,
  38. protobuf_sgx_mc_uuid_t_offsets_,
  39. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_sgx_mc_uuid_t, _has_bits_[0]),
  40. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_sgx_mc_uuid_t, _unknown_fields_),
  41. -1,
  42. ::google::protobuf::DescriptorPool::generated_pool(),
  43. ::google::protobuf::MessageFactory::generated_factory(),
  44. sizeof(protobuf_sgx_mc_uuid_t));
  45. protobuf_plaintext_seal_message_descriptor_ = file->message_type(1);
  46. static const int protobuf_plaintext_seal_message_offsets_[3] = {
  47. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_plaintext_seal_message, monotonic_counter_id_),
  48. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_plaintext_seal_message, monotonic_counter_value_),
  49. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_plaintext_seal_message, message_),
  50. };
  51. protobuf_plaintext_seal_message_reflection_ =
  52. new ::google::protobuf::internal::GeneratedMessageReflection(
  53. protobuf_plaintext_seal_message_descriptor_,
  54. protobuf_plaintext_seal_message::default_instance_,
  55. protobuf_plaintext_seal_message_offsets_,
  56. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_plaintext_seal_message, _has_bits_[0]),
  57. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(protobuf_plaintext_seal_message, _unknown_fields_),
  58. -1,
  59. ::google::protobuf::DescriptorPool::generated_pool(),
  60. ::google::protobuf::MessageFactory::generated_factory(),
  61. sizeof(protobuf_plaintext_seal_message));
  62. }
  63. namespace {
  64. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  65. inline void protobuf_AssignDescriptorsOnce() {
  66. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  67. &protobuf_AssignDesc_ProtobufSealerMessages_2eproto);
  68. }
  69. void protobuf_RegisterTypes(const ::std::string&) {
  70. protobuf_AssignDescriptorsOnce();
  71. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  72. protobuf_sgx_mc_uuid_t_descriptor_, &protobuf_sgx_mc_uuid_t::default_instance());
  73. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  74. protobuf_plaintext_seal_message_descriptor_, &protobuf_plaintext_seal_message::default_instance());
  75. }
  76. } // namespace
  77. void protobuf_ShutdownFile_ProtobufSealerMessages_2eproto() {
  78. delete protobuf_sgx_mc_uuid_t::default_instance_;
  79. delete protobuf_sgx_mc_uuid_t_reflection_;
  80. delete protobuf_plaintext_seal_message::default_instance_;
  81. delete protobuf_plaintext_seal_message_reflection_;
  82. }
  83. void protobuf_AddDesc_ProtobufSealerMessages_2eproto() {
  84. static bool already_here = false;
  85. if (already_here) return;
  86. already_here = true;
  87. GOOGLE_PROTOBUF_VERIFY_VERSION;
  88. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  89. "\n\034ProtobufSealerMessages.proto\";\n\026protob"
  90. "uf_sgx_mc_uuid_t\022\r\n\005nonce\030\001 \002(\014\022\022\n\ncount"
  91. "er_id\030\002 \002(\014\"\212\001\n\037protobuf_plaintext_seal_"
  92. "message\0225\n\024monotonic_counter_id\030\001 \002(\0132\027."
  93. "protobuf_sgx_mc_uuid_t\022\037\n\027monotonic_coun"
  94. "ter_value\030\002 \002(\r\022\017\n\007message\030\003 \002(\014", 232);
  95. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  96. "ProtobufSealerMessages.proto", &protobuf_RegisterTypes);
  97. protobuf_sgx_mc_uuid_t::default_instance_ = new protobuf_sgx_mc_uuid_t();
  98. protobuf_plaintext_seal_message::default_instance_ = new protobuf_plaintext_seal_message();
  99. protobuf_sgx_mc_uuid_t::default_instance_->InitAsDefaultInstance();
  100. protobuf_plaintext_seal_message::default_instance_->InitAsDefaultInstance();
  101. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ProtobufSealerMessages_2eproto);
  102. }
  103. // Force AddDescriptors() to be called at static initialization time.
  104. struct StaticDescriptorInitializer_ProtobufSealerMessages_2eproto {
  105. StaticDescriptorInitializer_ProtobufSealerMessages_2eproto() {
  106. protobuf_AddDesc_ProtobufSealerMessages_2eproto();
  107. }
  108. } static_descriptor_initializer_ProtobufSealerMessages_2eproto_;
  109. // ===================================================================
  110. #ifndef _MSC_VER
  111. const int protobuf_sgx_mc_uuid_t::kNonceFieldNumber;
  112. const int protobuf_sgx_mc_uuid_t::kCounterIdFieldNumber;
  113. #endif // !_MSC_VER
  114. protobuf_sgx_mc_uuid_t::protobuf_sgx_mc_uuid_t()
  115. : ::google::protobuf::Message() {
  116. SharedCtor();
  117. // @@protoc_insertion_point(constructor:protobuf_sgx_mc_uuid_t)
  118. }
  119. void protobuf_sgx_mc_uuid_t::InitAsDefaultInstance() {
  120. }
  121. protobuf_sgx_mc_uuid_t::protobuf_sgx_mc_uuid_t(const protobuf_sgx_mc_uuid_t& from)
  122. : ::google::protobuf::Message() {
  123. SharedCtor();
  124. MergeFrom(from);
  125. // @@protoc_insertion_point(copy_constructor:protobuf_sgx_mc_uuid_t)
  126. }
  127. void protobuf_sgx_mc_uuid_t::SharedCtor() {
  128. ::google::protobuf::internal::GetEmptyString();
  129. _cached_size_ = 0;
  130. nonce_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  131. counter_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  132. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  133. }
  134. protobuf_sgx_mc_uuid_t::~protobuf_sgx_mc_uuid_t() {
  135. // @@protoc_insertion_point(destructor:protobuf_sgx_mc_uuid_t)
  136. SharedDtor();
  137. }
  138. void protobuf_sgx_mc_uuid_t::SharedDtor() {
  139. if (nonce_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  140. delete nonce_;
  141. }
  142. if (counter_id_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  143. delete counter_id_;
  144. }
  145. if (this != default_instance_) {
  146. }
  147. }
  148. void protobuf_sgx_mc_uuid_t::SetCachedSize(int size) const {
  149. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  150. _cached_size_ = size;
  151. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  152. }
  153. const ::google::protobuf::Descriptor* protobuf_sgx_mc_uuid_t::descriptor() {
  154. protobuf_AssignDescriptorsOnce();
  155. return protobuf_sgx_mc_uuid_t_descriptor_;
  156. }
  157. const protobuf_sgx_mc_uuid_t& protobuf_sgx_mc_uuid_t::default_instance() {
  158. if (default_instance_ == NULL) protobuf_AddDesc_ProtobufSealerMessages_2eproto();
  159. return *default_instance_;
  160. }
  161. protobuf_sgx_mc_uuid_t* protobuf_sgx_mc_uuid_t::default_instance_ = NULL;
  162. protobuf_sgx_mc_uuid_t* protobuf_sgx_mc_uuid_t::New() const {
  163. return new protobuf_sgx_mc_uuid_t;
  164. }
  165. void protobuf_sgx_mc_uuid_t::Clear() {
  166. if (_has_bits_[0 / 32] & 3) {
  167. if (has_nonce()) {
  168. if (nonce_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  169. nonce_->clear();
  170. }
  171. }
  172. if (has_counter_id()) {
  173. if (counter_id_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  174. counter_id_->clear();
  175. }
  176. }
  177. }
  178. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  179. mutable_unknown_fields()->Clear();
  180. }
  181. bool protobuf_sgx_mc_uuid_t::MergePartialFromCodedStream(
  182. ::google::protobuf::io::CodedInputStream* input) {
  183. #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  184. ::google::protobuf::uint32 tag;
  185. // @@protoc_insertion_point(parse_start:protobuf_sgx_mc_uuid_t)
  186. for (;;) {
  187. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
  188. tag = p.first;
  189. if (!p.second) goto handle_unusual;
  190. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  191. // required bytes nonce = 1;
  192. case 1: {
  193. if (tag == 10) {
  194. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  195. input, this->mutable_nonce()));
  196. } else {
  197. goto handle_unusual;
  198. }
  199. if (input->ExpectTag(18)) goto parse_counter_id;
  200. break;
  201. }
  202. // required bytes counter_id = 2;
  203. case 2: {
  204. if (tag == 18) {
  205. parse_counter_id:
  206. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  207. input, this->mutable_counter_id()));
  208. } else {
  209. goto handle_unusual;
  210. }
  211. if (input->ExpectAtEnd()) goto success;
  212. break;
  213. }
  214. default: {
  215. handle_unusual:
  216. if (tag == 0 ||
  217. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  218. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  219. goto success;
  220. }
  221. DO_(::google::protobuf::internal::WireFormat::SkipField(
  222. input, tag, mutable_unknown_fields()));
  223. break;
  224. }
  225. }
  226. }
  227. success:
  228. // @@protoc_insertion_point(parse_success:protobuf_sgx_mc_uuid_t)
  229. return true;
  230. failure:
  231. // @@protoc_insertion_point(parse_failure:protobuf_sgx_mc_uuid_t)
  232. return false;
  233. #undef DO_
  234. }
  235. void protobuf_sgx_mc_uuid_t::SerializeWithCachedSizes(
  236. ::google::protobuf::io::CodedOutputStream* output) const {
  237. // @@protoc_insertion_point(serialize_start:protobuf_sgx_mc_uuid_t)
  238. // required bytes nonce = 1;
  239. if (has_nonce()) {
  240. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  241. 1, this->nonce(), output);
  242. }
  243. // required bytes counter_id = 2;
  244. if (has_counter_id()) {
  245. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  246. 2, this->counter_id(), output);
  247. }
  248. if (!unknown_fields().empty()) {
  249. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  250. unknown_fields(), output);
  251. }
  252. // @@protoc_insertion_point(serialize_end:protobuf_sgx_mc_uuid_t)
  253. }
  254. ::google::protobuf::uint8* protobuf_sgx_mc_uuid_t::SerializeWithCachedSizesToArray(
  255. ::google::protobuf::uint8* target) const {
  256. // @@protoc_insertion_point(serialize_to_array_start:protobuf_sgx_mc_uuid_t)
  257. // required bytes nonce = 1;
  258. if (has_nonce()) {
  259. target =
  260. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  261. 1, this->nonce(), target);
  262. }
  263. // required bytes counter_id = 2;
  264. if (has_counter_id()) {
  265. target =
  266. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  267. 2, this->counter_id(), target);
  268. }
  269. if (!unknown_fields().empty()) {
  270. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  271. unknown_fields(), target);
  272. }
  273. // @@protoc_insertion_point(serialize_to_array_end:protobuf_sgx_mc_uuid_t)
  274. return target;
  275. }
  276. int protobuf_sgx_mc_uuid_t::ByteSize() const {
  277. int total_size = 0;
  278. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  279. // required bytes nonce = 1;
  280. if (has_nonce()) {
  281. total_size += 1 +
  282. ::google::protobuf::internal::WireFormatLite::BytesSize(
  283. this->nonce());
  284. }
  285. // required bytes counter_id = 2;
  286. if (has_counter_id()) {
  287. total_size += 1 +
  288. ::google::protobuf::internal::WireFormatLite::BytesSize(
  289. this->counter_id());
  290. }
  291. }
  292. if (!unknown_fields().empty()) {
  293. total_size +=
  294. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  295. unknown_fields());
  296. }
  297. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  298. _cached_size_ = total_size;
  299. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  300. return total_size;
  301. }
  302. void protobuf_sgx_mc_uuid_t::MergeFrom(const ::google::protobuf::Message& from) {
  303. GOOGLE_CHECK_NE(&from, this);
  304. const protobuf_sgx_mc_uuid_t* source =
  305. ::google::protobuf::internal::dynamic_cast_if_available<const protobuf_sgx_mc_uuid_t*>(
  306. &from);
  307. if (source == NULL) {
  308. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  309. } else {
  310. MergeFrom(*source);
  311. }
  312. }
  313. void protobuf_sgx_mc_uuid_t::MergeFrom(const protobuf_sgx_mc_uuid_t& from) {
  314. GOOGLE_CHECK_NE(&from, this);
  315. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  316. if (from.has_nonce()) {
  317. set_nonce(from.nonce());
  318. }
  319. if (from.has_counter_id()) {
  320. set_counter_id(from.counter_id());
  321. }
  322. }
  323. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  324. }
  325. void protobuf_sgx_mc_uuid_t::CopyFrom(const ::google::protobuf::Message& from) {
  326. if (&from == this) return;
  327. Clear();
  328. MergeFrom(from);
  329. }
  330. void protobuf_sgx_mc_uuid_t::CopyFrom(const protobuf_sgx_mc_uuid_t& from) {
  331. if (&from == this) return;
  332. Clear();
  333. MergeFrom(from);
  334. }
  335. bool protobuf_sgx_mc_uuid_t::IsInitialized() const {
  336. if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  337. return true;
  338. }
  339. void protobuf_sgx_mc_uuid_t::Swap(protobuf_sgx_mc_uuid_t* other) {
  340. if (other != this) {
  341. std::swap(nonce_, other->nonce_);
  342. std::swap(counter_id_, other->counter_id_);
  343. std::swap(_has_bits_[0], other->_has_bits_[0]);
  344. _unknown_fields_.Swap(&other->_unknown_fields_);
  345. std::swap(_cached_size_, other->_cached_size_);
  346. }
  347. }
  348. ::google::protobuf::Metadata protobuf_sgx_mc_uuid_t::GetMetadata() const {
  349. protobuf_AssignDescriptorsOnce();
  350. ::google::protobuf::Metadata metadata;
  351. metadata.descriptor = protobuf_sgx_mc_uuid_t_descriptor_;
  352. metadata.reflection = protobuf_sgx_mc_uuid_t_reflection_;
  353. return metadata;
  354. }
  355. // ===================================================================
  356. #ifndef _MSC_VER
  357. const int protobuf_plaintext_seal_message::kMonotonicCounterIdFieldNumber;
  358. const int protobuf_plaintext_seal_message::kMonotonicCounterValueFieldNumber;
  359. const int protobuf_plaintext_seal_message::kMessageFieldNumber;
  360. #endif // !_MSC_VER
  361. protobuf_plaintext_seal_message::protobuf_plaintext_seal_message()
  362. : ::google::protobuf::Message() {
  363. SharedCtor();
  364. // @@protoc_insertion_point(constructor:protobuf_plaintext_seal_message)
  365. }
  366. void protobuf_plaintext_seal_message::InitAsDefaultInstance() {
  367. monotonic_counter_id_ = const_cast< ::protobuf_sgx_mc_uuid_t*>(&::protobuf_sgx_mc_uuid_t::default_instance());
  368. }
  369. protobuf_plaintext_seal_message::protobuf_plaintext_seal_message(const protobuf_plaintext_seal_message& from)
  370. : ::google::protobuf::Message() {
  371. SharedCtor();
  372. MergeFrom(from);
  373. // @@protoc_insertion_point(copy_constructor:protobuf_plaintext_seal_message)
  374. }
  375. void protobuf_plaintext_seal_message::SharedCtor() {
  376. ::google::protobuf::internal::GetEmptyString();
  377. _cached_size_ = 0;
  378. monotonic_counter_id_ = NULL;
  379. monotonic_counter_value_ = 0u;
  380. message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  381. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  382. }
  383. protobuf_plaintext_seal_message::~protobuf_plaintext_seal_message() {
  384. // @@protoc_insertion_point(destructor:protobuf_plaintext_seal_message)
  385. SharedDtor();
  386. }
  387. void protobuf_plaintext_seal_message::SharedDtor() {
  388. if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  389. delete message_;
  390. }
  391. if (this != default_instance_) {
  392. delete monotonic_counter_id_;
  393. }
  394. }
  395. void protobuf_plaintext_seal_message::SetCachedSize(int size) const {
  396. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  397. _cached_size_ = size;
  398. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  399. }
  400. const ::google::protobuf::Descriptor* protobuf_plaintext_seal_message::descriptor() {
  401. protobuf_AssignDescriptorsOnce();
  402. return protobuf_plaintext_seal_message_descriptor_;
  403. }
  404. const protobuf_plaintext_seal_message& protobuf_plaintext_seal_message::default_instance() {
  405. if (default_instance_ == NULL) protobuf_AddDesc_ProtobufSealerMessages_2eproto();
  406. return *default_instance_;
  407. }
  408. protobuf_plaintext_seal_message* protobuf_plaintext_seal_message::default_instance_ = NULL;
  409. protobuf_plaintext_seal_message* protobuf_plaintext_seal_message::New() const {
  410. return new protobuf_plaintext_seal_message;
  411. }
  412. void protobuf_plaintext_seal_message::Clear() {
  413. if (_has_bits_[0 / 32] & 7) {
  414. if (has_monotonic_counter_id()) {
  415. if (monotonic_counter_id_ != NULL) monotonic_counter_id_->::protobuf_sgx_mc_uuid_t::Clear();
  416. }
  417. monotonic_counter_value_ = 0u;
  418. if (has_message()) {
  419. if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
  420. message_->clear();
  421. }
  422. }
  423. }
  424. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  425. mutable_unknown_fields()->Clear();
  426. }
  427. bool protobuf_plaintext_seal_message::MergePartialFromCodedStream(
  428. ::google::protobuf::io::CodedInputStream* input) {
  429. #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  430. ::google::protobuf::uint32 tag;
  431. // @@protoc_insertion_point(parse_start:protobuf_plaintext_seal_message)
  432. for (;;) {
  433. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
  434. tag = p.first;
  435. if (!p.second) goto handle_unusual;
  436. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  437. // required .protobuf_sgx_mc_uuid_t monotonic_counter_id = 1;
  438. case 1: {
  439. if (tag == 10) {
  440. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  441. input, mutable_monotonic_counter_id()));
  442. } else {
  443. goto handle_unusual;
  444. }
  445. if (input->ExpectTag(16)) goto parse_monotonic_counter_value;
  446. break;
  447. }
  448. // required uint32 monotonic_counter_value = 2;
  449. case 2: {
  450. if (tag == 16) {
  451. parse_monotonic_counter_value:
  452. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  453. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  454. input, &monotonic_counter_value_)));
  455. set_has_monotonic_counter_value();
  456. } else {
  457. goto handle_unusual;
  458. }
  459. if (input->ExpectTag(26)) goto parse_message;
  460. break;
  461. }
  462. // required bytes message = 3;
  463. case 3: {
  464. if (tag == 26) {
  465. parse_message:
  466. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  467. input, this->mutable_message()));
  468. } else {
  469. goto handle_unusual;
  470. }
  471. if (input->ExpectAtEnd()) goto success;
  472. break;
  473. }
  474. default: {
  475. handle_unusual:
  476. if (tag == 0 ||
  477. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  478. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  479. goto success;
  480. }
  481. DO_(::google::protobuf::internal::WireFormat::SkipField(
  482. input, tag, mutable_unknown_fields()));
  483. break;
  484. }
  485. }
  486. }
  487. success:
  488. // @@protoc_insertion_point(parse_success:protobuf_plaintext_seal_message)
  489. return true;
  490. failure:
  491. // @@protoc_insertion_point(parse_failure:protobuf_plaintext_seal_message)
  492. return false;
  493. #undef DO_
  494. }
  495. void protobuf_plaintext_seal_message::SerializeWithCachedSizes(
  496. ::google::protobuf::io::CodedOutputStream* output) const {
  497. // @@protoc_insertion_point(serialize_start:protobuf_plaintext_seal_message)
  498. // required .protobuf_sgx_mc_uuid_t monotonic_counter_id = 1;
  499. if (has_monotonic_counter_id()) {
  500. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  501. 1, this->monotonic_counter_id(), output);
  502. }
  503. // required uint32 monotonic_counter_value = 2;
  504. if (has_monotonic_counter_value()) {
  505. ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->monotonic_counter_value(), output);
  506. }
  507. // required bytes message = 3;
  508. if (has_message()) {
  509. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  510. 3, this->message(), output);
  511. }
  512. if (!unknown_fields().empty()) {
  513. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  514. unknown_fields(), output);
  515. }
  516. // @@protoc_insertion_point(serialize_end:protobuf_plaintext_seal_message)
  517. }
  518. ::google::protobuf::uint8* protobuf_plaintext_seal_message::SerializeWithCachedSizesToArray(
  519. ::google::protobuf::uint8* target) const {
  520. // @@protoc_insertion_point(serialize_to_array_start:protobuf_plaintext_seal_message)
  521. // required .protobuf_sgx_mc_uuid_t monotonic_counter_id = 1;
  522. if (has_monotonic_counter_id()) {
  523. target = ::google::protobuf::internal::WireFormatLite::
  524. WriteMessageNoVirtualToArray(
  525. 1, this->monotonic_counter_id(), target);
  526. }
  527. // required uint32 monotonic_counter_value = 2;
  528. if (has_monotonic_counter_value()) {
  529. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->monotonic_counter_value(), target);
  530. }
  531. // required bytes message = 3;
  532. if (has_message()) {
  533. target =
  534. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  535. 3, this->message(), target);
  536. }
  537. if (!unknown_fields().empty()) {
  538. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  539. unknown_fields(), target);
  540. }
  541. // @@protoc_insertion_point(serialize_to_array_end:protobuf_plaintext_seal_message)
  542. return target;
  543. }
  544. int protobuf_plaintext_seal_message::ByteSize() const {
  545. int total_size = 0;
  546. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  547. // required .protobuf_sgx_mc_uuid_t monotonic_counter_id = 1;
  548. if (has_monotonic_counter_id()) {
  549. total_size += 1 +
  550. ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
  551. this->monotonic_counter_id());
  552. }
  553. // required uint32 monotonic_counter_value = 2;
  554. if (has_monotonic_counter_value()) {
  555. total_size += 1 +
  556. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  557. this->monotonic_counter_value());
  558. }
  559. // required bytes message = 3;
  560. if (has_message()) {
  561. total_size += 1 +
  562. ::google::protobuf::internal::WireFormatLite::BytesSize(
  563. this->message());
  564. }
  565. }
  566. if (!unknown_fields().empty()) {
  567. total_size +=
  568. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  569. unknown_fields());
  570. }
  571. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  572. _cached_size_ = total_size;
  573. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  574. return total_size;
  575. }
  576. void protobuf_plaintext_seal_message::MergeFrom(const ::google::protobuf::Message& from) {
  577. GOOGLE_CHECK_NE(&from, this);
  578. const protobuf_plaintext_seal_message* source =
  579. ::google::protobuf::internal::dynamic_cast_if_available<const protobuf_plaintext_seal_message*>(
  580. &from);
  581. if (source == NULL) {
  582. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  583. } else {
  584. MergeFrom(*source);
  585. }
  586. }
  587. void protobuf_plaintext_seal_message::MergeFrom(const protobuf_plaintext_seal_message& from) {
  588. GOOGLE_CHECK_NE(&from, this);
  589. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  590. if (from.has_monotonic_counter_id()) {
  591. mutable_monotonic_counter_id()->::protobuf_sgx_mc_uuid_t::MergeFrom(from.monotonic_counter_id());
  592. }
  593. if (from.has_monotonic_counter_value()) {
  594. set_monotonic_counter_value(from.monotonic_counter_value());
  595. }
  596. if (from.has_message()) {
  597. set_message(from.message());
  598. }
  599. }
  600. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  601. }
  602. void protobuf_plaintext_seal_message::CopyFrom(const ::google::protobuf::Message& from) {
  603. if (&from == this) return;
  604. Clear();
  605. MergeFrom(from);
  606. }
  607. void protobuf_plaintext_seal_message::CopyFrom(const protobuf_plaintext_seal_message& from) {
  608. if (&from == this) return;
  609. Clear();
  610. MergeFrom(from);
  611. }
  612. bool protobuf_plaintext_seal_message::IsInitialized() const {
  613. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  614. if (has_monotonic_counter_id()) {
  615. if (!this->monotonic_counter_id().IsInitialized()) return false;
  616. }
  617. return true;
  618. }
  619. void protobuf_plaintext_seal_message::Swap(protobuf_plaintext_seal_message* other) {
  620. if (other != this) {
  621. std::swap(monotonic_counter_id_, other->monotonic_counter_id_);
  622. std::swap(monotonic_counter_value_, other->monotonic_counter_value_);
  623. std::swap(message_, other->message_);
  624. std::swap(_has_bits_[0], other->_has_bits_[0]);
  625. _unknown_fields_.Swap(&other->_unknown_fields_);
  626. std::swap(_cached_size_, other->_cached_size_);
  627. }
  628. }
  629. ::google::protobuf::Metadata protobuf_plaintext_seal_message::GetMetadata() const {
  630. protobuf_AssignDescriptorsOnce();
  631. ::google::protobuf::Metadata metadata;
  632. metadata.descriptor = protobuf_plaintext_seal_message_descriptor_;
  633. metadata.reflection = protobuf_plaintext_seal_message_reflection_;
  634. return metadata;
  635. }
  636. // @@protoc_insertion_point(namespace_scope)
  637. // @@protoc_insertion_point(global_scope)