1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Bip70\Protobuf\Proto; |
6
|
|
|
|
7
|
|
|
class PaymentACK extends \DrSlump\Protobuf\Message |
8
|
|
|
{ |
9
|
|
|
|
10
|
|
|
/** @var \Bip70\Protobuf\Proto\Payment */ |
11
|
|
|
public $payment; |
12
|
|
|
|
13
|
|
|
/** @var string */ |
14
|
|
|
public $memo; |
15
|
|
|
|
16
|
|
|
|
17
|
|
|
/** @var \Closure[] */ |
18
|
|
|
protected static $__extensions = array(); |
19
|
|
|
|
20
|
1 |
|
public static function descriptor() |
21
|
|
|
{ |
22
|
1 |
|
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'payments.PaymentACK'); |
23
|
|
|
|
24
|
|
|
// REQUIRED MESSAGE payment = 1 |
25
|
1 |
|
$f = new \DrSlump\Protobuf\Field(); |
26
|
1 |
|
$f->number = 1; |
27
|
1 |
|
$f->name = 'payment'; |
28
|
1 |
|
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE; |
29
|
1 |
|
$f->rule = \DrSlump\Protobuf::RULE_REQUIRED; |
30
|
1 |
|
$f->reference = Payment::class; |
31
|
1 |
|
$descriptor->addField($f); |
32
|
|
|
|
33
|
|
|
// OPTIONAL STRING memo = 2 |
34
|
1 |
|
$f = new \DrSlump\Protobuf\Field(); |
35
|
1 |
|
$f->number = 2; |
36
|
1 |
|
$f->name = 'memo'; |
37
|
1 |
|
$f->type = \DrSlump\Protobuf::TYPE_STRING; |
38
|
1 |
|
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; |
39
|
1 |
|
$descriptor->addField($f); |
40
|
|
|
|
41
|
1 |
|
foreach (self::$__extensions as $cb) { |
42
|
|
|
$descriptor->addField($cb(), true); |
43
|
|
|
} |
44
|
|
|
|
45
|
1 |
|
return $descriptor; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Check if <payment> has a value |
50
|
|
|
* |
51
|
|
|
* @return boolean |
52
|
|
|
*/ |
53
|
1 |
|
public function hasPayment() |
54
|
|
|
{ |
55
|
1 |
|
return $this->_has(1); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Clear <payment> value |
60
|
|
|
* |
61
|
|
|
* @return \Bip70\Protobuf\Proto\PaymentACK |
62
|
|
|
*/ |
63
|
1 |
|
public function clearPayment() |
64
|
|
|
{ |
65
|
1 |
|
return $this->_clear(1); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* Get <payment> value |
70
|
|
|
* |
71
|
|
|
* @return \Bip70\Protobuf\Proto\Payment |
72
|
|
|
*/ |
73
|
1 |
|
public function getPayment() |
74
|
|
|
{ |
75
|
1 |
|
return $this->_get(1); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Set <payment> value |
80
|
|
|
* |
81
|
|
|
* @param \Bip70\Protobuf\Proto\Payment $value |
82
|
|
|
* @return \Bip70\Protobuf\Proto\PaymentACK |
83
|
|
|
*/ |
84
|
2 |
|
public function setPayment(\Bip70\Protobuf\Proto\Payment $value) |
85
|
|
|
{ |
86
|
2 |
|
return $this->_set(1, $value); |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Check if <memo> has a value |
91
|
|
|
* |
92
|
|
|
* @return boolean |
93
|
|
|
*/ |
94
|
1 |
|
public function hasMemo() |
95
|
|
|
{ |
96
|
1 |
|
return $this->_has(2); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Clear <memo> value |
101
|
|
|
* |
102
|
|
|
* @return \Bip70\Protobuf\Proto\PaymentACK |
103
|
|
|
*/ |
104
|
1 |
|
public function clearMemo() |
105
|
|
|
{ |
106
|
1 |
|
return $this->_clear(2); |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Get <memo> value |
111
|
|
|
* |
112
|
|
|
* @return string |
113
|
|
|
*/ |
114
|
1 |
|
public function getMemo() |
115
|
|
|
{ |
116
|
1 |
|
return $this->_get(2); |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* Set <memo> value |
121
|
|
|
* |
122
|
|
|
* @param string $value |
123
|
|
|
* @return \Bip70\Protobuf\Proto\PaymentACK |
124
|
|
|
*/ |
125
|
1 |
|
public function setMemo($value) |
126
|
|
|
{ |
127
|
1 |
|
return $this->_set(2, $value); |
128
|
|
|
} |
129
|
|
|
} |
130
|
|
|
|