Anoncoin  0.9.4
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\037org.anoncoin.protocols.paymen"
224  "tsB\006Protos", 650);
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 }
264 
266 }
267 
268 Output::Output(const Output& from)
269  : ::google::protobuf::Message() {
270  SharedCtor();
271  MergeFrom(from);
272 }
273 
275  _cached_size_ = 0;
276  amount_ = GOOGLE_ULONGLONG(0);
277  script_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
278  ::memset(_has_bits_, 0, sizeof(_has_bits_));
279 }
280 
282  SharedDtor();
283 }
284 
286  if (script_ != &::google::protobuf::internal::kEmptyString) {
287  delete script_;
288  }
289  if (this != default_instance_) {
290  }
291 }
292 
293 void Output::SetCachedSize(int size) const {
294  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
295  _cached_size_ = size;
296  GOOGLE_SAFE_CONCURRENT_WRITES_END();
297 }
298 const ::google::protobuf::Descriptor* Output::descriptor() {
299  protobuf_AssignDescriptorsOnce();
300  return Output_descriptor_;
301 }
302 
305  return *default_instance_;
306 }
307 
309 
310 Output* Output::New() const {
311  return new Output;
312 }
313 
315  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
316  amount_ = GOOGLE_ULONGLONG(0);
317  if (has_script()) {
318  if (script_ != &::google::protobuf::internal::kEmptyString) {
319  script_->clear();
320  }
321  }
322  }
323  ::memset(_has_bits_, 0, sizeof(_has_bits_));
324  mutable_unknown_fields()->Clear();
325 }
326 
328  ::google::protobuf::io::CodedInputStream* input) {
329 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
330  ::google::protobuf::uint32 tag;
331  while ((tag = input->ReadTag()) != 0) {
332  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
333  // optional uint64 amount = 1 [default = 0];
334  case 1: {
335  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
336  ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
337  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
338  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
339  input, &amount_)));
340  set_has_amount();
341  } else {
342  goto handle_uninterpreted;
343  }
344  if (input->ExpectTag(18)) goto parse_script;
345  break;
346  }
347 
348  // required bytes script = 2;
349  case 2: {
350  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
351  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
352  parse_script:
353  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
354  input, this->mutable_script()));
355  } else {
356  goto handle_uninterpreted;
357  }
358  if (input->ExpectAtEnd()) return true;
359  break;
360  }
361 
362  default: {
363  handle_uninterpreted:
364  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
365  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
366  return true;
367  }
368  DO_(::google::protobuf::internal::WireFormat::SkipField(
369  input, tag, mutable_unknown_fields()));
370  break;
371  }
372  }
373  }
374  return true;
375 #undef DO_
376 }
377 
379  ::google::protobuf::io::CodedOutputStream* output) const {
380  // optional uint64 amount = 1 [default = 0];
381  if (has_amount()) {
382  ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->amount(), output);
383  }
384 
385  // required bytes script = 2;
386  if (has_script()) {
387  ::google::protobuf::internal::WireFormatLite::WriteBytes(
388  2, this->script(), output);
389  }
390 
391  if (!unknown_fields().empty()) {
392  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
393  unknown_fields(), output);
394  }
395 }
396 
397 ::google::protobuf::uint8* Output::SerializeWithCachedSizesToArray(
398  ::google::protobuf::uint8* target) const {
399  // optional uint64 amount = 1 [default = 0];
400  if (has_amount()) {
401  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->amount(), target);
402  }
403 
404  // required bytes script = 2;
405  if (has_script()) {
406  target =
407  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
408  2, this->script(), target);
409  }
410 
411  if (!unknown_fields().empty()) {
412  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
413  unknown_fields(), target);
414  }
415  return target;
416 }
417 
418 int Output::ByteSize() const {
419  int total_size = 0;
420 
421  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
422  // optional uint64 amount = 1 [default = 0];
423  if (has_amount()) {
424  total_size += 1 +
425  ::google::protobuf::internal::WireFormatLite::UInt64Size(
426  this->amount());
427  }
428 
429  // required bytes script = 2;
430  if (has_script()) {
431  total_size += 1 +
432  ::google::protobuf::internal::WireFormatLite::BytesSize(
433  this->script());
434  }
435 
436  }
437  if (!unknown_fields().empty()) {
438  total_size +=
439  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
440  unknown_fields());
441  }
442  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
443  _cached_size_ = total_size;
444  GOOGLE_SAFE_CONCURRENT_WRITES_END();
445  return total_size;
446 }
447 
448 void Output::MergeFrom(const ::google::protobuf::Message& from) {
449  GOOGLE_CHECK_NE(&from, this);
450  const Output* source =
451  ::google::protobuf::internal::dynamic_cast_if_available<const Output*>(
452  &from);
453  if (source == NULL) {
454  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
455  } else {
456  MergeFrom(*source);
457  }
458 }
459 
460 void Output::MergeFrom(const Output& from) {
461  GOOGLE_CHECK_NE(&from, this);
462  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
463  if (from.has_amount()) {
464  set_amount(from.amount());
465  }
466  if (from.has_script()) {
467  set_script(from.script());
468  }
469  }
470  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
471 }
472 
473 void Output::CopyFrom(const ::google::protobuf::Message& from) {
474  if (&from == this) return;
475  Clear();
476  MergeFrom(from);
477 }
478 
479 void Output::CopyFrom(const Output& from) {
480  if (&from == this) return;
481  Clear();
482  MergeFrom(from);
483 }
484 
485 bool Output::IsInitialized() const {
486  if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
487 
488  return true;
489 }
490 
491 void Output::Swap(Output* other) {
492  if (other != this) {
493  std::swap(amount_, other->amount_);
494  std::swap(script_, other->script_);
495  std::swap(_has_bits_[0], other->_has_bits_[0]);
496  _unknown_fields_.Swap(&other->_unknown_fields_);
497  std::swap(_cached_size_, other->_cached_size_);
498  }
499 }
500 
501 ::google::protobuf::Metadata Output::GetMetadata() const {
502  protobuf_AssignDescriptorsOnce();
503  ::google::protobuf::Metadata metadata;
504  metadata.descriptor = Output_descriptor_;
505  metadata.reflection = Output_reflection_;
506  return metadata;
507 }
508 
509 
510 // ===================================================================
511 
512 ::std::string* PaymentDetails::_default_network_ = NULL;
513 #ifndef _MSC_VER
521 #endif // !_MSC_VER
522 
524  : ::google::protobuf::Message() {
525  SharedCtor();
526 }
527 
529 }
530 
532  : ::google::protobuf::Message() {
533  SharedCtor();
534  MergeFrom(from);
535 }
536 
538  _cached_size_ = 0;
539  network_ = const_cast< ::std::string*>(_default_network_);
540  time_ = GOOGLE_ULONGLONG(0);
541  expires_ = GOOGLE_ULONGLONG(0);
542  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
543  payment_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
544  merchant_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
545  ::memset(_has_bits_, 0, sizeof(_has_bits_));
546 }
547 
549  SharedDtor();
550 }
551 
553  if (network_ != _default_network_) {
554  delete network_;
555  }
556  if (memo_ != &::google::protobuf::internal::kEmptyString) {
557  delete memo_;
558  }
559  if (payment_url_ != &::google::protobuf::internal::kEmptyString) {
560  delete payment_url_;
561  }
562  if (merchant_data_ != &::google::protobuf::internal::kEmptyString) {
563  delete merchant_data_;
564  }
565  if (this != default_instance_) {
566  }
567 }
568 
569 void PaymentDetails::SetCachedSize(int size) const {
570  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
571  _cached_size_ = size;
572  GOOGLE_SAFE_CONCURRENT_WRITES_END();
573 }
574 const ::google::protobuf::Descriptor* PaymentDetails::descriptor() {
575  protobuf_AssignDescriptorsOnce();
576  return PaymentDetails_descriptor_;
577 }
578 
581  return *default_instance_;
582 }
583 
585 
587  return new PaymentDetails;
588 }
589 
591  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
592  if (has_network()) {
593  if (network_ != _default_network_) {
594  network_->assign(*_default_network_);
595  }
596  }
597  time_ = GOOGLE_ULONGLONG(0);
598  expires_ = GOOGLE_ULONGLONG(0);
599  if (has_memo()) {
600  if (memo_ != &::google::protobuf::internal::kEmptyString) {
601  memo_->clear();
602  }
603  }
604  if (has_payment_url()) {
605  if (payment_url_ != &::google::protobuf::internal::kEmptyString) {
606  payment_url_->clear();
607  }
608  }
609  if (has_merchant_data()) {
610  if (merchant_data_ != &::google::protobuf::internal::kEmptyString) {
611  merchant_data_->clear();
612  }
613  }
614  }
615  outputs_.Clear();
616  ::memset(_has_bits_, 0, sizeof(_has_bits_));
617  mutable_unknown_fields()->Clear();
618 }
619 
621  ::google::protobuf::io::CodedInputStream* input) {
622 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
623  ::google::protobuf::uint32 tag;
624  while ((tag = input->ReadTag()) != 0) {
625  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
626  // optional string network = 1 [default = "main"];
627  case 1: {
628  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
629  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
630  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
631  input, this->mutable_network()));
632  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
633  this->network().data(), this->network().length(),
634  ::google::protobuf::internal::WireFormat::PARSE);
635  } else {
636  goto handle_uninterpreted;
637  }
638  if (input->ExpectTag(18)) goto parse_outputs;
639  break;
640  }
641 
642  // repeated .payments.Output outputs = 2;
643  case 2: {
644  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
645  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
646  parse_outputs:
647  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
648  input, add_outputs()));
649  } else {
650  goto handle_uninterpreted;
651  }
652  if (input->ExpectTag(18)) goto parse_outputs;
653  if (input->ExpectTag(24)) goto parse_time;
654  break;
655  }
656 
657  // required uint64 time = 3;
658  case 3: {
659  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
660  ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
661  parse_time:
662  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
663  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
664  input, &time_)));
665  set_has_time();
666  } else {
667  goto handle_uninterpreted;
668  }
669  if (input->ExpectTag(32)) goto parse_expires;
670  break;
671  }
672 
673  // optional uint64 expires = 4;
674  case 4: {
675  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
676  ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
677  parse_expires:
678  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
679  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
680  input, &expires_)));
681  set_has_expires();
682  } else {
683  goto handle_uninterpreted;
684  }
685  if (input->ExpectTag(42)) goto parse_memo;
686  break;
687  }
688 
689  // optional string memo = 5;
690  case 5: {
691  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
692  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
693  parse_memo:
694  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
695  input, this->mutable_memo()));
696  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
697  this->memo().data(), this->memo().length(),
698  ::google::protobuf::internal::WireFormat::PARSE);
699  } else {
700  goto handle_uninterpreted;
701  }
702  if (input->ExpectTag(50)) goto parse_payment_url;
703  break;
704  }
705 
706  // optional string payment_url = 6;
707  case 6: {
708  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
709  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
710  parse_payment_url:
711  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
712  input, this->mutable_payment_url()));
713  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
714  this->payment_url().data(), this->payment_url().length(),
715  ::google::protobuf::internal::WireFormat::PARSE);
716  } else {
717  goto handle_uninterpreted;
718  }
719  if (input->ExpectTag(58)) goto parse_merchant_data;
720  break;
721  }
722 
723  // optional bytes merchant_data = 7;
724  case 7: {
725  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
726  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
727  parse_merchant_data:
728  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
729  input, this->mutable_merchant_data()));
730  } else {
731  goto handle_uninterpreted;
732  }
733  if (input->ExpectAtEnd()) return true;
734  break;
735  }
736 
737  default: {
738  handle_uninterpreted:
739  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
740  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
741  return true;
742  }
743  DO_(::google::protobuf::internal::WireFormat::SkipField(
744  input, tag, mutable_unknown_fields()));
745  break;
746  }
747  }
748  }
749  return true;
750 #undef DO_
751 }
752 
754  ::google::protobuf::io::CodedOutputStream* output) const {
755  // optional string network = 1 [default = "main"];
756  if (has_network()) {
757  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
758  this->network().data(), this->network().length(),
759  ::google::protobuf::internal::WireFormat::SERIALIZE);
760  ::google::protobuf::internal::WireFormatLite::WriteString(
761  1, this->network(), output);
762  }
763 
764  // repeated .payments.Output outputs = 2;
765  for (int i = 0; i < this->outputs_size(); i++) {
766  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
767  2, this->outputs(i), output);
768  }
769 
770  // required uint64 time = 3;
771  if (has_time()) {
772  ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->time(), output);
773  }
774 
775  // optional uint64 expires = 4;
776  if (has_expires()) {
777  ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->expires(), output);
778  }
779 
780  // optional string memo = 5;
781  if (has_memo()) {
782  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
783  this->memo().data(), this->memo().length(),
784  ::google::protobuf::internal::WireFormat::SERIALIZE);
785  ::google::protobuf::internal::WireFormatLite::WriteString(
786  5, this->memo(), output);
787  }
788 
789  // optional string payment_url = 6;
790  if (has_payment_url()) {
791  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
792  this->payment_url().data(), this->payment_url().length(),
793  ::google::protobuf::internal::WireFormat::SERIALIZE);
794  ::google::protobuf::internal::WireFormatLite::WriteString(
795  6, this->payment_url(), output);
796  }
797 
798  // optional bytes merchant_data = 7;
799  if (has_merchant_data()) {
800  ::google::protobuf::internal::WireFormatLite::WriteBytes(
801  7, this->merchant_data(), output);
802  }
803 
804  if (!unknown_fields().empty()) {
805  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
806  unknown_fields(), output);
807  }
808 }
809 
811  ::google::protobuf::uint8* target) const {
812  // optional string network = 1 [default = "main"];
813  if (has_network()) {
814  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
815  this->network().data(), this->network().length(),
816  ::google::protobuf::internal::WireFormat::SERIALIZE);
817  target =
818  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
819  1, this->network(), target);
820  }
821 
822  // repeated .payments.Output outputs = 2;
823  for (int i = 0; i < this->outputs_size(); i++) {
824  target = ::google::protobuf::internal::WireFormatLite::
825  WriteMessageNoVirtualToArray(
826  2, this->outputs(i), target);
827  }
828 
829  // required uint64 time = 3;
830  if (has_time()) {
831  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->time(), target);
832  }
833 
834  // optional uint64 expires = 4;
835  if (has_expires()) {
836  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->expires(), target);
837  }
838 
839  // optional string memo = 5;
840  if (has_memo()) {
841  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
842  this->memo().data(), this->memo().length(),
843  ::google::protobuf::internal::WireFormat::SERIALIZE);
844  target =
845  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
846  5, this->memo(), target);
847  }
848 
849  // optional string payment_url = 6;
850  if (has_payment_url()) {
851  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
852  this->payment_url().data(), this->payment_url().length(),
853  ::google::protobuf::internal::WireFormat::SERIALIZE);
854  target =
855  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
856  6, this->payment_url(), target);
857  }
858 
859  // optional bytes merchant_data = 7;
860  if (has_merchant_data()) {
861  target =
862  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
863  7, this->merchant_data(), target);
864  }
865 
866  if (!unknown_fields().empty()) {
867  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
868  unknown_fields(), target);
869  }
870  return target;
871 }
872 
874  int total_size = 0;
875 
876  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
877  // optional string network = 1 [default = "main"];
878  if (has_network()) {
879  total_size += 1 +
880  ::google::protobuf::internal::WireFormatLite::StringSize(
881  this->network());
882  }
883 
884  // required uint64 time = 3;
885  if (has_time()) {
886  total_size += 1 +
887  ::google::protobuf::internal::WireFormatLite::UInt64Size(
888  this->time());
889  }
890 
891  // optional uint64 expires = 4;
892  if (has_expires()) {
893  total_size += 1 +
894  ::google::protobuf::internal::WireFormatLite::UInt64Size(
895  this->expires());
896  }
897 
898  // optional string memo = 5;
899  if (has_memo()) {
900  total_size += 1 +
901  ::google::protobuf::internal::WireFormatLite::StringSize(
902  this->memo());
903  }
904 
905  // optional string payment_url = 6;
906  if (has_payment_url()) {
907  total_size += 1 +
908  ::google::protobuf::internal::WireFormatLite::StringSize(
909  this->payment_url());
910  }
911 
912  // optional bytes merchant_data = 7;
913  if (has_merchant_data()) {
914  total_size += 1 +
915  ::google::protobuf::internal::WireFormatLite::BytesSize(
916  this->merchant_data());
917  }
918 
919  }
920  // repeated .payments.Output outputs = 2;
921  total_size += 1 * this->outputs_size();
922  for (int i = 0; i < this->outputs_size(); i++) {
923  total_size +=
924  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
925  this->outputs(i));
926  }
927 
928  if (!unknown_fields().empty()) {
929  total_size +=
930  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
931  unknown_fields());
932  }
933  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
934  _cached_size_ = total_size;
935  GOOGLE_SAFE_CONCURRENT_WRITES_END();
936  return total_size;
937 }
938 
939 void PaymentDetails::MergeFrom(const ::google::protobuf::Message& from) {
940  GOOGLE_CHECK_NE(&from, this);
941  const PaymentDetails* source =
942  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentDetails*>(
943  &from);
944  if (source == NULL) {
945  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
946  } else {
947  MergeFrom(*source);
948  }
949 }
950 
952  GOOGLE_CHECK_NE(&from, this);
953  outputs_.MergeFrom(from.outputs_);
954  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
955  if (from.has_network()) {
956  set_network(from.network());
957  }
958  if (from.has_time()) {
959  set_time(from.time());
960  }
961  if (from.has_expires()) {
962  set_expires(from.expires());
963  }
964  if (from.has_memo()) {
965  set_memo(from.memo());
966  }
967  if (from.has_payment_url()) {
969  }
970  if (from.has_merchant_data()) {
972  }
973  }
974  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
975 }
976 
977 void PaymentDetails::CopyFrom(const ::google::protobuf::Message& from) {
978  if (&from == this) return;
979  Clear();
980  MergeFrom(from);
981 }
982 
984  if (&from == this) return;
985  Clear();
986  MergeFrom(from);
987 }
988 
990  if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
991 
992  for (int i = 0; i < outputs_size(); i++) {
993  if (!this->outputs(i).IsInitialized()) return false;
994  }
995  return true;
996 }
997 
999  if (other != this) {
1000  std::swap(network_, other->network_);
1001  outputs_.Swap(&other->outputs_);
1002  std::swap(time_, other->time_);
1003  std::swap(expires_, other->expires_);
1004  std::swap(memo_, other->memo_);
1005  std::swap(payment_url_, other->payment_url_);
1006  std::swap(merchant_data_, other->merchant_data_);
1007  std::swap(_has_bits_[0], other->_has_bits_[0]);
1008  _unknown_fields_.Swap(&other->_unknown_fields_);
1009  std::swap(_cached_size_, other->_cached_size_);
1010  }
1011 }
1012 
1013 ::google::protobuf::Metadata PaymentDetails::GetMetadata() const {
1014  protobuf_AssignDescriptorsOnce();
1015  ::google::protobuf::Metadata metadata;
1016  metadata.descriptor = PaymentDetails_descriptor_;
1017  metadata.reflection = PaymentDetails_reflection_;
1018  return metadata;
1019 }
1020 
1021 
1022 // ===================================================================
1023 
1024 ::std::string* PaymentRequest::_default_pki_type_ = NULL;
1025 #ifndef _MSC_VER
1031 #endif // !_MSC_VER
1032 
1034  : ::google::protobuf::Message() {
1035  SharedCtor();
1036 }
1037 
1039 }
1040 
1042  : ::google::protobuf::Message() {
1043  SharedCtor();
1044  MergeFrom(from);
1045 }
1046 
1048  _cached_size_ = 0;
1050  pki_type_ = const_cast< ::std::string*>(_default_pki_type_);
1051  pki_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
1052  serialized_payment_details_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
1053  signature_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
1054  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1055 }
1056 
1058  SharedDtor();
1059 }
1060 
1062  if (pki_type_ != _default_pki_type_) {
1063  delete pki_type_;
1064  }
1065  if (pki_data_ != &::google::protobuf::internal::kEmptyString) {
1066  delete pki_data_;
1067  }
1068  if (serialized_payment_details_ != &::google::protobuf::internal::kEmptyString) {
1070  }
1071  if (signature_ != &::google::protobuf::internal::kEmptyString) {
1072  delete signature_;
1073  }
1074  if (this != default_instance_) {
1075  }
1076 }
1077 
1078 void PaymentRequest::SetCachedSize(int size) const {
1079  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1080  _cached_size_ = size;
1081  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1082 }
1083 const ::google::protobuf::Descriptor* PaymentRequest::descriptor() {
1084  protobuf_AssignDescriptorsOnce();
1085  return PaymentRequest_descriptor_;
1086 }
1087 
1090  return *default_instance_;
1091 }
1092 
1094 
1096  return new PaymentRequest;
1097 }
1098 
1100  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1102  if (has_pki_type()) {
1103  if (pki_type_ != _default_pki_type_) {
1104  pki_type_->assign(*_default_pki_type_);
1105  }
1106  }
1107  if (has_pki_data()) {
1108  if (pki_data_ != &::google::protobuf::internal::kEmptyString) {
1109  pki_data_->clear();
1110  }
1111  }
1113  if (serialized_payment_details_ != &::google::protobuf::internal::kEmptyString) {
1114  serialized_payment_details_->clear();
1115  }
1116  }
1117  if (has_signature()) {
1118  if (signature_ != &::google::protobuf::internal::kEmptyString) {
1119  signature_->clear();
1120  }
1121  }
1122  }
1123  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1124  mutable_unknown_fields()->Clear();
1125 }
1126 
1128  ::google::protobuf::io::CodedInputStream* input) {
1129 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1130  ::google::protobuf::uint32 tag;
1131  while ((tag = input->ReadTag()) != 0) {
1132  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1133  // optional uint32 payment_details_version = 1 [default = 1];
1134  case 1: {
1135  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1136  ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
1137  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1138  ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1139  input, &payment_details_version_)));
1141  } else {
1142  goto handle_uninterpreted;
1143  }
1144  if (input->ExpectTag(18)) goto parse_pki_type;
1145  break;
1146  }
1147 
1148  // optional string pki_type = 2 [default = "none"];
1149  case 2: {
1150  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1151  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1152  parse_pki_type:
1153  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1154  input, this->mutable_pki_type()));
1155  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1156  this->pki_type().data(), this->pki_type().length(),
1157  ::google::protobuf::internal::WireFormat::PARSE);
1158  } else {
1159  goto handle_uninterpreted;
1160  }
1161  if (input->ExpectTag(26)) goto parse_pki_data;
1162  break;
1163  }
1164 
1165  // optional bytes pki_data = 3;
1166  case 3: {
1167  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1168  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1169  parse_pki_data:
1170  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1171  input, this->mutable_pki_data()));
1172  } else {
1173  goto handle_uninterpreted;
1174  }
1175  if (input->ExpectTag(34)) goto parse_serialized_payment_details;
1176  break;
1177  }
1178 
1179  // required bytes serialized_payment_details = 4;
1180  case 4: {
1181  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1182  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1183  parse_serialized_payment_details:
1184  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1185  input, this->mutable_serialized_payment_details()));
1186  } else {
1187  goto handle_uninterpreted;
1188  }
1189  if (input->ExpectTag(42)) goto parse_signature;
1190  break;
1191  }
1192 
1193  // optional bytes signature = 5;
1194  case 5: {
1195  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1196  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1197  parse_signature:
1198  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1199  input, this->mutable_signature()));
1200  } else {
1201  goto handle_uninterpreted;
1202  }
1203  if (input->ExpectAtEnd()) return true;
1204  break;
1205  }
1206 
1207  default: {
1208  handle_uninterpreted:
1209  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1210  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1211  return true;
1212  }
1213  DO_(::google::protobuf::internal::WireFormat::SkipField(
1214  input, tag, mutable_unknown_fields()));
1215  break;
1216  }
1217  }
1218  }
1219  return true;
1220 #undef DO_
1221 }
1222 
1224  ::google::protobuf::io::CodedOutputStream* output) const {
1225  // optional uint32 payment_details_version = 1 [default = 1];
1227  ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->payment_details_version(), output);
1228  }
1229 
1230  // optional string pki_type = 2 [default = "none"];
1231  if (has_pki_type()) {
1232  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1233  this->pki_type().data(), this->pki_type().length(),
1234  ::google::protobuf::internal::WireFormat::SERIALIZE);
1235  ::google::protobuf::internal::WireFormatLite::WriteString(
1236  2, this->pki_type(), output);
1237  }
1238 
1239  // optional bytes pki_data = 3;
1240  if (has_pki_data()) {
1241  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1242  3, this->pki_data(), output);
1243  }
1244 
1245  // required bytes serialized_payment_details = 4;
1247  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1248  4, this->serialized_payment_details(), output);
1249  }
1250 
1251  // optional bytes signature = 5;
1252  if (has_signature()) {
1253  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1254  5, this->signature(), output);
1255  }
1256 
1257  if (!unknown_fields().empty()) {
1258  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1259  unknown_fields(), output);
1260  }
1261 }
1262 
1264  ::google::protobuf::uint8* target) const {
1265  // optional uint32 payment_details_version = 1 [default = 1];
1267  target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->payment_details_version(), target);
1268  }
1269 
1270  // optional string pki_type = 2 [default = "none"];
1271  if (has_pki_type()) {
1272  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1273  this->pki_type().data(), this->pki_type().length(),
1274  ::google::protobuf::internal::WireFormat::SERIALIZE);
1275  target =
1276  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1277  2, this->pki_type(), target);
1278  }
1279 
1280  // optional bytes pki_data = 3;
1281  if (has_pki_data()) {
1282  target =
1283  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1284  3, this->pki_data(), target);
1285  }
1286 
1287  // required bytes serialized_payment_details = 4;
1289  target =
1290  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1291  4, this->serialized_payment_details(), target);
1292  }
1293 
1294  // optional bytes signature = 5;
1295  if (has_signature()) {
1296  target =
1297  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1298  5, this->signature(), target);
1299  }
1300 
1301  if (!unknown_fields().empty()) {
1302  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1303  unknown_fields(), target);
1304  }
1305  return target;
1306 }
1307 
1309  int total_size = 0;
1310 
1311  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1312  // optional uint32 payment_details_version = 1 [default = 1];
1314  total_size += 1 +
1315  ::google::protobuf::internal::WireFormatLite::UInt32Size(
1316  this->payment_details_version());
1317  }
1318 
1319  // optional string pki_type = 2 [default = "none"];
1320  if (has_pki_type()) {
1321  total_size += 1 +
1322  ::google::protobuf::internal::WireFormatLite::StringSize(
1323  this->pki_type());
1324  }
1325 
1326  // optional bytes pki_data = 3;
1327  if (has_pki_data()) {
1328  total_size += 1 +
1329  ::google::protobuf::internal::WireFormatLite::BytesSize(
1330  this->pki_data());
1331  }
1332 
1333  // required bytes serialized_payment_details = 4;
1335  total_size += 1 +
1336  ::google::protobuf::internal::WireFormatLite::BytesSize(
1337  this->serialized_payment_details());
1338  }
1339 
1340  // optional bytes signature = 5;
1341  if (has_signature()) {
1342  total_size += 1 +
1343  ::google::protobuf::internal::WireFormatLite::BytesSize(
1344  this->signature());
1345  }
1346 
1347  }
1348  if (!unknown_fields().empty()) {
1349  total_size +=
1350  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1351  unknown_fields());
1352  }
1353  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1354  _cached_size_ = total_size;
1355  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1356  return total_size;
1357 }
1358 
1359 void PaymentRequest::MergeFrom(const ::google::protobuf::Message& from) {
1360  GOOGLE_CHECK_NE(&from, this);
1361  const PaymentRequest* source =
1362  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentRequest*>(
1363  &from);
1364  if (source == NULL) {
1365  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1366  } else {
1367  MergeFrom(*source);
1368  }
1369 }
1370 
1372  GOOGLE_CHECK_NE(&from, this);
1373  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1374  if (from.has_payment_details_version()) {
1376  }
1377  if (from.has_pki_type()) {
1378  set_pki_type(from.pki_type());
1379  }
1380  if (from.has_pki_data()) {
1381  set_pki_data(from.pki_data());
1382  }
1383  if (from.has_serialized_payment_details()) {
1385  }
1386  if (from.has_signature()) {
1387  set_signature(from.signature());
1388  }
1389  }
1390  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1391 }
1392 
1393 void PaymentRequest::CopyFrom(const ::google::protobuf::Message& from) {
1394  if (&from == this) return;
1395  Clear();
1396  MergeFrom(from);
1397 }
1398 
1400  if (&from == this) return;
1401  Clear();
1402  MergeFrom(from);
1403 }
1404 
1406  if ((_has_bits_[0] & 0x00000008) != 0x00000008) return false;
1407 
1408  return true;
1409 }
1410 
1412  if (other != this) {
1414  std::swap(pki_type_, other->pki_type_);
1415  std::swap(pki_data_, other->pki_data_);
1417  std::swap(signature_, other->signature_);
1418  std::swap(_has_bits_[0], other->_has_bits_[0]);
1419  _unknown_fields_.Swap(&other->_unknown_fields_);
1420  std::swap(_cached_size_, other->_cached_size_);
1421  }
1422 }
1423 
1424 ::google::protobuf::Metadata PaymentRequest::GetMetadata() const {
1425  protobuf_AssignDescriptorsOnce();
1426  ::google::protobuf::Metadata metadata;
1427  metadata.descriptor = PaymentRequest_descriptor_;
1428  metadata.reflection = PaymentRequest_reflection_;
1429  return metadata;
1430 }
1431 
1432 
1433 // ===================================================================
1434 
1435 #ifndef _MSC_VER
1437 #endif // !_MSC_VER
1438 
1440  : ::google::protobuf::Message() {
1441  SharedCtor();
1442 }
1443 
1445 }
1446 
1448  : ::google::protobuf::Message() {
1449  SharedCtor();
1450  MergeFrom(from);
1451 }
1452 
1454  _cached_size_ = 0;
1455  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1456 }
1457 
1459  SharedDtor();
1460 }
1461 
1463  if (this != default_instance_) {
1464  }
1465 }
1466 
1467 void X509Certificates::SetCachedSize(int size) const {
1468  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1469  _cached_size_ = size;
1470  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1471 }
1472 const ::google::protobuf::Descriptor* X509Certificates::descriptor() {
1473  protobuf_AssignDescriptorsOnce();
1474  return X509Certificates_descriptor_;
1475 }
1476 
1479  return *default_instance_;
1480 }
1481 
1483 
1485  return new X509Certificates;
1486 }
1487 
1489  certificate_.Clear();
1490  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1491  mutable_unknown_fields()->Clear();
1492 }
1493 
1495  ::google::protobuf::io::CodedInputStream* input) {
1496 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1497  ::google::protobuf::uint32 tag;
1498  while ((tag = input->ReadTag()) != 0) {
1499  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1500  // repeated bytes certificate = 1;
1501  case 1: {
1502  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1503  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1504  parse_certificate:
1505  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1506  input, this->add_certificate()));
1507  } else {
1508  goto handle_uninterpreted;
1509  }
1510  if (input->ExpectTag(10)) goto parse_certificate;
1511  if (input->ExpectAtEnd()) return true;
1512  break;
1513  }
1514 
1515  default: {
1516  handle_uninterpreted:
1517  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1518  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1519  return true;
1520  }
1521  DO_(::google::protobuf::internal::WireFormat::SkipField(
1522  input, tag, mutable_unknown_fields()));
1523  break;
1524  }
1525  }
1526  }
1527  return true;
1528 #undef DO_
1529 }
1530 
1532  ::google::protobuf::io::CodedOutputStream* output) const {
1533  // repeated bytes certificate = 1;
1534  for (int i = 0; i < this->certificate_size(); i++) {
1535  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1536  1, this->certificate(i), output);
1537  }
1538 
1539  if (!unknown_fields().empty()) {
1540  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1541  unknown_fields(), output);
1542  }
1543 }
1544 
1546  ::google::protobuf::uint8* target) const {
1547  // repeated bytes certificate = 1;
1548  for (int i = 0; i < this->certificate_size(); i++) {
1549  target = ::google::protobuf::internal::WireFormatLite::
1550  WriteBytesToArray(1, this->certificate(i), target);
1551  }
1552 
1553  if (!unknown_fields().empty()) {
1554  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1555  unknown_fields(), target);
1556  }
1557  return target;
1558 }
1559 
1561  int total_size = 0;
1562 
1563  // repeated bytes certificate = 1;
1564  total_size += 1 * this->certificate_size();
1565  for (int i = 0; i < this->certificate_size(); i++) {
1566  total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1567  this->certificate(i));
1568  }
1569 
1570  if (!unknown_fields().empty()) {
1571  total_size +=
1572  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1573  unknown_fields());
1574  }
1575  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1576  _cached_size_ = total_size;
1577  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1578  return total_size;
1579 }
1580 
1581 void X509Certificates::MergeFrom(const ::google::protobuf::Message& from) {
1582  GOOGLE_CHECK_NE(&from, this);
1583  const X509Certificates* source =
1584  ::google::protobuf::internal::dynamic_cast_if_available<const X509Certificates*>(
1585  &from);
1586  if (source == NULL) {
1587  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1588  } else {
1589  MergeFrom(*source);
1590  }
1591 }
1592 
1594  GOOGLE_CHECK_NE(&from, this);
1595  certificate_.MergeFrom(from.certificate_);
1596  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1597 }
1598 
1599 void X509Certificates::CopyFrom(const ::google::protobuf::Message& from) {
1600  if (&from == this) return;
1601  Clear();
1602  MergeFrom(from);
1603 }
1604 
1606  if (&from == this) return;
1607  Clear();
1608  MergeFrom(from);
1609 }
1610 
1612 
1613  return true;
1614 }
1615 
1617  if (other != this) {
1618  certificate_.Swap(&other->certificate_);
1619  std::swap(_has_bits_[0], other->_has_bits_[0]);
1620  _unknown_fields_.Swap(&other->_unknown_fields_);
1621  std::swap(_cached_size_, other->_cached_size_);
1622  }
1623 }
1624 
1625 ::google::protobuf::Metadata X509Certificates::GetMetadata() const {
1626  protobuf_AssignDescriptorsOnce();
1627  ::google::protobuf::Metadata metadata;
1628  metadata.descriptor = X509Certificates_descriptor_;
1629  metadata.reflection = X509Certificates_reflection_;
1630  return metadata;
1631 }
1632 
1633 
1634 // ===================================================================
1635 
1636 #ifndef _MSC_VER
1640 const int Payment::kMemoFieldNumber;
1641 #endif // !_MSC_VER
1642 
1644  : ::google::protobuf::Message() {
1645  SharedCtor();
1646 }
1647 
1649 }
1650 
1652  : ::google::protobuf::Message() {
1653  SharedCtor();
1654  MergeFrom(from);
1655 }
1656 
1658  _cached_size_ = 0;
1659  merchant_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
1660  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
1661  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1662 }
1663 
1665  SharedDtor();
1666 }
1667 
1669  if (merchant_data_ != &::google::protobuf::internal::kEmptyString) {
1670  delete merchant_data_;
1671  }
1672  if (memo_ != &::google::protobuf::internal::kEmptyString) {
1673  delete memo_;
1674  }
1675  if (this != default_instance_) {
1676  }
1677 }
1678 
1679 void Payment::SetCachedSize(int size) const {
1680  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1681  _cached_size_ = size;
1682  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1683 }
1684 const ::google::protobuf::Descriptor* Payment::descriptor() {
1685  protobuf_AssignDescriptorsOnce();
1686  return Payment_descriptor_;
1687 }
1688 
1691  return *default_instance_;
1692 }
1693 
1695 
1697  return new Payment;
1698 }
1699 
1701  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1702  if (has_merchant_data()) {
1703  if (merchant_data_ != &::google::protobuf::internal::kEmptyString) {
1704  merchant_data_->clear();
1705  }
1706  }
1707  if (has_memo()) {
1708  if (memo_ != &::google::protobuf::internal::kEmptyString) {
1709  memo_->clear();
1710  }
1711  }
1712  }
1713  transactions_.Clear();
1714  refund_to_.Clear();
1715  ::memset(_has_bits_, 0, sizeof(_has_bits_));
1716  mutable_unknown_fields()->Clear();
1717 }
1718 
1720  ::google::protobuf::io::CodedInputStream* input) {
1721 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
1722  ::google::protobuf::uint32 tag;
1723  while ((tag = input->ReadTag()) != 0) {
1724  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1725  // optional bytes merchant_data = 1;
1726  case 1: {
1727  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1728  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1729  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1730  input, this->mutable_merchant_data()));
1731  } else {
1732  goto handle_uninterpreted;
1733  }
1734  if (input->ExpectTag(18)) goto parse_transactions;
1735  break;
1736  }
1737 
1738  // repeated bytes transactions = 2;
1739  case 2: {
1740  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1741  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1742  parse_transactions:
1743  DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1744  input, this->add_transactions()));
1745  } else {
1746  goto handle_uninterpreted;
1747  }
1748  if (input->ExpectTag(18)) goto parse_transactions;
1749  if (input->ExpectTag(26)) goto parse_refund_to;
1750  break;
1751  }
1752 
1753  // repeated .payments.Output refund_to = 3;
1754  case 3: {
1755  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1756  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1757  parse_refund_to:
1758  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1759  input, add_refund_to()));
1760  } else {
1761  goto handle_uninterpreted;
1762  }
1763  if (input->ExpectTag(26)) goto parse_refund_to;
1764  if (input->ExpectTag(34)) goto parse_memo;
1765  break;
1766  }
1767 
1768  // optional string memo = 4;
1769  case 4: {
1770  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1771  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
1772  parse_memo:
1773  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1774  input, this->mutable_memo()));
1775  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1776  this->memo().data(), this->memo().length(),
1777  ::google::protobuf::internal::WireFormat::PARSE);
1778  } else {
1779  goto handle_uninterpreted;
1780  }
1781  if (input->ExpectAtEnd()) return true;
1782  break;
1783  }
1784 
1785  default: {
1786  handle_uninterpreted:
1787  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1788  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1789  return true;
1790  }
1791  DO_(::google::protobuf::internal::WireFormat::SkipField(
1792  input, tag, mutable_unknown_fields()));
1793  break;
1794  }
1795  }
1796  }
1797  return true;
1798 #undef DO_
1799 }
1800 
1802  ::google::protobuf::io::CodedOutputStream* output) const {
1803  // optional bytes merchant_data = 1;
1804  if (has_merchant_data()) {
1805  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1806  1, this->merchant_data(), output);
1807  }
1808 
1809  // repeated bytes transactions = 2;
1810  for (int i = 0; i < this->transactions_size(); i++) {
1811  ::google::protobuf::internal::WireFormatLite::WriteBytes(
1812  2, this->transactions(i), output);
1813  }
1814 
1815  // repeated .payments.Output refund_to = 3;
1816  for (int i = 0; i < this->refund_to_size(); i++) {
1817  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1818  3, this->refund_to(i), output);
1819  }
1820 
1821  // optional string memo = 4;
1822  if (has_memo()) {
1823  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1824  this->memo().data(), this->memo().length(),
1825  ::google::protobuf::internal::WireFormat::SERIALIZE);
1826  ::google::protobuf::internal::WireFormatLite::WriteString(
1827  4, this->memo(), output);
1828  }
1829 
1830  if (!unknown_fields().empty()) {
1831  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1832  unknown_fields(), output);
1833  }
1834 }
1835 
1836 ::google::protobuf::uint8* Payment::SerializeWithCachedSizesToArray(
1837  ::google::protobuf::uint8* target) const {
1838  // optional bytes merchant_data = 1;
1839  if (has_merchant_data()) {
1840  target =
1841  ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1842  1, this->merchant_data(), target);
1843  }
1844 
1845  // repeated bytes transactions = 2;
1846  for (int i = 0; i < this->transactions_size(); i++) {
1847  target = ::google::protobuf::internal::WireFormatLite::
1848  WriteBytesToArray(2, this->transactions(i), target);
1849  }
1850 
1851  // repeated .payments.Output refund_to = 3;
1852  for (int i = 0; i < this->refund_to_size(); i++) {
1853  target = ::google::protobuf::internal::WireFormatLite::
1854  WriteMessageNoVirtualToArray(
1855  3, this->refund_to(i), target);
1856  }
1857 
1858  // optional string memo = 4;
1859  if (has_memo()) {
1860  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
1861  this->memo().data(), this->memo().length(),
1862  ::google::protobuf::internal::WireFormat::SERIALIZE);
1863  target =
1864  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1865  4, this->memo(), target);
1866  }
1867 
1868  if (!unknown_fields().empty()) {
1869  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1870  unknown_fields(), target);
1871  }
1872  return target;
1873 }
1874 
1875 int Payment::ByteSize() const {
1876  int total_size = 0;
1877 
1878  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1879  // optional bytes merchant_data = 1;
1880  if (has_merchant_data()) {
1881  total_size += 1 +
1882  ::google::protobuf::internal::WireFormatLite::BytesSize(
1883  this->merchant_data());
1884  }
1885 
1886  // optional string memo = 4;
1887  if (has_memo()) {
1888  total_size += 1 +
1889  ::google::protobuf::internal::WireFormatLite::StringSize(
1890  this->memo());
1891  }
1892 
1893  }
1894  // repeated bytes transactions = 2;
1895  total_size += 1 * this->transactions_size();
1896  for (int i = 0; i < this->transactions_size(); i++) {
1897  total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1898  this->transactions(i));
1899  }
1900 
1901  // repeated .payments.Output refund_to = 3;
1902  total_size += 1 * this->refund_to_size();
1903  for (int i = 0; i < this->refund_to_size(); i++) {
1904  total_size +=
1905  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
1906  this->refund_to(i));
1907  }
1908 
1909  if (!unknown_fields().empty()) {
1910  total_size +=
1911  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1912  unknown_fields());
1913  }
1914  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1915  _cached_size_ = total_size;
1916  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1917  return total_size;
1918 }
1919 
1920 void Payment::MergeFrom(const ::google::protobuf::Message& from) {
1921  GOOGLE_CHECK_NE(&from, this);
1922  const Payment* source =
1923  ::google::protobuf::internal::dynamic_cast_if_available<const Payment*>(
1924  &from);
1925  if (source == NULL) {
1926  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1927  } else {
1928  MergeFrom(*source);
1929  }
1930 }
1931 
1932 void Payment::MergeFrom(const Payment& from) {
1933  GOOGLE_CHECK_NE(&from, this);
1934  transactions_.MergeFrom(from.transactions_);
1935  refund_to_.MergeFrom(from.refund_to_);
1936  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1937  if (from.has_merchant_data()) {
1939  }
1940  if (from.has_memo()) {
1941  set_memo(from.memo());
1942  }
1943  }
1944  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1945 }
1946 
1947 void Payment::CopyFrom(const ::google::protobuf::Message& from) {
1948  if (&from == this) return;
1949  Clear();
1950  MergeFrom(from);
1951 }
1952 
1953 void Payment::CopyFrom(const Payment& from) {
1954  if (&from == this) return;
1955  Clear();
1956  MergeFrom(from);
1957 }
1958 
1960 
1961  for (int i = 0; i < refund_to_size(); i++) {
1962  if (!this->refund_to(i).IsInitialized()) return false;
1963  }
1964  return true;
1965 }
1966 
1967 void Payment::Swap(Payment* other) {
1968  if (other != this) {
1969  std::swap(merchant_data_, other->merchant_data_);
1970  transactions_.Swap(&other->transactions_);
1971  refund_to_.Swap(&other->refund_to_);
1972  std::swap(memo_, other->memo_);
1973  std::swap(_has_bits_[0], other->_has_bits_[0]);
1974  _unknown_fields_.Swap(&other->_unknown_fields_);
1975  std::swap(_cached_size_, other->_cached_size_);
1976  }
1977 }
1978 
1979 ::google::protobuf::Metadata Payment::GetMetadata() const {
1980  protobuf_AssignDescriptorsOnce();
1981  ::google::protobuf::Metadata metadata;
1982  metadata.descriptor = Payment_descriptor_;
1983  metadata.reflection = Payment_reflection_;
1984  return metadata;
1985 }
1986 
1987 
1988 // ===================================================================
1989 
1990 #ifndef _MSC_VER
1993 #endif // !_MSC_VER
1994 
1996  : ::google::protobuf::Message() {
1997  SharedCtor();
1998 }
1999 
2002 }
2003 
2005  : ::google::protobuf::Message() {
2006  SharedCtor();
2007  MergeFrom(from);
2008 }
2009 
2011  _cached_size_ = 0;
2012  payment_ = NULL;
2013  memo_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
2014  ::memset(_has_bits_, 0, sizeof(_has_bits_));
2015 }
2016 
2018  SharedDtor();
2019 }
2020 
2022  if (memo_ != &::google::protobuf::internal::kEmptyString) {
2023  delete memo_;
2024  }
2025  if (this != default_instance_) {
2026  delete payment_;
2027  }
2028 }
2029 
2030 void PaymentACK::SetCachedSize(int size) const {
2031  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2032  _cached_size_ = size;
2033  GOOGLE_SAFE_CONCURRENT_WRITES_END();
2034 }
2035 const ::google::protobuf::Descriptor* PaymentACK::descriptor() {
2036  protobuf_AssignDescriptorsOnce();
2037  return PaymentACK_descriptor_;
2038 }
2039 
2042  return *default_instance_;
2043 }
2044 
2046 
2048  return new PaymentACK;
2049 }
2050 
2052  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2053  if (has_payment()) {
2054  if (payment_ != NULL) payment_->::payments::Payment::Clear();
2055  }
2056  if (has_memo()) {
2057  if (memo_ != &::google::protobuf::internal::kEmptyString) {
2058  memo_->clear();
2059  }
2060  }
2061  }
2062  ::memset(_has_bits_, 0, sizeof(_has_bits_));
2063  mutable_unknown_fields()->Clear();
2064 }
2065 
2067  ::google::protobuf::io::CodedInputStream* input) {
2068 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
2069  ::google::protobuf::uint32 tag;
2070  while ((tag = input->ReadTag()) != 0) {
2071  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2072  // required .payments.Payment payment = 1;
2073  case 1: {
2074  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2075  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
2076  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2077  input, mutable_payment()));
2078  } else {
2079  goto handle_uninterpreted;
2080  }
2081  if (input->ExpectTag(18)) goto parse_memo;
2082  break;
2083  }
2084 
2085  // optional string memo = 2;
2086  case 2: {
2087  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2088  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
2089  parse_memo:
2090  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2091  input, this->mutable_memo()));
2092  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2093  this->memo().data(), this->memo().length(),
2094  ::google::protobuf::internal::WireFormat::PARSE);
2095  } else {
2096  goto handle_uninterpreted;
2097  }
2098  if (input->ExpectAtEnd()) return true;
2099  break;
2100  }
2101 
2102  default: {
2103  handle_uninterpreted:
2104  if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2105  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2106  return true;
2107  }
2108  DO_(::google::protobuf::internal::WireFormat::SkipField(
2109  input, tag, mutable_unknown_fields()));
2110  break;
2111  }
2112  }
2113  }
2114  return true;
2115 #undef DO_
2116 }
2117 
2119  ::google::protobuf::io::CodedOutputStream* output) const {
2120  // required .payments.Payment payment = 1;
2121  if (has_payment()) {
2122  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2123  1, this->payment(), output);
2124  }
2125 
2126  // optional string memo = 2;
2127  if (has_memo()) {
2128  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2129  this->memo().data(), this->memo().length(),
2130  ::google::protobuf::internal::WireFormat::SERIALIZE);
2131  ::google::protobuf::internal::WireFormatLite::WriteString(
2132  2, this->memo(), output);
2133  }
2134 
2135  if (!unknown_fields().empty()) {
2136  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2137  unknown_fields(), output);
2138  }
2139 }
2140 
2142  ::google::protobuf::uint8* target) const {
2143  // required .payments.Payment payment = 1;
2144  if (has_payment()) {
2145  target = ::google::protobuf::internal::WireFormatLite::
2146  WriteMessageNoVirtualToArray(
2147  1, this->payment(), target);
2148  }
2149 
2150  // optional string memo = 2;
2151  if (has_memo()) {
2152  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
2153  this->memo().data(), this->memo().length(),
2154  ::google::protobuf::internal::WireFormat::SERIALIZE);
2155  target =
2156  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2157  2, this->memo(), target);
2158  }
2159 
2160  if (!unknown_fields().empty()) {
2161  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2162  unknown_fields(), target);
2163  }
2164  return target;
2165 }
2166 
2168  int total_size = 0;
2169 
2170  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2171  // required .payments.Payment payment = 1;
2172  if (has_payment()) {
2173  total_size += 1 +
2174  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2175  this->payment());
2176  }
2177 
2178  // optional string memo = 2;
2179  if (has_memo()) {
2180  total_size += 1 +
2181  ::google::protobuf::internal::WireFormatLite::StringSize(
2182  this->memo());
2183  }
2184 
2185  }
2186  if (!unknown_fields().empty()) {
2187  total_size +=
2188  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2189  unknown_fields());
2190  }
2191  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2192  _cached_size_ = total_size;
2193  GOOGLE_SAFE_CONCURRENT_WRITES_END();
2194  return total_size;
2195 }
2196 
2197 void PaymentACK::MergeFrom(const ::google::protobuf::Message& from) {
2198  GOOGLE_CHECK_NE(&from, this);
2199  const PaymentACK* source =
2200  ::google::protobuf::internal::dynamic_cast_if_available<const PaymentACK*>(
2201  &from);
2202  if (source == NULL) {
2203  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2204  } else {
2205  MergeFrom(*source);
2206  }
2207 }
2208 
2210  GOOGLE_CHECK_NE(&from, this);
2211  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2212  if (from.has_payment()) {
2213  mutable_payment()->::payments::Payment::MergeFrom(from.payment());
2214  }
2215  if (from.has_memo()) {
2216  set_memo(from.memo());
2217  }
2218  }
2219  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2220 }
2221 
2222 void PaymentACK::CopyFrom(const ::google::protobuf::Message& from) {
2223  if (&from == this) return;
2224  Clear();
2225  MergeFrom(from);
2226 }
2227 
2229  if (&from == this) return;
2230  Clear();
2231  MergeFrom(from);
2232 }
2233 
2235  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
2236 
2237  if (has_payment()) {
2238  if (!this->payment().IsInitialized()) return false;
2239  }
2240  return true;
2241 }
2242 
2244  if (other != this) {
2245  std::swap(payment_, other->payment_);
2246  std::swap(memo_, other->memo_);
2247  std::swap(_has_bits_[0], other->_has_bits_[0]);
2248  _unknown_fields_.Swap(&other->_unknown_fields_);
2249  std::swap(_cached_size_, other->_cached_size_);
2250  }
2251 }
2252 
2253 ::google::protobuf::Metadata PaymentACK::GetMetadata() const {
2254  protobuf_AssignDescriptorsOnce();
2255  ::google::protobuf::Metadata metadata;
2256  metadata.descriptor = PaymentACK_descriptor_;
2257  metadata.reflection = PaymentACK_reflection_;
2258  return metadata;
2259 }
2260 
2261 
2262 // @@protoc_insertion_point(namespace_scope)
2263 
2264 } // namespace payments
2265 
2266 // @@protoc_insertion_point(global_scope)
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 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
::google::protobuf::uint32 _has_bits_[(5+31)/32]
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::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()
void set_network(const ::std::string &value)
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const
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:52
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
::google::protobuf::uint32 _has_bits_[(2+31)/32]
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
::google::protobuf::uint32 _has_bits_[(2+31)/32]
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_
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
::google::protobuf::uint32 _has_bits_[(1+31)/32]
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input)
::google::protobuf::uint32 _has_bits_[(4+31)/32]
::google::protobuf::uint64 amount_
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
::google::protobuf::uint32 _has_bits_[(7+31)/32]
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
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)