1 | <?php |
||
10 | class PaymentRequest extends Message |
||
11 | { |
||
12 | |||
13 | /** @var int */ |
||
14 | public $payment_details_version = 1; |
||
15 | |||
16 | /** @var string */ |
||
17 | public $pki_type = 'none'; |
||
18 | |||
19 | /** @var string */ |
||
20 | public $pki_data ; |
||
21 | |||
22 | /** @var string */ |
||
23 | public $serialized_payment_details ; |
||
24 | |||
25 | /** @var string */ |
||
26 | public $signature ; |
||
27 | |||
28 | /** @var \Closure[] */ |
||
29 | protected static $__extensions = array(); |
||
30 | |||
31 | public static function descriptor() |
||
32 | { |
||
33 | $descriptor = new Descriptor(__CLASS__, 'payments.PaymentRequest'); |
||
34 | |||
35 | // OPTIONAL UINT32 payment_details_version = 1 |
||
36 | $f = new Field(); |
||
37 | $f->number = 1; |
||
38 | $f->name = 'payment_details_version'; |
||
39 | $f->type = Protobuf::TYPE_UINT32; |
||
40 | $f->rule = Protobuf::RULE_OPTIONAL; |
||
41 | $f->default = 1; |
||
42 | $descriptor->addField($f); |
||
43 | |||
44 | // OPTIONAL STRING pki_type = 2 |
||
45 | $f = new Field(); |
||
46 | $f->number = 2; |
||
47 | $f->name = 'pki_type'; |
||
48 | $f->type = Protobuf::TYPE_STRING; |
||
49 | $f->rule = Protobuf::RULE_OPTIONAL; |
||
50 | $f->default = 'none'; |
||
51 | $descriptor->addField($f); |
||
52 | |||
53 | // OPTIONAL BYTES pki_data = 3 |
||
54 | $f = new Field(); |
||
55 | $f->number = 3; |
||
56 | $f->name = 'pki_data'; |
||
57 | $f->type = Protobuf::TYPE_BYTES; |
||
58 | $f->rule = Protobuf::RULE_OPTIONAL; |
||
59 | $descriptor->addField($f); |
||
60 | |||
61 | // REQUIRED BYTES serialized_payment_details = 4 |
||
62 | $f = new Field(); |
||
63 | $f->number = 4; |
||
64 | $f->name = 'serialized_payment_details'; |
||
65 | $f->type = Protobuf::TYPE_BYTES; |
||
66 | $f->rule = Protobuf::RULE_REQUIRED; |
||
67 | $descriptor->addField($f); |
||
68 | |||
69 | // OPTIONAL BYTES signature = 5 |
||
70 | $f = new Field(); |
||
71 | $f->number = 5; |
||
72 | $f->name = 'signature'; |
||
73 | $f->type = Protobuf::TYPE_BYTES; |
||
74 | $f->rule = Protobuf::RULE_OPTIONAL; |
||
75 | $descriptor->addField($f); |
||
76 | |||
77 | foreach (self::$__extensions as $cb) { |
||
78 | $descriptor->addField($cb(), true); |
||
79 | } |
||
80 | |||
81 | return $descriptor; |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * Check if <payment_details_version> has a value |
||
86 | * |
||
87 | * @return boolean |
||
88 | */ |
||
89 | public function hasPaymentDetailsVersion() |
||
93 | |||
94 | /** |
||
95 | * Clear <payment_details_version> value |
||
96 | * |
||
97 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
98 | */ |
||
99 | public function clearPaymentDetailsVersion() |
||
103 | |||
104 | /** |
||
105 | * Get <payment_details_version> value |
||
106 | * |
||
107 | * @return int |
||
108 | */ |
||
109 | public function getPaymentDetailsVersion() |
||
113 | |||
114 | /** |
||
115 | * Set <payment_details_version> value |
||
116 | * |
||
117 | * @param int $value |
||
118 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
119 | */ |
||
120 | public function setPaymentDetailsVersion($value) |
||
124 | |||
125 | /** |
||
126 | * Check if <pki_type> has a value |
||
127 | * |
||
128 | * @return boolean |
||
129 | */ |
||
130 | public function hasPkiType() |
||
134 | |||
135 | /** |
||
136 | * Clear <pki_type> value |
||
137 | * |
||
138 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
139 | */ |
||
140 | public function clearPkiType() |
||
144 | |||
145 | /** |
||
146 | * Get <pki_type> value |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | 24 | public function getPkiType() |
|
154 | |||
155 | /** |
||
156 | * Set <pki_type> value |
||
157 | * |
||
158 | * @param string $value |
||
159 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
160 | */ |
||
161 | 24 | public function setPkiType($value) |
|
165 | |||
166 | /** |
||
167 | * Check if <pki_data> has a value |
||
168 | * |
||
169 | * @return boolean |
||
170 | */ |
||
171 | public function hasPkiData() |
||
175 | |||
176 | /** |
||
177 | * Clear <pki_data> value |
||
178 | * |
||
179 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
180 | */ |
||
181 | public function clearPkiData() |
||
185 | |||
186 | /** |
||
187 | * Get <pki_data> value |
||
188 | * |
||
189 | * @return string |
||
190 | */ |
||
191 | 12 | public function getPkiData() |
|
195 | |||
196 | /** |
||
197 | * Set <pki_data> value |
||
198 | * |
||
199 | * @param string $value |
||
200 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
201 | */ |
||
202 | 16 | public function setPkiData($value) |
|
206 | |||
207 | /** |
||
208 | * Check if <serialized_payment_details> has a value |
||
209 | * |
||
210 | * @return boolean |
||
211 | */ |
||
212 | public function hasSerializedPaymentDetails() |
||
216 | |||
217 | /** |
||
218 | * Clear <serialized_payment_details> value |
||
219 | * |
||
220 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
221 | */ |
||
222 | public function clearSerializedPaymentDetails() |
||
226 | |||
227 | /** |
||
228 | * Get <serialized_payment_details> value |
||
229 | * |
||
230 | * @return string |
||
231 | */ |
||
232 | 28 | public function getSerializedPaymentDetails() |
|
236 | |||
237 | /** |
||
238 | * Set <serialized_payment_details> value |
||
239 | * |
||
240 | * @param string $value |
||
241 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
242 | */ |
||
243 | 20 | public function setSerializedPaymentDetails($value) |
|
247 | |||
248 | /** |
||
249 | * Check if <signature> has a value |
||
250 | * |
||
251 | * @return boolean |
||
252 | */ |
||
253 | public function hasSignature() |
||
254 | { |
||
255 | return $this->_has(5); |
||
256 | } |
||
257 | |||
258 | /** |
||
259 | * Clear <signature> value |
||
260 | * |
||
261 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
262 | */ |
||
263 | public function clearSignature() |
||
267 | |||
268 | /** |
||
269 | * Get <signature> value |
||
270 | * |
||
271 | * @return string |
||
272 | */ |
||
273 | 16 | public function getSignature() |
|
277 | |||
278 | /** |
||
279 | * Set <signature> value |
||
280 | * |
||
281 | * @param string $value |
||
282 | * @return \BitWasp\Bitcoin\PaymentProtocol\Protobufs\PaymentRequest |
||
283 | */ |
||
284 | 20 | public function setSignature($value) |
|
288 | } |
||
289 |