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