Fabcoin Core  0.16.2
P2P Digital Currency
paymentrequest.pb.cc
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: paymentrequest.proto
3 
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "paymentrequest.pb.h"
6 
7 #include <algorithm>
8 
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
17 // @@protoc_insertion_point(includes)
18 
19 namespace payments {
20 
21 namespace {
22 
23 const ::google::protobuf::Descriptor* Output_descriptor_ = NULL;
24 const ::google::protobuf::internal::GeneratedMessageReflection*
25  Output_reflection_ = NULL;
26 const ::google::protobuf::Descriptor* PaymentDetails_descriptor_ = NULL;
27 const ::google::protobuf::internal::GeneratedMessageReflection*
28  PaymentDetails_reflection_ = NULL;
29 const ::google::protobuf::Descriptor* PaymentRequest_descriptor_ = NULL;
30 const ::google::protobuf::internal::GeneratedMessageReflection*
31  PaymentRequest_reflection_ = NULL;
32 const ::google::protobuf::Descriptor* X509Certificates_descriptor_ = NULL;
33 const ::google::protobuf::internal::GeneratedMessageReflection*
34  X509Certificates_reflection_ = NULL;
35 const ::google::protobuf::Descriptor* Payment_descriptor_ = NULL;
36 const ::google::protobuf::internal::GeneratedMessageReflection*
37  Payment_reflection_ = NULL;
38 const ::google::protobuf::Descriptor* PaymentACK_descriptor_ = NULL;
39 const ::google::protobuf::internal::GeneratedMessageReflection*
40  PaymentACK_reflection_ = NULL;
41 
42 } // namespace
43 
44 
47  const ::google::protobuf::FileDescriptor* file =
48  ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
49  "paymentrequest.proto");
50  GOOGLE_CHECK(file != NULL);
51  Output_descriptor_ = file->message_type(0);
52  static const int Output_offsets_[2] = {
53  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Output, amount_),
54  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Output, script_),
55  };
56  Output_reflection_ =
57  new ::google::protobuf::internal::GeneratedMessageReflection(
58  Output_descriptor_,
60  Output_offsets_,
61  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Output, _has_bits_[0]),
62  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Output, _unknown_fields_),
63  -1,
64  ::google::protobuf::DescriptorPool::generated_pool(),
65  ::google::protobuf::MessageFactory::generated_factory(),
66  sizeof(Output));
67  PaymentDetails_descriptor_ = file->message_type(1);
68  static const int PaymentDetails_offsets_[7] = {
69  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, network_),
70  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, outputs_),
71  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, time_),
72  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, expires_),
73  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, memo_),
74  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, payment_url_),
75  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, merchant_data_),
76  };
77  PaymentDetails_reflection_ =
78  new ::google::protobuf::internal::GeneratedMessageReflection(
79  PaymentDetails_descriptor_,
81  PaymentDetails_offsets_,
82  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, _has_bits_[0]),
83  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentDetails, _unknown_fields_),
84  -1,
85  ::google::protobuf::DescriptorPool::generated_pool(),
86  ::google::protobuf::MessageFactory::generated_factory(),
87  sizeof(PaymentDetails));
88  PaymentRequest_descriptor_ = file->message_type(2);
89  static const int PaymentRequest_offsets_[5] = {
90  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, payment_details_version_),
91  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, pki_type_),
92  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, pki_data_),
93  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, serialized_payment_details_),
94  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, signature_),
95  };
96  PaymentRequest_reflection_ =
97  new ::google::protobuf::internal::GeneratedMessageReflection(
98  PaymentRequest_descriptor_,
100  PaymentRequest_offsets_,
101  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, _has_bits_[0]),
102  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentRequest, _unknown_fields_),
103  -1,
104  ::google::protobuf::DescriptorPool::generated_pool(),
105  ::google::protobuf::MessageFactory::generated_factory(),
106  sizeof(PaymentRequest));
107  X509Certificates_descriptor_ = file->message_type(3);
108  static const int X509Certificates_offsets_[1] = {
109  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(X509Certificates, certificate_),
110  };
111  X509Certificates_reflection_ =
112  new ::google::protobuf::internal::GeneratedMessageReflection(
113  X509Certificates_descriptor_,
115  X509Certificates_offsets_,
116  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(X509Certificates, _has_bits_[0]),
117  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(X509Certificates, _unknown_fields_),
118  -1,
119  ::google::protobuf::DescriptorPool::generated_pool(),
120  ::google::protobuf::MessageFactory::generated_factory(),
121  sizeof(X509Certificates));
122  Payment_descriptor_ = file->message_type(4);
123  static const int Payment_offsets_[4] = {
124  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, merchant_data_),
125  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, transactions_),
126  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, refund_to_),
127  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, memo_),
128  };
129  Payment_reflection_ =
130  new ::google::protobuf::internal::GeneratedMessageReflection(
131  Payment_descriptor_,
133  Payment_offsets_,
134  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, _has_bits_[0]),
135  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payment, _unknown_fields_),
136  -1,
137  ::google::protobuf::DescriptorPool::generated_pool(),
138  ::google::protobuf::MessageFactory::generated_factory(),
139  sizeof(Payment));
140  PaymentACK_descriptor_ = file->message_type(5);
141  static const int PaymentACK_offsets_[2] = {
142  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentACK, payment_),
143  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentACK, memo_),
144  };
145  PaymentACK_reflection_ =
146  new ::google::protobuf::internal::GeneratedMessageReflection(
147  PaymentACK_descriptor_,
149  PaymentACK_offsets_,
150  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentACK, _has_bits_[0]),
151  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PaymentACK, _unknown_fields_),
152  -1,
153  ::google::protobuf::DescriptorPool::generated_pool(),
154  ::google::protobuf::MessageFactory::generated_factory(),
155  sizeof(PaymentACK));
156 }
157 
158 namespace {
159 
160 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
161 inline void protobuf_AssignDescriptorsOnce() {
162  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
164 }
165 
166 void protobuf_RegisterTypes(const ::std::string&) {
167  protobuf_AssignDescriptorsOnce();
168  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
169  Output_descriptor_, &Output::default_instance());
170  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
171  PaymentDetails_descriptor_, &PaymentDetails::default_instance());
172  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
173  PaymentRequest_descriptor_, &PaymentRequest::default_instance());
174  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
175  X509Certificates_descriptor_, &X509Certificates::default_instance());
176  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
177  Payment_descriptor_, &Payment::default_instance());
178  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
179  PaymentACK_descriptor_, &PaymentACK::default_instance());
180 }
181 
182 } // namespace
183 
186  delete Output_reflection_;
188  delete PaymentDetails_reflection_;
191  delete PaymentRequest_reflection_;
194  delete X509Certificates_reflection_;
196  delete Payment_reflection_;
198  delete PaymentACK_reflection_;
199 }
200 
202  static bool already_here = false;
203  if (already_here) return;
204  already_here = true;
205  GOOGLE_PROTOBUF_VERIFY_VERSION;
206 
207  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
208  "\n\024paymentrequest.proto\022\010payments\"+\n\006Outp"
209  "ut\022\021\n\006amount\030\001 \001(\004:\0010\022\016\n\006script\030\002 \002(\014\"\243\001"
210  "\n\016PaymentDetails\022\025\n\007network\030\001 \001(\t:\004main\022"
211  "!\n\007outputs\030\002 \003(\0132\020.payments.Output\022\014\n\004ti"
212  "me\030\003 \002(\004\022\017\n\007expires\030\004 \001(\004\022\014\n\004memo\030\005 \001(\t\022"
213  "\023\n\013payment_url\030\006 \001(\t\022\025\n\rmerchant_data\030\007 "
214  "\001(\014\"\225\001\n\016PaymentRequest\022\"\n\027payment_detail"
215  "s_version\030\001 \001(\r:\0011\022\026\n\010pki_type\030\002 \001(\t:\004no"
216  "ne\022\020\n\010pki_data\030\003 \001(\014\022\"\n\032serialized_payme"
217  "nt_details\030\004 \002(\014\022\021\n\tsignature\030\005 \001(\014\"\'\n\020X"
218  "509Certificates\022\023\n\013certificate\030\001 \003(\014\"i\n\007"
219  "Payment\022\025\n\rmerchant_data\030\001 \001(\014\022\024\n\014transa"
220  "ctions\030\002 \003(\014\022#\n\trefund_to\030\003 \003(\0132\020.paymen"
221  "ts.Output\022\014\n\004memo\030\004 \001(\t\">\n\nPaymentACK\022\"\n"
222  "\007payment\030\001 \002(\0132\021.payments.Payment\022\014\n\004mem"
223  "o\030\002 \001(\tB(\n\036org.fabcoin.protocols.payment"
224  "sB\006Protos", 649);
225  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
226  "paymentrequest.proto", &protobuf_RegisterTypes);
229  new ::std::string("main", 4);
232  new ::std::string("none", 4);
243  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_paymentrequest_2eproto);
244 }
245 
246 // Force AddDescriptors() to be called at static initialization time.
250  }
252 
253 // ===================================================================
254 
255 #ifndef _MSC_VER
258 #endif // !_MSC_VER
259 
261  : ::google::protobuf::Message() {
262  SharedCtor();
263  // @@protoc_insertion_point(constructor:payments.Output)
264 }
265 
267 }
268 
269 Output::Output(const Output& from)
270  : ::google::protobuf::Message() {
271  SharedCtor();
272  MergeFrom(from);
273  // @@protoc_insertion_point(copy_constructor:payments.Output)
274 }
275 
277  ::google::protobuf::internal::GetEmptyString();
278  _cached_size_ = 0;
279  amount_ = GOOGLE_ULONGLONG(0);
280  script_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
281  ::memset(_has_bits_, 0, sizeof(_has_bits_));
282 }
283 
285  // @@protoc_insertion_point(destructor:payments.Output)
286  SharedDtor();
287 }
288 
290  if (script_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
291  delete script_;
292  }
293  if (this != default_instance_) {
294  }
295 }
296 
297 void Output::SetCachedSize(int size) const {
298  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
300  GOOGLE_SAFE_CONCURRENT_WRITES_END();
301 }
302 const ::google::protobuf::Descriptor* Output::descriptor() {
303  protobuf_AssignDescriptorsOnce();
304  return Output_descriptor_;
305 }
306 
309  return *default_instance_;
310 }
311 
313 
314 Output* Output::New() const {
315  return new Output;
316 }
317 
319  if (_has_bits_[0 / 32] & 3) {
320  amount_ = GOOGLE_ULONGLONG(0);
321  if (has_script()) {
322  if (script_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
323  script_->clear();
324  }
325  }
326  }
327  ::memset(_has_bits_, 0, sizeof(_has_bits_));
328  mutable_unknown_fields()->Clear();
329 }
330 
332  ::google::protobuf::io::CodedInputStream* input) {
333 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
334  ::google::protobuf::uint32 tag;
335  // @@protoc_insertion_point(parse_start:payments.Output)
336  for (;;) {
337  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
338  tag = p.first;
339  if (!p.second) goto handle_unusual;
340  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
341  // optional uint64 amount = 1 [default = 0];
342  case 1: {
343  if (tag == 8) {
344  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
345  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
346  input, &amount_)));
347  set_has_amount();
348  } else {
349  goto handle_unusual;
350  }
351  if (input->ExpectTag(18)) goto parse_script;
352  break;
353  }
354 
355  // required bytes script = 2;
356  case 2: {
357  if (tag == 18) {
358  parse_script:
359  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
360  input, this->mutable_script()));
361  } else {
362  goto handle_unusual;
363  }
364  if (input->ExpectAtEnd()) goto success;
365  break;
366  }
367 
368  default: {
369  handle_unusual:
370  if (tag == 0 ||
371  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
372  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
373  goto success;
374  }
375  DO_(::google::protobuf::internal::WireFormat::SkipField(
376  input, tag, mutable_unknown_fields()));
377  break;
378  }
379  }
380  }
381 success:
382  // @@protoc_insertion_point(parse_success:payments.Output)
383  return true;
384 failure:
385  // @@protoc_insertion_point(parse_failure:payments.Output)
386  return false;
387 #undef DO_
388 }
389 
391  ::google::protobuf::io::CodedOutputStream* output) const {
392  // @@protoc_insertion_point(serialize_start:payments.Output)
393  // optional uint64 amount = 1 [default = 0];
394  if (has_amount()) {
395  ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->amount(), output);
396  }
397 
398  // required bytes script = 2;
399  if (has_script()) {
400  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
401  2, this->script(), output);
402  }
403 
404  if (!unknown_fields().empty()) {
405  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
406  unknown_fields(), output);
407  }
408  // @@protoc_insertion_point(serialize_end:payments.Output)
409 }
410 
411 ::google::protobuf::uint8* Output::SerializeWithCachedSizesToArray(
412  ::google::protobuf::uint8* target) const {
413  // @@protoc_insertion_point(serialize_to_array_start:payments.Output)
414  // optional uint64 amount = 1 [default = 0];
415  if (has_amount()) {
416  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->amount(), target);
417  }
418 
419  // required bytes script = 2;
420  if (has_script()) {
421  target =
422  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
423  2, this->script(), target);
424  }
425 
426  if (!unknown_fields().empty()) {
427  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
428  unknown_fields(), target);
429  }
430  // @@protoc_insertion_point(serialize_to_array_end:payments.Output)
431  return target;
432 }
433 
434 int Output::ByteSize() const {
435  int total_size = 0;
436 
437  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
438  // optional uint64 amount = 1 [default = 0];
439  if (has_amount()) {
440  total_size += 1 +
441  ::google::protobuf::internal::WireFormatLite::UInt64Size(
442  this->amount());
443  }
444 
445  // required bytes script = 2;
446  if (has_script()) {
447  total_size += 1 +
448  ::google::protobuf::internal::WireFormatLite::BytesSize(
449  this->script());
450  }
451 
452  }
453  if (!unknown_fields().empty()) {
454  total_size +=
455  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
456  unknown_fields());
457  }
458  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
459  _cached_size_ = total_size;
460  GOOGLE_SAFE_CONCURRENT_WRITES_END();
461  return total_size;
462 }
463 
464 void Output::MergeFrom(const ::google::protobuf::Message& from) {
465  GOOGLE_CHECK_NE(&from, this);
466  const Output* source =
467  ::google::protobuf::internal::dynamic_cast_if_available<const Output*>(
468  &from);
469  if (source == NULL) {
470  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
471  } else {
472  MergeFrom(*source);
473  }
474 }
475 
476 void Output::MergeFrom(const Output& from) {
477  GOOGLE_CHECK_NE(&from, this);
478  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
479  if (from.has_amount()) {
480  set_amount(from.amount());
481  }
482  if (from.has_script()) {
483  set_script(from.script());
484  }
485  }
486  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
487 }
488 
489 void Output::CopyFrom(const ::google::protobuf::Message& from) {
490  if (&from == this) return;
491  Clear();
492  MergeFrom(from);
493 }
494 
495 void Output::CopyFrom(const Output& from) {
496  if (&from == this) return;
497  Clear();
498  MergeFrom(from);
499 }
500 
501 bool Output::IsInitialized() const {
502  if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
503 
504  return true;
505 }
506 
507 void Output::Swap(Output* other) {
508  if (other != this) {
509  std::swap(amount_, other->amount_);
510  std::swap(script_, other->script_);
511  std::swap(_has_bits_[0], other->_has_bits_[0]);
512  _unknown_fields_.Swap(&other->_unknown_fields_);
514  }
515 }
516 
517 ::google::protobuf::Metadata Output::GetMetadata() const {
518  protobuf_AssignDescriptorsOnce();
519  ::google::protobuf::Metadata metadata;
520  metadata.descriptor = Output_descriptor_;
521  metadata.reflection = Output_reflection_;
522  return metadata;
523 }
524 
525 
526 // ===================================================================
527 
528 ::std::string* PaymentDetails::_default_network_ = NULL;
529 #ifndef _MSC_VER
537 #endif // !_MSC_VER
538 
540  : ::google::protobuf::Message() {
541  SharedCtor();
542  // @@protoc_insertion_point(constructor:payments.PaymentDetails)
543 }
544 
546 }
547 
549  : ::google::protobuf::Message() {
550  SharedCtor();
551  MergeFrom(from);
552  // @@protoc_insertion_point(copy_constructor:payments.PaymentDetails)
553 }
554 
556  ::google::protobuf::internal::GetEmptyString();
557  _cached_size_ = 0;
558  network_ = const_cast< ::std::string*>(_default_network_);
559  time_ = GOOGLE_ULONGLONG(0);
560  expires_ = GOOGLE_ULONGLONG(0);
561  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
562  payment_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
563  merchant_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
564  ::memset(_has_bits_, 0, sizeof(_has_bits_));
565 }
566 
568  // @@protoc_insertion_point(destructor:payments.PaymentDetails)
569  SharedDtor();
570 }
571 
573  if (network_ != _default_network_) {
574  delete network_;
575  }
576  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
577  delete memo_;
578  }
579  if (payment_url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
580  delete payment_url_;
581  }
582  if (merchant_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
583  delete merchant_data_;
584  }
585  if (this != default_instance_) {
586  }
587 }
588 
590  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
592  GOOGLE_SAFE_CONCURRENT_WRITES_END();
593 }
594 const ::google::protobuf::Descriptor* PaymentDetails::descriptor() {
595  protobuf_AssignDescriptorsOnce();
596  return PaymentDetails_descriptor_;
597 }
598 
601  return *default_instance_;
602 }
603 
605 
607  return new PaymentDetails;
608 }
609 
611 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
612  &reinterpret_cast<PaymentDetails*>(16)->f) - \
613  reinterpret_cast<char*>(16))
614 
615 #define ZR_(first, last) do { \
616  size_t f = OFFSET_OF_FIELD_(first); \
617  size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
618  ::memset(&first, 0, n); \
619  } while (0)
620 
621  if (_has_bits_[0 / 32] & 125) {
622  ZR_(time_, expires_);
623  if (has_network()) {
624  if (network_ != _default_network_) {
625  network_->assign(*_default_network_);
626  }
627  }
628  if (has_memo()) {
629  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
630  memo_->clear();
631  }
632  }
633  if (has_payment_url()) {
634  if (payment_url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
635  payment_url_->clear();
636  }
637  }
638  if (has_merchant_data()) {
639  if (merchant_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
640  merchant_data_->clear();
641  }
642  }
643  }
644 
645 #undef OFFSET_OF_FIELD_
646 #undef ZR_
647 
648  outputs_.Clear();
649  ::memset(_has_bits_, 0, sizeof(_has_bits_));
650  mutable_unknown_fields()->Clear();
651 }
652 
654  ::google::protobuf::io::CodedInputStream* input) {
655 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
656  ::google::protobuf::uint32 tag;
657  // @@protoc_insertion_point(parse_start:payments.PaymentDetails)
658  for (;;) {
659  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
660  tag = p.first;
661  if (!p.second) goto handle_unusual;
662  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
663  // optional string network = 1 [default = "main"];
664  case 1: {
665  if (tag == 10) {
666  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
667  input, this->mutable_network()));
668  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
669  this->network().data(), this->network().length(),
670  ::google::protobuf::internal::WireFormat::PARSE,
671  "network");
672  } else {
673  goto handle_unusual;
674  }
675  if (input->ExpectTag(18)) goto parse_outputs;
676  break;
677  }
678 
679  // repeated .payments.Output outputs = 2;
680  case 2: {
681  if (tag == 18) {
682  parse_outputs:
683  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
684  input, add_outputs()));
685  } else {
686  goto handle_unusual;
687  }
688  if (input->ExpectTag(18)) goto parse_outputs;
689  if (input->ExpectTag(24)) goto parse_time;
690  break;
691  }
692 
693  // required uint64 time = 3;
694  case 3: {
695  if (tag == 24) {
696  parse_time:
697  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
698  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
699  input, &time_)));
700  set_has_time();
701  } else {
702  goto handle_unusual;
703  }
704  if (input->ExpectTag(32)) goto parse_expires;
705  break;
706  }
707 
708  // optional uint64 expires = 4;
709  case 4: {
710  if (tag == 32) {
711  parse_expires:
712  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
713  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
714  input, &expires_)));
715  set_has_expires();
716  } else {
717  goto handle_unusual;
718  }
719  if (input->ExpectTag(42)) goto parse_memo;
720  break;
721  }
722 
723  // optional string memo = 5;
724  case 5: {
725  if (tag == 42) {
726  parse_memo:
727  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
728  input, this->mutable_memo()));
729  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
730  this->memo().data(), this->memo().length(),
731  ::google::protobuf::internal::WireFormat::PARSE,
732  "memo");
733  } else {
734  goto handle_unusual;
735  }
736  if (input->ExpectTag(50)) goto parse_payment_url;
737  break;
738  }
739 
740  // optional string payment_url = 6;
741  case 6: {
742  if (tag == 50) {
743  parse_payment_url:
744  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
745  input, this->mutable_payment_url()));
746  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
747  this->payment_url().data(), this->payment_url().length(),
748  ::google::protobuf::internal::WireFormat::PARSE,
749  "payment_url");
750  } else {
751  goto handle_unusual;
752  }
753  if (input->ExpectTag(58)) goto parse_merchant_data;
754  break;
755  }
756 
757  // optional bytes merchant_data = 7;
758  case 7: {
759  if (tag == 58) {
760  parse_merchant_data:
761  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
762  input, this->mutable_merchant_data()));
763  } else {
764  goto handle_unusual;
765  }
766  if (input->ExpectAtEnd()) goto success;
767  break;
768  }
769 
770  default: {
771  handle_unusual:
772  if (tag == 0 ||
773  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
774  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
775  goto success;
776  }
777  DO_(::google::protobuf::internal::WireFormat::SkipField(
778  input, tag, mutable_unknown_fields()));
779  break;
780  }
781  }
782  }
783 success:
784  // @@protoc_insertion_point(parse_success:payments.PaymentDetails)
785  return true;
786 failure:
787  // @@protoc_insertion_point(parse_failure:payments.PaymentDetails)
788  return false;
789 #undef DO_
790 }
791 
793  ::google::protobuf::io::CodedOutputStream* output) const {
794  // @@protoc_insertion_point(serialize_start:payments.PaymentDetails)
795  // optional string network = 1 [default = "main"];
796  if (has_network()) {
797  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
798  this->network().data(), this->network().length(),
799  ::google::protobuf::internal::WireFormat::SERIALIZE,
800  "network");
801  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
802  1, this->network(), output);
803  }
804 
805  // repeated .payments.Output outputs = 2;
806  for (int i = 0; i < this->outputs_size(); i++) {
807  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
808  2, this->outputs(i), output);
809  }
810 
811  // required uint64 time = 3;
812  if (has_time()) {
813  ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->time(), output);
814  }
815 
816  // optional uint64 expires = 4;
817  if (has_expires()) {
818  ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->expires(), output);
819  }
820 
821  // optional string memo = 5;
822  if (has_memo()) {
823  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
824  this->memo().data(), this->memo().length(),
825  ::google::protobuf::internal::WireFormat::SERIALIZE,
826  "memo");
827  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
828  5, this->memo(), output);
829  }
830 
831  // optional string payment_url = 6;
832  if (has_payment_url()) {
833  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
834  this->payment_url().data(), this->payment_url().length(),
835  ::google::protobuf::internal::WireFormat::SERIALIZE,
836  "payment_url");
837  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
838  6, this->payment_url(), output);
839  }
840 
841  // optional bytes merchant_data = 7;
842  if (has_merchant_data()) {
843  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
844  7, this->merchant_data(), output);
845  }
846 
847  if (!unknown_fields().empty()) {
848  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
849  unknown_fields(), output);
850  }
851  // @@protoc_insertion_point(serialize_end:payments.PaymentDetails)
852 }
853 
855  ::google::protobuf::uint8* target) const {
856  // @@protoc_insertion_point(serialize_to_array_start:payments.PaymentDetails)
857  // optional string network = 1 [default = "main"];
858  if (has_network()) {
859  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
860  this->network().data(), this->network().length(),
861  ::google::protobuf::internal::WireFormat::SERIALIZE,
862  "network");
863  target =
864  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
865  1, this->network(), target);
866  }
867 
868  // repeated .payments.Output outputs = 2;
869  for (int i = 0; i < this->outputs_size(); i++) {
870  target = ::google::protobuf::internal::WireFormatLite::
871  WriteMessageNoVirtualToArray(
872  2, this->outputs(i), target);
873  }
874 
875  // required uint64 time = 3;
876  if (has_time()) {
877  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->time(), target);
878  }
879 
880  // optional uint64 expires = 4;
881  if (has_expires()) {
882  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->expires(), target);
883  }
884 
885  // optional string memo = 5;
886  if (has_memo()) {
887  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
888  this->memo().data(), this->memo().length(),
889  ::google::protobuf::internal::WireFormat::SERIALIZE,
890  "memo");
891  target =
892  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
893  5, this->memo(), target);
894  }
895 
896  // optional string payment_url = 6;
897  if (has_payment_url()) {
898  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
899  this->payment_url().data(), this->payment_url().length(),
900  ::google::protobuf::internal::WireFormat::SERIALIZE,
901  "payment_url");
902  target =
903  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
904  6, this->payment_url(), target);
905  }
906 
907  // optional bytes merchant_data = 7;
908  if (has_merchant_data()) {
909  target =
910  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
911  7, this->merchant_data(), target);
912  }
913 
914  if (!unknown_fields().empty()) {
915  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
916  unknown_fields(), target);
917  }
918  // @@protoc_insertion_point(serialize_to_array_end:payments.PaymentDetails)
919  return target;
920 }
921 
923  int total_size = 0;
924 
925  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
926  // optional string network = 1 [default = "main"];
927  if (has_network()) {
928  total_size += 1 +
929  ::google::protobuf::internal::WireFormatLite::StringSize(
930  this->network());
931  }
932 
933  // required uint64 time = 3;
934  if (has_time()) {
935  total_size += 1 +
936  ::google::protobuf::internal::WireFormatLite::UInt64Size(
937  this->time());
938  }
939 
940  // optional uint64 expires = 4;
941  if (has_expires()) {
942  total_size += 1 +
943  ::google::protobuf::internal::WireFormatLite::UInt64Size(
944  this->expires());
945  }
946 
947  // optional string memo = 5;
948  if (has_memo()) {
949  total_size += 1 +
950  ::google::protobuf::internal::WireFormatLite::StringSize(
951  this->memo());
952  }
953 
954  // optional string payment_url = 6;
955  if (has_payment_url()) {
956  total_size += 1 +
957  ::google::protobuf::internal::WireFormatLite::StringSize(
958  this->payment_url());
959  }
960 
961  // optional bytes merchant_data = 7;
962  if (has_merchant_data()) {
963  total_size += 1 +
964  ::google::protobuf::internal::WireFormatLite::BytesSize(
965  this->merchant_data());
966  }
967 
968  }
969  // repeated .payments.Output outputs = 2;
970  total_size += 1 * this->outputs_size();
971  for (int i = 0; i < this->outputs_size(); i++) {
972  total_size +=
973  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
974  this->outputs(i));
975  }
976 
977  if (!unknown_fields().empty()) {
978  total_size +=
979  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
980  unknown_fields());
981  }
982  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
983  _cached_size_ = total_size;
984  GOOGLE_SAFE_CONCURRENT_WRITES_END();
985  return total_size;
986 }
987 
988 void PaymentDetails::MergeFrom(const ::google::protobuf::Message& from) {
989  GOOGLE_CHECK_NE(&from, this);
990  const PaymentDetails* source =
991  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentDetails*>(
992  &from);
993  if (source == NULL) {
994  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
995  } else {
996  MergeFrom(*source);
997  }
998 }
999 
1001  GOOGLE_CHECK_NE(&from, this);
1002  outputs_.MergeFrom(from.outputs_);
1003  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1004  if (from.has_network()) {
1005  set_network(from.network());
1006  }
1007  if (from.has_time()) {
1008  set_time(from.time());
1009  }
1010  if (from.has_expires()) {
1011  set_expires(from.expires());
1012  }
1013  if (from.has_memo()) {
1014  set_memo(from.memo());
1015  }
1016  if (from.has_payment_url()) {
1017  set_payment_url(from.payment_url());
1018  }
1019  if (from.has_merchant_data()) {
1021  }
1022  }
1023  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1024 }
1025 
1026 void PaymentDetails::CopyFrom(const ::google::protobuf::Message& from) {
1027  if (&from == this) return;
1028  Clear();
1029  MergeFrom(from);
1030 }
1031 
1033  if (&from == this) return;
1034  Clear();
1035  MergeFrom(from);
1036 }
1037 
1039  if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
1040 
1041  if (!::google::protobuf::internal::AllAreInitialized(this->outputs())) return false;
1042  return true;
1043 }
1044 
1046  if (other != this) {
1047  std::swap(network_, other->network_);
1048  outputs_.Swap(&other->outputs_);
1049  std::swap(time_, other->time_);
1050  std::swap(expires_, other->expires_);
1051  std::swap(memo_, other->memo_);
1054  std::swap(_has_bits_[0], other->_has_bits_[0]);
1055  _unknown_fields_.Swap(&other->_unknown_fields_);
1057  }
1058 }
1059 
1060 ::google::protobuf::Metadata PaymentDetails::GetMetadata() const {
1061  protobuf_AssignDescriptorsOnce();
1062  ::google::protobuf::Metadata metadata;
1063  metadata.descriptor = PaymentDetails_descriptor_;
1064  metadata.reflection = PaymentDetails_reflection_;
1065  return metadata;
1066 }
1067 
1068 
1069 // ===================================================================
1070 
1071 ::std::string* PaymentRequest::_default_pki_type_ = NULL;
1072 #ifndef _MSC_VER
1078 #endif // !_MSC_VER
1079 
1081  : ::google::protobuf::Message() {
1082  SharedCtor();
1083  // @@protoc_insertion_point(constructor:payments.PaymentRequest)
1084 }
1085 
1087 }
1088 
1090  : ::google::protobuf::Message() {
1091  SharedCtor();
1092  MergeFrom(from);
1093  // @@protoc_insertion_point(copy_constructor:payments.PaymentRequest)
1094 }
1095 
1097  ::google::protobuf::internal::GetEmptyString();
1098  _cached_size_ = 0;
1100  pki_type_ = const_cast< ::std::string*>(_default_pki_type_);
1101  pki_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1102  serialized_payment_details_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1103  signature_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1104  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1105 }
1106 
1108  // @@protoc_insertion_point(destructor:payments.PaymentRequest)
1109  SharedDtor();
1110 }
1111 
1113  if (pki_type_ != _default_pki_type_) {
1114  delete pki_type_;
1115  }
1116  if (pki_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1117  delete pki_data_;
1118  }
1119  if (serialized_payment_details_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1121  }
1122  if (signature_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1123  delete signature_;
1124  }
1125  if (this != default_instance_) {
1126  }
1127 }
1128 
1130  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1131  _cached_size_ = size;
1132  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1133 }
1134 const ::google::protobuf::Descriptor* PaymentRequest::descriptor() {
1135  protobuf_AssignDescriptorsOnce();
1136  return PaymentRequest_descriptor_;
1137 }
1138 
1141  return *default_instance_;
1142 }
1143 
1145 
1147  return new PaymentRequest;
1148 }
1149 
1151  if (_has_bits_[0 / 32] & 31) {
1153  if (has_pki_type()) {
1154  if (pki_type_ != _default_pki_type_) {
1155  pki_type_->assign(*_default_pki_type_);
1156  }
1157  }
1158  if (has_pki_data()) {
1159  if (pki_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1160  pki_data_->clear();
1161  }
1162  }
1164  if (serialized_payment_details_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1165  serialized_payment_details_->clear();
1166  }
1167  }
1168  if (has_signature()) {
1169  if (signature_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1170  signature_->clear();
1171  }
1172  }
1173  }
1174  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1175  mutable_unknown_fields()->Clear();
1176 }
1177 
1179  ::google::protobuf::io::CodedInputStream* input) {
1180 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1181  ::google::protobuf::uint32 tag;
1182  // @@protoc_insertion_point(parse_start:payments.PaymentRequest)
1183  for (;;) {
1184  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1185  tag = p.first;
1186  if (!p.second) goto handle_unusual;
1187  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1188  // optional uint32 payment_details_version = 1 [default = 1];
1189  case 1: {
1190  if (tag == 8) {
1191  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1192  ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1193  input, &payment_details_version_)));
1195  } else {
1196  goto handle_unusual;
1197  }
1198  if (input->ExpectTag(18)) goto parse_pki_type;
1199  break;
1200  }
1201 
1202  // optional string pki_type = 2 [default = "none"];
1203  case 2: {
1204  if (tag == 18) {
1205  parse_pki_type:
1206  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1207  input, this->mutable_pki_type()));
1208  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1209  this->pki_type().data(), this->pki_type().length(),
1210  ::google::protobuf::internal::WireFormat::PARSE,
1211  "pki_type");
1212  } else {
1213  goto handle_unusual;
1214  }
1215  if (input->ExpectTag(26)) goto parse_pki_data;
1216  break;
1217  }
1218 
1219  // optional bytes pki_data = 3;
1220  case 3: {
1221  if (tag == 26) {
1222  parse_pki_data:
1223  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1224  input, this->mutable_pki_data()));
1225  } else {
1226  goto handle_unusual;
1227  }
1228  if (input->ExpectTag(34)) goto parse_serialized_payment_details;
1229  break;
1230  }
1231 
1232  // required bytes serialized_payment_details = 4;
1233  case 4: {
1234  if (tag == 34) {
1235  parse_serialized_payment_details:
1236  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1237  input, this->mutable_serialized_payment_details()));
1238  } else {
1239  goto handle_unusual;
1240  }
1241  if (input->ExpectTag(42)) goto parse_signature;
1242  break;
1243  }
1244 
1245  // optional bytes signature = 5;
1246  case 5: {
1247  if (tag == 42) {
1248  parse_signature:
1249  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1250  input, this->mutable_signature()));
1251  } else {
1252  goto handle_unusual;
1253  }
1254  if (input->ExpectAtEnd()) goto success;
1255  break;
1256  }
1257 
1258  default: {
1259  handle_unusual:
1260  if (tag == 0 ||
1261  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1262  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1263  goto success;
1264  }
1265  DO_(::google::protobuf::internal::WireFormat::SkipField(
1266  input, tag, mutable_unknown_fields()));
1267  break;
1268  }
1269  }
1270  }
1271 success:
1272  // @@protoc_insertion_point(parse_success:payments.PaymentRequest)
1273  return true;
1274 failure:
1275  // @@protoc_insertion_point(parse_failure:payments.PaymentRequest)
1276  return false;
1277 #undef DO_
1278 }
1279 
1281  ::google::protobuf::io::CodedOutputStream* output) const {
1282  // @@protoc_insertion_point(serialize_start:payments.PaymentRequest)
1283  // optional uint32 payment_details_version = 1 [default = 1];
1285  ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->payment_details_version(), output);
1286  }
1287 
1288  // optional string pki_type = 2 [default = "none"];
1289  if (has_pki_type()) {
1290  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1291  this->pki_type().data(), this->pki_type().length(),
1292  ::google::protobuf::internal::WireFormat::SERIALIZE,
1293  "pki_type");
1294  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1295  2, this->pki_type(), output);
1296  }
1297 
1298  // optional bytes pki_data = 3;
1299  if (has_pki_data()) {
1300  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1301  3, this->pki_data(), output);
1302  }
1303 
1304  // required bytes serialized_payment_details = 4;
1306  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1307  4, this->serialized_payment_details(), output);
1308  }
1309 
1310  // optional bytes signature = 5;
1311  if (has_signature()) {
1312  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1313  5, this->signature(), output);
1314  }
1315 
1316  if (!unknown_fields().empty()) {
1317  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1318  unknown_fields(), output);
1319  }
1320  // @@protoc_insertion_point(serialize_end:payments.PaymentRequest)
1321 }
1322 
1324  ::google::protobuf::uint8* target) const {
1325  // @@protoc_insertion_point(serialize_to_array_start:payments.PaymentRequest)
1326  // optional uint32 payment_details_version = 1 [default = 1];
1328  target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->payment_details_version(), target);
1329  }
1330 
1331  // optional string pki_type = 2 [default = "none"];
1332  if (has_pki_type()) {
1333  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1334  this->pki_type().data(), this->pki_type().length(),
1335  ::google::protobuf::internal::WireFormat::SERIALIZE,
1336  "pki_type");
1337  target =
1338  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1339  2, this->pki_type(), target);
1340  }
1341 
1342  // optional bytes pki_data = 3;
1343  if (has_pki_data()) {
1344  target =
1345  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1346  3, this->pki_data(), target);
1347  }
1348 
1349  // required bytes serialized_payment_details = 4;
1351  target =
1352  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1353  4, this->serialized_payment_details(), target);
1354  }
1355 
1356  // optional bytes signature = 5;
1357  if (has_signature()) {
1358  target =
1359  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1360  5, this->signature(), target);
1361  }
1362 
1363  if (!unknown_fields().empty()) {
1364  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1365  unknown_fields(), target);
1366  }
1367  // @@protoc_insertion_point(serialize_to_array_end:payments.PaymentRequest)
1368  return target;
1369 }
1370 
1372  int total_size = 0;
1373 
1374  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1375  // optional uint32 payment_details_version = 1 [default = 1];
1377  total_size += 1 +
1378  ::google::protobuf::internal::WireFormatLite::UInt32Size(
1379  this->payment_details_version());
1380  }
1381 
1382  // optional string pki_type = 2 [default = "none"];
1383  if (has_pki_type()) {
1384  total_size += 1 +
1385  ::google::protobuf::internal::WireFormatLite::StringSize(
1386  this->pki_type());
1387  }
1388 
1389  // optional bytes pki_data = 3;
1390  if (has_pki_data()) {
1391  total_size += 1 +
1392  ::google::protobuf::internal::WireFormatLite::BytesSize(
1393  this->pki_data());
1394  }
1395 
1396  // required bytes serialized_payment_details = 4;
1398  total_size += 1 +
1399  ::google::protobuf::internal::WireFormatLite::BytesSize(
1400  this->serialized_payment_details());
1401  }
1402 
1403  // optional bytes signature = 5;
1404  if (has_signature()) {
1405  total_size += 1 +
1406  ::google::protobuf::internal::WireFormatLite::BytesSize(
1407  this->signature());
1408  }
1409 
1410  }
1411  if (!unknown_fields().empty()) {
1412  total_size +=
1413  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1414  unknown_fields());
1415  }
1416  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1417  _cached_size_ = total_size;
1418  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1419  return total_size;
1420 }
1421 
1422 void PaymentRequest::MergeFrom(const ::google::protobuf::Message& from) {
1423  GOOGLE_CHECK_NE(&from, this);
1424  const PaymentRequest* source =
1425  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentRequest*>(
1426  &from);
1427  if (source == NULL) {
1428  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1429  } else {
1430  MergeFrom(*source);
1431  }
1432 }
1433 
1435  GOOGLE_CHECK_NE(&from, this);
1436  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1437  if (from.has_payment_details_version()) {
1439  }
1440  if (from.has_pki_type()) {
1441  set_pki_type(from.pki_type());
1442  }
1443  if (from.has_pki_data()) {
1444  set_pki_data(from.pki_data());
1445  }
1446  if (from.has_serialized_payment_details()) {
1448  }
1449  if (from.has_signature()) {
1450  set_signature(from.signature());
1451  }
1452  }
1453  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1454 }
1455 
1456 void PaymentRequest::CopyFrom(const ::google::protobuf::Message& from) {
1457  if (&from == this) return;
1458  Clear();
1459  MergeFrom(from);
1460 }
1461 
1463  if (&from == this) return;
1464  Clear();
1465  MergeFrom(from);
1466 }
1467 
1469  if ((_has_bits_[0] & 0x00000008) != 0x00000008) return false;
1470 
1471  return true;
1472 }
1473 
1475  if (other != this) {
1477  std::swap(pki_type_, other->pki_type_);
1478  std::swap(pki_data_, other->pki_data_);
1480  std::swap(signature_, other->signature_);
1481  std::swap(_has_bits_[0], other->_has_bits_[0]);
1482  _unknown_fields_.Swap(&other->_unknown_fields_);
1484  }
1485 }
1486 
1487 ::google::protobuf::Metadata PaymentRequest::GetMetadata() const {
1488  protobuf_AssignDescriptorsOnce();
1489  ::google::protobuf::Metadata metadata;
1490  metadata.descriptor = PaymentRequest_descriptor_;
1491  metadata.reflection = PaymentRequest_reflection_;
1492  return metadata;
1493 }
1494 
1495 
1496 // ===================================================================
1497 
1498 #ifndef _MSC_VER
1500 #endif // !_MSC_VER
1501 
1503  : ::google::protobuf::Message() {
1504  SharedCtor();
1505  // @@protoc_insertion_point(constructor:payments.X509Certificates)
1506 }
1507 
1509 }
1510 
1512  : ::google::protobuf::Message() {
1513  SharedCtor();
1514  MergeFrom(from);
1515  // @@protoc_insertion_point(copy_constructor:payments.X509Certificates)
1516 }
1517 
1519  ::google::protobuf::internal::GetEmptyString();
1520  _cached_size_ = 0;
1521  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1522 }
1523 
1525  // @@protoc_insertion_point(destructor:payments.X509Certificates)
1526  SharedDtor();
1527 }
1528 
1530  if (this != default_instance_) {
1531  }
1532 }
1533 
1535  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1536  _cached_size_ = size;
1537  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1538 }
1539 const ::google::protobuf::Descriptor* X509Certificates::descriptor() {
1540  protobuf_AssignDescriptorsOnce();
1541  return X509Certificates_descriptor_;
1542 }
1543 
1546  return *default_instance_;
1547 }
1548 
1550 
1552  return new X509Certificates;
1553 }
1554 
1556  certificate_.Clear();
1557  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1558  mutable_unknown_fields()->Clear();
1559 }
1560 
1562  ::google::protobuf::io::CodedInputStream* input) {
1563 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1564  ::google::protobuf::uint32 tag;
1565  // @@protoc_insertion_point(parse_start:payments.X509Certificates)
1566  for (;;) {
1567  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1568  tag = p.first;
1569  if (!p.second) goto handle_unusual;
1570  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1571  // repeated bytes certificate = 1;
1572  case 1: {
1573  if (tag == 10) {
1574  parse_certificate:
1575  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1576  input, this->add_certificate()));
1577  } else {
1578  goto handle_unusual;
1579  }
1580  if (input->ExpectTag(10)) goto parse_certificate;
1581  if (input->ExpectAtEnd()) goto success;
1582  break;
1583  }
1584 
1585  default: {
1586  handle_unusual:
1587  if (tag == 0 ||
1588  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1589  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1590  goto success;
1591  }
1592  DO_(::google::protobuf::internal::WireFormat::SkipField(
1593  input, tag, mutable_unknown_fields()));
1594  break;
1595  }
1596  }
1597  }
1598 success:
1599  // @@protoc_insertion_point(parse_success:payments.X509Certificates)
1600  return true;
1601 failure:
1602  // @@protoc_insertion_point(parse_failure:payments.X509Certificates)
1603  return false;
1604 #undef DO_
1605 }
1606 
1608  ::google::protobuf::io::CodedOutputStream* output) const {
1609  // @@protoc_insertion_point(serialize_start:payments.X509Certificates)
1610  // repeated bytes certificate = 1;
1611  for (int i = 0; i < this->certificate_size(); i++) {
1612  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1613  1, this->certificate(i), output);
1614  }
1615 
1616  if (!unknown_fields().empty()) {
1617  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1618  unknown_fields(), output);
1619  }
1620  // @@protoc_insertion_point(serialize_end:payments.X509Certificates)
1621 }
1622 
1624  ::google::protobuf::uint8* target) const {
1625  // @@protoc_insertion_point(serialize_to_array_start:payments.X509Certificates)
1626  // repeated bytes certificate = 1;
1627  for (int i = 0; i < this->certificate_size(); i++) {
1628  target = ::google::protobuf::internal::WireFormatLite::
1629  WriteBytesToArray(1, this->certificate(i), target);
1630  }
1631 
1632  if (!unknown_fields().empty()) {
1633  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1634  unknown_fields(), target);
1635  }
1636  // @@protoc_insertion_point(serialize_to_array_end:payments.X509Certificates)
1637  return target;
1638 }
1639 
1641  int total_size = 0;
1642 
1643  // repeated bytes certificate = 1;
1644  total_size += 1 * this->certificate_size();
1645  for (int i = 0; i < this->certificate_size(); i++) {
1646  total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1647  this->certificate(i));
1648  }
1649 
1650  if (!unknown_fields().empty()) {
1651  total_size +=
1652  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1653  unknown_fields());
1654  }
1655  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1656  _cached_size_ = total_size;
1657  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1658  return total_size;
1659 }
1660 
1661 void X509Certificates::MergeFrom(const ::google::protobuf::Message& from) {
1662  GOOGLE_CHECK_NE(&from, this);
1663  const X509Certificates* source =
1664  ::google::protobuf::internal::dynamic_cast_if_available<const X509Certificates*>(
1665  &from);
1666  if (source == NULL) {
1667  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1668  } else {
1669  MergeFrom(*source);
1670  }
1671 }
1672 
1674  GOOGLE_CHECK_NE(&from, this);
1675  certificate_.MergeFrom(from.certificate_);
1676  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1677 }
1678 
1679 void X509Certificates::CopyFrom(const ::google::protobuf::Message& from) {
1680  if (&from == this) return;
1681  Clear();
1682  MergeFrom(from);
1683 }
1684 
1686  if (&from == this) return;
1687  Clear();
1688  MergeFrom(from);
1689 }
1690 
1692 
1693  return true;
1694 }
1695 
1697  if (other != this) {
1698  certificate_.Swap(&other->certificate_);
1699  std::swap(_has_bits_[0], other->_has_bits_[0]);
1700  _unknown_fields_.Swap(&other->_unknown_fields_);
1702  }
1703 }
1704 
1705 ::google::protobuf::Metadata X509Certificates::GetMetadata() const {
1706  protobuf_AssignDescriptorsOnce();
1707  ::google::protobuf::Metadata metadata;
1708  metadata.descriptor = X509Certificates_descriptor_;
1709  metadata.reflection = X509Certificates_reflection_;
1710  return metadata;
1711 }
1712 
1713 
1714 // ===================================================================
1715 
1716 #ifndef _MSC_VER
1720 const int Payment::kMemoFieldNumber;
1721 #endif // !_MSC_VER
1722 
1724  : ::google::protobuf::Message() {
1725  SharedCtor();
1726  // @@protoc_insertion_point(constructor:payments.Payment)
1727 }
1728 
1730 }
1731 
1733  : ::google::protobuf::Message() {
1734  SharedCtor();
1735  MergeFrom(from);
1736  // @@protoc_insertion_point(copy_constructor:payments.Payment)
1737 }
1738 
1740  ::google::protobuf::internal::GetEmptyString();
1741  _cached_size_ = 0;
1742  merchant_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1743  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1744  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1745 }
1746 
1748  // @@protoc_insertion_point(destructor:payments.Payment)
1749  SharedDtor();
1750 }
1751 
1753  if (merchant_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1754  delete merchant_data_;
1755  }
1756  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1757  delete memo_;
1758  }
1759  if (this != default_instance_) {
1760  }
1761 }
1762 
1763 void Payment::SetCachedSize(int size) const {
1764  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1765  _cached_size_ = size;
1766  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1767 }
1768 const ::google::protobuf::Descriptor* Payment::descriptor() {
1769  protobuf_AssignDescriptorsOnce();
1770  return Payment_descriptor_;
1771 }
1772 
1775  return *default_instance_;
1776 }
1777 
1779 
1781  return new Payment;
1782 }
1783 
1785  if (_has_bits_[0 / 32] & 9) {
1786  if (has_merchant_data()) {
1787  if (merchant_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1788  merchant_data_->clear();
1789  }
1790  }
1791  if (has_memo()) {
1792  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1793  memo_->clear();
1794  }
1795  }
1796  }
1797  transactions_.Clear();
1798  refund_to_.Clear();
1799  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1800  mutable_unknown_fields()->Clear();
1801 }
1802 
1804  ::google::protobuf::io::CodedInputStream* input) {
1805 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1806  ::google::protobuf::uint32 tag;
1807  // @@protoc_insertion_point(parse_start:payments.Payment)
1808  for (;;) {
1809  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1810  tag = p.first;
1811  if (!p.second) goto handle_unusual;
1812  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1813  // optional bytes merchant_data = 1;
1814  case 1: {
1815  if (tag == 10) {
1816  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1817  input, this->mutable_merchant_data()));
1818  } else {
1819  goto handle_unusual;
1820  }
1821  if (input->ExpectTag(18)) goto parse_transactions;
1822  break;
1823  }
1824 
1825  // repeated bytes transactions = 2;
1826  case 2: {
1827  if (tag == 18) {
1828  parse_transactions:
1829  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1830  input, this->add_transactions()));
1831  } else {
1832  goto handle_unusual;
1833  }
1834  if (input->ExpectTag(18)) goto parse_transactions;
1835  if (input->ExpectTag(26)) goto parse_refund_to;
1836  break;
1837  }
1838 
1839  // repeated .payments.Output refund_to = 3;
1840  case 3: {
1841  if (tag == 26) {
1842  parse_refund_to:
1843  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1844  input, add_refund_to()));
1845  } else {
1846  goto handle_unusual;
1847  }
1848  if (input->ExpectTag(26)) goto parse_refund_to;
1849  if (input->ExpectTag(34)) goto parse_memo;
1850  break;
1851  }
1852 
1853  // optional string memo = 4;
1854  case 4: {
1855  if (tag == 34) {
1856  parse_memo:
1857  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1858  input, this->mutable_memo()));
1859  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1860  this->memo().data(), this->memo().length(),
1861  ::google::protobuf::internal::WireFormat::PARSE,
1862  "memo");
1863  } else {
1864  goto handle_unusual;
1865  }
1866  if (input->ExpectAtEnd()) goto success;
1867  break;
1868  }
1869 
1870  default: {
1871  handle_unusual:
1872  if (tag == 0 ||
1873  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1874  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1875  goto success;
1876  }
1877  DO_(::google::protobuf::internal::WireFormat::SkipField(
1878  input, tag, mutable_unknown_fields()));
1879  break;
1880  }
1881  }
1882  }
1883 success:
1884  // @@protoc_insertion_point(parse_success:payments.Payment)
1885  return true;
1886 failure:
1887  // @@protoc_insertion_point(parse_failure:payments.Payment)
1888  return false;
1889 #undef DO_
1890 }
1891 
1893  ::google::protobuf::io::CodedOutputStream* output) const {
1894  // @@protoc_insertion_point(serialize_start:payments.Payment)
1895  // optional bytes merchant_data = 1;
1896  if (has_merchant_data()) {
1897  ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1898  1, this->merchant_data(), output);
1899  }
1900 
1901  // repeated bytes transactions = 2;
1902  for (int i = 0; i < this->transactions_size(); i++) {
1903  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1904  2, this->transactions(i), output);
1905  }
1906 
1907  // repeated .payments.Output refund_to = 3;
1908  for (int i = 0; i < this->refund_to_size(); i++) {
1909  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1910  3, this->refund_to(i), output);
1911  }
1912 
1913  // optional string memo = 4;
1914  if (has_memo()) {
1915  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1916  this->memo().data(), this->memo().length(),
1917  ::google::protobuf::internal::WireFormat::SERIALIZE,
1918  "memo");
1919  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1920  4, this->memo(), output);
1921  }
1922 
1923  if (!unknown_fields().empty()) {
1924  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1925  unknown_fields(), output);
1926  }
1927  // @@protoc_insertion_point(serialize_end:payments.Payment)
1928 }
1929 
1930 ::google::protobuf::uint8* Payment::SerializeWithCachedSizesToArray(
1931  ::google::protobuf::uint8* target) const {
1932  // @@protoc_insertion_point(serialize_to_array_start:payments.Payment)
1933  // optional bytes merchant_data = 1;
1934  if (has_merchant_data()) {
1935  target =
1936  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1937  1, this->merchant_data(), target);
1938  }
1939 
1940  // repeated bytes transactions = 2;
1941  for (int i = 0; i < this->transactions_size(); i++) {
1942  target = ::google::protobuf::internal::WireFormatLite::
1943  WriteBytesToArray(2, this->transactions(i), target);
1944  }
1945 
1946  // repeated .payments.Output refund_to = 3;
1947  for (int i = 0; i < this->refund_to_size(); i++) {
1948  target = ::google::protobuf::internal::WireFormatLite::
1949  WriteMessageNoVirtualToArray(
1950  3, this->refund_to(i), target);
1951  }
1952 
1953  // optional string memo = 4;
1954  if (has_memo()) {
1955  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1956  this->memo().data(), this->memo().length(),
1957  ::google::protobuf::internal::WireFormat::SERIALIZE,
1958  "memo");
1959  target =
1960  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1961  4, this->memo(), target);
1962  }
1963 
1964  if (!unknown_fields().empty()) {
1965  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1966  unknown_fields(), target);
1967  }
1968  // @@protoc_insertion_point(serialize_to_array_end:payments.Payment)
1969  return target;
1970 }
1971 
1972 int Payment::ByteSize() const {
1973  int total_size = 0;
1974 
1975  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1976  // optional bytes merchant_data = 1;
1977  if (has_merchant_data()) {
1978  total_size += 1 +
1979  ::google::protobuf::internal::WireFormatLite::BytesSize(
1980  this->merchant_data());
1981  }
1982 
1983  // optional string memo = 4;
1984  if (has_memo()) {
1985  total_size += 1 +
1986  ::google::protobuf::internal::WireFormatLite::StringSize(
1987  this->memo());
1988  }
1989 
1990  }
1991  // repeated bytes transactions = 2;
1992  total_size += 1 * this->transactions_size();
1993  for (int i = 0; i < this->transactions_size(); i++) {
1994  total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1995  this->transactions(i));
1996  }
1997 
1998  // repeated .payments.Output refund_to = 3;
1999  total_size += 1 * this->refund_to_size();
2000  for (int i = 0; i < this->refund_to_size(); i++) {
2001  total_size +=
2002  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2003  this->refund_to(i));
2004  }
2005 
2006  if (!unknown_fields().empty()) {
2007  total_size +=
2008  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2009  unknown_fields());
2010  }
2011  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2012  _cached_size_ = total_size;
2013  GOOGLE_SAFE_CONCURRENT_WRITES_END();
2014  return total_size;
2015 }
2016 
2017 void Payment::MergeFrom(const ::google::protobuf::Message& from) {
2018  GOOGLE_CHECK_NE(&from, this);
2019  const Payment* source =
2020  ::google::protobuf::internal::dynamic_cast_if_available<const Payment*>(
2021  &from);
2022  if (source == NULL) {
2023  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2024  } else {
2025  MergeFrom(*source);
2026  }
2027 }
2028 
2029 void Payment::MergeFrom(const Payment& from) {
2030  GOOGLE_CHECK_NE(&from, this);
2031  transactions_.MergeFrom(from.transactions_);
2032  refund_to_.MergeFrom(from.refund_to_);
2033  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2034  if (from.has_merchant_data()) {
2036  }
2037  if (from.has_memo()) {
2038  set_memo(from.memo());
2039  }
2040  }
2041  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2042 }
2043 
2044 void Payment::CopyFrom(const ::google::protobuf::Message& from) {
2045  if (&from == this) return;
2046  Clear();
2047  MergeFrom(from);
2048 }
2049 
2050 void Payment::CopyFrom(const Payment& from) {
2051  if (&from == this) return;
2052  Clear();
2053  MergeFrom(from);
2054 }
2055 
2057 
2058  if (!::google::protobuf::internal::AllAreInitialized(this->refund_to())) return false;
2059  return true;
2060 }
2061 
2062 void Payment::Swap(Payment* other) {
2063  if (other != this) {
2065  transactions_.Swap(&other->transactions_);
2066  refund_to_.Swap(&other->refund_to_);
2067  std::swap(memo_, other->memo_);
2068  std::swap(_has_bits_[0], other->_has_bits_[0]);
2069  _unknown_fields_.Swap(&other->_unknown_fields_);
2071  }
2072 }
2073 
2074 ::google::protobuf::Metadata Payment::GetMetadata() const {
2075  protobuf_AssignDescriptorsOnce();
2076  ::google::protobuf::Metadata metadata;
2077  metadata.descriptor = Payment_descriptor_;
2078  metadata.reflection = Payment_reflection_;
2079  return metadata;
2080 }
2081 
2082 
2083 // ===================================================================
2084 
2085 #ifndef _MSC_VER
2088 #endif // !_MSC_VER
2089 
2091  : ::google::protobuf::Message() {
2092  SharedCtor();
2093  // @@protoc_insertion_point(constructor:payments.PaymentACK)
2094 }
2095 
2098 }
2099 
2101  : ::google::protobuf::Message() {
2102  SharedCtor();
2103  MergeFrom(from);
2104  // @@protoc_insertion_point(copy_constructor:payments.PaymentACK)
2105 }
2106 
2108  ::google::protobuf::internal::GetEmptyString();
2109  _cached_size_ = 0;
2110  payment_ = NULL;
2111  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2112  ::memset(_has_bits_, 0, sizeof(_has_bits_));
2113 }
2114 
2116  // @@protoc_insertion_point(destructor:payments.PaymentACK)
2117  SharedDtor();
2118 }
2119 
2121  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
2122  delete memo_;
2123  }
2124  if (this != default_instance_) {
2125  delete payment_;
2126  }
2127 }
2128 
2130  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2131  _cached_size_ = size;
2132  GOOGLE_SAFE_CONCURRENT_WRITES_END();
2133 }
2134 const ::google::protobuf::Descriptor* PaymentACK::descriptor() {
2135  protobuf_AssignDescriptorsOnce();
2136  return PaymentACK_descriptor_;
2137 }
2138 
2141  return *default_instance_;
2142 }
2143 
2145 
2147  return new PaymentACK;
2148 }
2149 
2151  if (_has_bits_[0 / 32] & 3) {
2152  if (has_payment()) {
2153  if (payment_ != NULL) payment_->::payments::Payment::Clear();
2154  }
2155  if (has_memo()) {
2156  if (memo_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
2157  memo_->clear();
2158  }
2159  }
2160  }
2161  ::memset(_has_bits_, 0, sizeof(_has_bits_));
2162  mutable_unknown_fields()->Clear();
2163 }
2164 
2166  ::google::protobuf::io::CodedInputStream* input) {
2167 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2168  ::google::protobuf::uint32 tag;
2169  // @@protoc_insertion_point(parse_start:payments.PaymentACK)
2170  for (;;) {
2171  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2172  tag = p.first;
2173  if (!p.second) goto handle_unusual;
2174  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2175  // required .payments.Payment payment = 1;
2176  case 1: {
2177  if (tag == 10) {
2178  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2179  input, mutable_payment()));
2180  } else {
2181  goto handle_unusual;
2182  }
2183  if (input->ExpectTag(18)) goto parse_memo;
2184  break;
2185  }
2186 
2187  // optional string memo = 2;
2188  case 2: {
2189  if (tag == 18) {
2190  parse_memo:
2191  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2192  input, this->mutable_memo()));
2193  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2194  this->memo().data(), this->memo().length(),
2195  ::google::protobuf::internal::WireFormat::PARSE,
2196  "memo");
2197  } else {
2198  goto handle_unusual;
2199  }
2200  if (input->ExpectAtEnd()) goto success;
2201  break;
2202  }
2203 
2204  default: {
2205  handle_unusual:
2206  if (tag == 0 ||
2207  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2208  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2209  goto success;
2210  }
2211  DO_(::google::protobuf::internal::WireFormat::SkipField(
2212  input, tag, mutable_unknown_fields()));
2213  break;
2214  }
2215  }
2216  }
2217 success:
2218  // @@protoc_insertion_point(parse_success:payments.PaymentACK)
2219  return true;
2220 failure:
2221  // @@protoc_insertion_point(parse_failure:payments.PaymentACK)
2222  return false;
2223 #undef DO_
2224 }
2225 
2227  ::google::protobuf::io::CodedOutputStream* output) const {
2228  // @@protoc_insertion_point(serialize_start:payments.PaymentACK)
2229  // required .payments.Payment payment = 1;
2230  if (has_payment()) {
2231  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2232  1, this->payment(), output);
2233  }
2234 
2235  // optional string memo = 2;
2236  if (has_memo()) {
2237  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2238  this->memo().data(), this->memo().length(),
2239  ::google::protobuf::internal::WireFormat::SERIALIZE,
2240  "memo");
2241  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2242  2, this->memo(), output);
2243  }
2244 
2245  if (!unknown_fields().empty()) {
2246  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2247  unknown_fields(), output);
2248  }
2249  // @@protoc_insertion_point(serialize_end:payments.PaymentACK)
2250 }
2251 
2253  ::google::protobuf::uint8* target) const {
2254  // @@protoc_insertion_point(serialize_to_array_start:payments.PaymentACK)
2255  // required .payments.Payment payment = 1;
2256  if (has_payment()) {
2257  target = ::google::protobuf::internal::WireFormatLite::
2258  WriteMessageNoVirtualToArray(
2259  1, this->payment(), target);
2260  }
2261 
2262  // optional string memo = 2;
2263  if (has_memo()) {
2264  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2265  this->memo().data(), this->memo().length(),
2266  ::google::protobuf::internal::WireFormat::SERIALIZE,
2267  "memo");
2268  target =
2269  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2270  2, this->memo(), target);
2271  }
2272 
2273  if (!unknown_fields().empty()) {
2274  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2275  unknown_fields(), target);
2276  }
2277  // @@protoc_insertion_point(serialize_to_array_end:payments.PaymentACK)
2278  return target;
2279 }
2280 
2282  int total_size = 0;
2283 
2284  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2285  // required .payments.Payment payment = 1;
2286  if (has_payment()) {
2287  total_size += 1 +
2288  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2289  this->payment());
2290  }
2291 
2292  // optional string memo = 2;
2293  if (has_memo()) {
2294  total_size += 1 +
2295  ::google::protobuf::internal::WireFormatLite::StringSize(
2296  this->memo());
2297  }
2298 
2299  }
2300  if (!unknown_fields().empty()) {
2301  total_size +=
2302  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2303  unknown_fields());
2304  }
2305  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2306  _cached_size_ = total_size;
2307  GOOGLE_SAFE_CONCURRENT_WRITES_END();
2308  return total_size;
2309 }
2310 
2311 void PaymentACK::MergeFrom(const ::google::protobuf::Message& from) {
2312  GOOGLE_CHECK_NE(&from, this);
2313  const PaymentACK* source =
2314  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentACK*>(
2315  &from);
2316  if (source == NULL) {
2317  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2318  } else {
2319  MergeFrom(*source);
2320  }
2321 }
2322 
2324  GOOGLE_CHECK_NE(&from, this);
2325  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2326  if (from.has_payment()) {
2327  mutable_payment()->::payments::Payment::MergeFrom(from.payment());
2328  }
2329  if (from.has_memo()) {
2330  set_memo(from.memo());
2331  }
2332  }
2333  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2334 }
2335 
2336 void PaymentACK::CopyFrom(const ::google::protobuf::Message& from) {
2337  if (&from == this) return;
2338  Clear();
2339  MergeFrom(from);
2340 }
2341 
2343  if (&from == this) return;
2344  Clear();
2345  MergeFrom(from);
2346 }
2347 
2349  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
2350 
2351  if (has_payment()) {
2352  if (!this->payment().IsInitialized()) return false;
2353  }
2354  return true;
2355 }
2356 
2358  if (other != this) {
2359  std::swap(payment_, other->payment_);
2360  std::swap(memo_, other->memo_);
2361  std::swap(_has_bits_[0], other->_has_bits_[0]);
2362  _unknown_fields_.Swap(&other->_unknown_fields_);
2364  }
2365 }
2366 
2367 ::google::protobuf::Metadata PaymentACK::GetMetadata() const {
2368  protobuf_AssignDescriptorsOnce();
2369  ::google::protobuf::Metadata metadata;
2370  metadata.descriptor = PaymentACK_descriptor_;
2371  metadata.reflection = PaymentACK_reflection_;
2372  return metadata;
2373 }
2374 
2375 
2376 // @@protoc_insertion_point(namespace_scope)
2377 
2378 } // namespace payments
2379 
2380 // @@protoc_insertion_point(global_scope)
::google::protobuf::uint32 _has_bits_[1]
friend void protobuf_AddDesc_paymentrequest_2eproto()
::std::string * merchant_data_
friend void protobuf_AddDesc_paymentrequest_2eproto()
void protobuf_AddDesc_paymentrequest_2eproto()
::google::protobuf::uint64 expires_
const ::google::protobuf::RepeatedPtrField< ::std::string > & certificate() const
static const int kPkiDataFieldNumber
static const Output & default_instance()
::google::protobuf::Metadata GetMetadata() const
static PaymentACK * default_instance_
::google::protobuf::RepeatedPtrField< ::payments::Output > refund_to_
bool has_amount() const
static Output * default_instance_
static const int kPaymentDetailsVersionFieldNumber
inline::google::protobuf::uint32 payment_details_version() const
static X509Certificates * default_instance_
void set_payment_url(const ::std::string &value)
inline::std::string * mutable_payment_url()
PaymentACK * New() const
static const int kPkiTypeFieldNumber
void set_script(const ::std::string &value)
void swap(dev::eth::Watch &_a, dev::eth::Watch &_b)
Definition: Interface.h:284
void set_memo(const ::std::string &value)
static const PaymentACK & default_instance()
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
void set_pki_data(const ::std::string &value)
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
void MergeFrom(const ::google::protobuf::Message &from)
static const int kNetworkFieldNumber
::google::protobuf::Metadata GetMetadata() const
void CopyFrom(const ::google::protobuf::Message &from)
void CopyFrom(const ::google::protobuf::Message &from)
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
void Swap(PaymentRequest *other)
::std::string * _default_network_
static const ::google::protobuf::Descriptor * descriptor()
friend void protobuf_AddDesc_paymentrequest_2eproto()
static const PaymentRequest & default_instance()
static const int kAmountFieldNumber
const ::std::string & pki_data() const
void Swap(PaymentDetails *other)
void set_merchant_data(const ::std::string &value)
inline::google::protobuf::uint64 expires() const
static PaymentRequest * default_instance_
inline::std::string * mutable_merchant_data()
::google::protobuf::Metadata GetMetadata() const
static const ::google::protobuf::Descriptor * descriptor()
static const int kTimeFieldNumber
const ::std::string & memo() const
::google::protobuf::uint32 _has_bits_[1]
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
static const int kRefundToFieldNumber
const ::std::string & signature() const
inline::std::string * mutable_script()
static const ::google::protobuf::Descriptor * descriptor()
inline::std::string * mutable_memo()
::google::protobuf::Metadata GetMetadata() const
static const int kScriptFieldNumber
inline::std::string * mutable_signature()
::std::string * serialized_payment_details_
::google::protobuf::UnknownFieldSet _unknown_fields_
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
static const int kPaymentUrlFieldNumber
inline::std::string * add_transactions()
::google::protobuf::uint32 _has_bits_[1]
void set_network(const ::std::string &value)
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
::google::protobuf::uint32 _has_bits_[1]
const ::std::string & script() const
static const ::google::protobuf::Descriptor * descriptor()
static const int kOutputsFieldNumber
PaymentDetails * New() const
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
const ::std::string & payment_url() const
bool IsInitialized() const
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
static PaymentDetails * default_instance_
Output * New() const
inline::std::string * mutable_network()
friend void protobuf_AddDesc_paymentrequest_2eproto()
static Payment * default_instance_
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
static const int kCertificateFieldNumber
static const int kExpiresFieldNumber
X509Certificates * New() const
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
void protobuf_AssignDesc_paymentrequest_2eproto()
::google::protobuf::UnknownFieldSet _unknown_fields_
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
const char * source
Definition: rpcconsole.cpp:60
void Swap(PaymentACK *other)
void protobuf_ShutdownFile_paymentrequest_2eproto()
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
const ::google::protobuf::RepeatedPtrField< ::payments::Output > & refund_to() const
const ::std::string & memo() const
inline::std::string * add_certificate()
void MergeFrom(const ::google::protobuf::Message &from)
inline::payments::Output * add_outputs()
::google::protobuf::UnknownFieldSet _unknown_fields_
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
friend void protobuf_AddDesc_paymentrequest_2eproto()
inline::std::string * mutable_serialized_payment_details()
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
void MergeFrom(const ::google::protobuf::Message &from)
void SetCachedSize(int size) const
int transactions_size() const
void SetCachedSize(int size) const
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
static const int kTransactionsFieldNumber
static const PaymentDetails & default_instance()
const ::std::string & network() const
::google::protobuf::UnknownFieldSet _unknown_fields_
void set_expires(::google::protobuf::uint64 value)
const ::google::protobuf::RepeatedPtrField< ::std::string > & transactions() const
const ::google::protobuf::RepeatedPtrField< ::payments::Output > & outputs() const
void CopyFrom(const ::google::protobuf::Message &from)
::google::protobuf::uint32 payment_details_version_
::std::string * script_
::google::protobuf::uint32 _has_bits_[1]
void MergeFrom(const ::google::protobuf::Message &from)
inline::std::string * mutable_memo()
struct payments::StaticDescriptorInitializer_paymentrequest_2eproto static_descriptor_initializer_paymentrequest_2eproto_
void MergeFrom(const ::google::protobuf::Message &from)
inline::std::string * mutable_merchant_data()
inline::google::protobuf::uint64 amount() const
static const X509Certificates & default_instance()
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
void SetCachedSize(int size) const
void MergeFrom(const ::google::protobuf::Message &from)
void CopyFrom(const ::google::protobuf::Message &from)
bool has_merchant_data() const
::std::string * _default_pki_type_
void Swap(Output *other)
void Swap(X509Certificates *other)
static const int kMemoFieldNumber
::std::string * merchant_data_
::std::string * memo_
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
inline::std::string * mutable_memo()
const ::std::string & merchant_data() const
void set_memo(const ::std::string &value)
void set_signature(const ::std::string &value)
::google::protobuf::uint64 time_
::google::protobuf::Metadata GetMetadata() const
#define ZR_(first, last)
::google::protobuf::uint32 _has_bits_[1]
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
::google::protobuf::uint64 amount_
uint8_t const size_t const size
Definition: sha3.h:20
void set_pki_type(const ::std::string &value)
void CopyFrom(const ::google::protobuf::Message &from)
bool has_payment_details_version() const
void CopyFrom(const ::google::protobuf::Message &from)
Payment * New() const
const ::payments::Payment & payment() const
const ::std::string & serialized_payment_details() const
void set_merchant_data(const ::std::string &value)
void set_serialized_payment_details(const ::std::string &value)
::payments::Payment * payment_
static const ::google::protobuf::Descriptor * descriptor()
inline::std::string * mutable_pki_data()
static const Payment & default_instance()
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
static const int kMemoFieldNumber
void Swap(Payment *other)
inline::payments::Output * add_refund_to()
static const ::google::protobuf::Descriptor * descriptor()
const ::std::string & memo() const
inline::payments::Payment * mutable_payment()
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
inline::std::string * mutable_pki_type()
::google::protobuf::RepeatedPtrField< ::std::string > certificate_
void set_time(::google::protobuf::uint64 value)
bool has_script() const
void SetCachedSize(int size) const
void SetCachedSize(int size) const
::google::protobuf::UnknownFieldSet _unknown_fields_
static const int kPaymentFieldNumber
static const int kSerializedPaymentDetailsFieldNumber
int refund_to_size() const
const ::google::protobuf::UnknownFieldSet & unknown_fields() const
const ::std::string & merchant_data() const
void set_amount(::google::protobuf::uint64 value)
void SetCachedSize(int size) const
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
::google::protobuf::RepeatedPtrField< ::payments::Output > outputs_
static const int kMerchantDataFieldNumber
uint8_t const * data
Definition: sha3.h:19
bool IsInitialized() const
void set_memo(const ::std::string &value)
PaymentRequest * New() const
static const int kMerchantDataFieldNumber
friend void protobuf_AddDesc_paymentrequest_2eproto()
bool has_serialized_payment_details() const
static const int kMemoFieldNumber
static const int kSignatureFieldNumber
inline::google::protobuf::uint64 time() const
inline::google::protobuf::UnknownFieldSet * mutable_unknown_fields()
::google::protobuf::RepeatedPtrField< ::std::string > transactions_
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
::google::protobuf::UnknownFieldSet _unknown_fields_
bool has_memo() const
::google::protobuf::Metadata GetMetadata() const
const ::std::string & pki_type() const
#define DO_(EXPRESSION)
void set_payment_details_version(::google::protobuf::uint32 value)