aboutsummaryrefslogtreecommitdiffstats
path: root/python-packages/sra_client/sra_client/models/order_schema.py
blob: 48fef39d845e126db2d0c47f0f947631f5fe722d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# coding: utf-8


import pprint
import re  # noqa: F401

import six


class OrderSchema(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        "maker_address": "str",
        "taker_address": "str",
        "maker_fee": "str",
        "taker_fee": "str",
        "sender_address": "str",
        "maker_asset_amount": "str",
        "taker_asset_amount": "str",
        "maker_asset_data": "str",
        "taker_asset_data": "str",
        "salt": "str",
        "exchange_address": "str",
        "fee_recipient_address": "str",
        "expiration_time_seconds": "str",
    }

    attribute_map = {
        "maker_address": "makerAddress",
        "taker_address": "takerAddress",
        "maker_fee": "makerFee",
        "taker_fee": "takerFee",
        "sender_address": "senderAddress",
        "maker_asset_amount": "makerAssetAmount",
        "taker_asset_amount": "takerAssetAmount",
        "maker_asset_data": "makerAssetData",
        "taker_asset_data": "takerAssetData",
        "salt": "salt",
        "exchange_address": "exchangeAddress",
        "fee_recipient_address": "feeRecipientAddress",
        "expiration_time_seconds": "expirationTimeSeconds",
    }

    def __init__(
        self,
        maker_address=None,
        taker_address=None,
        maker_fee=None,
        taker_fee=None,
        sender_address=None,
        maker_asset_amount=None,
        taker_asset_amount=None,
        maker_asset_data=None,
        taker_asset_data=None,
        salt=None,
        exchange_address=None,
        fee_recipient_address=None,
        expiration_time_seconds=None,
    ):  # noqa: E501
        """OrderSchema - a model defined in OpenAPI"""  # noqa: E501

        self._maker_address = None
        self._taker_address = None
        self._maker_fee = None
        self._taker_fee = None
        self._sender_address = None
        self._maker_asset_amount = None
        self._taker_asset_amount = None
        self._maker_asset_data = None
        self._taker_asset_data = None
        self._salt = None
        self._exchange_address = None
        self._fee_recipient_address = None
        self._expiration_time_seconds = None
        self.discriminator = None

        self.maker_address = maker_address
        self.taker_address = taker_address
        self.maker_fee = maker_fee
        self.taker_fee = taker_fee
        self.sender_address = sender_address
        self.maker_asset_amount = maker_asset_amount
        self.taker_asset_amount = taker_asset_amount
        self.maker_asset_data = maker_asset_data
        self.taker_asset_data = taker_asset_data
        self.salt = salt
        self.exchange_address = exchange_address
        self.fee_recipient_address = fee_recipient_address
        self.expiration_time_seconds = expiration_time_seconds

    @property
    def maker_address(self):
        """Gets the maker_address of this OrderSchema.  # noqa: E501


        :return: The maker_address of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._maker_address

    @maker_address.setter
    def maker_address(self, maker_address):
        """Sets the maker_address of this OrderSchema.


        :param maker_address: The maker_address of this OrderSchema.  # noqa: E501
        :type: str
        """
        if maker_address is None:
            raise ValueError(
                "Invalid value for `maker_address`, must not be `None`"
            )  # noqa: E501
        if maker_address is not None and not re.search(
            r"^0x[0-9a-f]{40}$", maker_address
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `maker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
            )  # noqa: E501

        self._maker_address = maker_address

    @property
    def taker_address(self):
        """Gets the taker_address of this OrderSchema.  # noqa: E501


        :return: The taker_address of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._taker_address

    @taker_address.setter
    def taker_address(self, taker_address):
        """Sets the taker_address of this OrderSchema.


        :param taker_address: The taker_address of this OrderSchema.  # noqa: E501
        :type: str
        """
        if taker_address is None:
            raise ValueError(
                "Invalid value for `taker_address`, must not be `None`"
            )  # noqa: E501
        if taker_address is not None and not re.search(
            r"^0x[0-9a-f]{40}$", taker_address
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `taker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
            )  # noqa: E501

        self._taker_address = taker_address

    @property
    def maker_fee(self):
        """Gets the maker_fee of this OrderSchema.  # noqa: E501


        :return: The maker_fee of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._maker_fee

    @maker_fee.setter
    def maker_fee(self, maker_fee):
        """Sets the maker_fee of this OrderSchema.


        :param maker_fee: The maker_fee of this OrderSchema.  # noqa: E501
        :type: str
        """
        if maker_fee is None:
            raise ValueError(
                "Invalid value for `maker_fee`, must not be `None`"
            )  # noqa: E501
        if maker_fee is not None and not re.search(
            r"^\\d+$", maker_fee
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `maker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._maker_fee = maker_fee

    @property
    def taker_fee(self):
        """Gets the taker_fee of this OrderSchema.  # noqa: E501


        :return: The taker_fee of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._taker_fee

    @taker_fee.setter
    def taker_fee(self, taker_fee):
        """Sets the taker_fee of this OrderSchema.


        :param taker_fee: The taker_fee of this OrderSchema.  # noqa: E501
        :type: str
        """
        if taker_fee is None:
            raise ValueError(
                "Invalid value for `taker_fee`, must not be `None`"
            )  # noqa: E501
        if taker_fee is not None and not re.search(
            r"^\\d+$", taker_fee
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `taker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._taker_fee = taker_fee

    @property
    def sender_address(self):
        """Gets the sender_address of this OrderSchema.  # noqa: E501


        :return: The sender_address of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._sender_address

    @sender_address.setter
    def sender_address(self, sender_address):
        """Sets the sender_address of this OrderSchema.


        :param sender_address: The sender_address of this OrderSchema.  # noqa: E501
        :type: str
        """
        if sender_address is None:
            raise ValueError(
                "Invalid value for `sender_address`, must not be `None`"
            )  # noqa: E501
        if sender_address is not None and not re.search(
            r"^0x[0-9a-f]{40}$", sender_address
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `sender_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
            )  # noqa: E501

        self._sender_address = sender_address

    @property
    def maker_asset_amount(self):
        """Gets the maker_asset_amount of this OrderSchema.  # noqa: E501


        :return: The maker_asset_amount of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._maker_asset_amount

    @maker_asset_amount.setter
    def maker_asset_amount(self, maker_asset_amount):
        """Sets the maker_asset_amount of this OrderSchema.


        :param maker_asset_amount: The maker_asset_amount of this OrderSchema.  # noqa: E501
        :type: str
        """
        if maker_asset_amount is None:
            raise ValueError(
                "Invalid value for `maker_asset_amount`, must not be `None`"
            )  # noqa: E501
        if maker_asset_amount is not None and not re.search(
            r"^\\d+$", maker_asset_amount
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `maker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._maker_asset_amount = maker_asset_amount

    @property
    def taker_asset_amount(self):
        """Gets the taker_asset_amount of this OrderSchema.  # noqa: E501


        :return: The taker_asset_amount of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._taker_asset_amount

    @taker_asset_amount.setter
    def taker_asset_amount(self, taker_asset_amount):
        """Sets the taker_asset_amount of this OrderSchema.


        :param taker_asset_amount: The taker_asset_amount of this OrderSchema.  # noqa: E501
        :type: str
        """
        if taker_asset_amount is None:
            raise ValueError(
                "Invalid value for `taker_asset_amount`, must not be `None`"
            )  # noqa: E501
        if taker_asset_amount is not None and not re.search(
            r"^\\d+$", taker_asset_amount
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `taker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._taker_asset_amount = taker_asset_amount

    @property
    def maker_asset_data(self):
        """Gets the maker_asset_data of this OrderSchema.  # noqa: E501


        :return: The maker_asset_data of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._maker_asset_data

    @maker_asset_data.setter
    def maker_asset_data(self, maker_asset_data):
        """Sets the maker_asset_data of this OrderSchema.


        :param maker_asset_data: The maker_asset_data of this OrderSchema.  # noqa: E501
        :type: str
        """
        if maker_asset_data is None:
            raise ValueError(
                "Invalid value for `maker_asset_data`, must not be `None`"
            )  # noqa: E501
        if maker_asset_data is not None and not re.search(
            r"^0x(([0-9a-f][0-9a-f])+)?$", maker_asset_data
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `maker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
            )  # noqa: E501

        self._maker_asset_data = maker_asset_data

    @property
    def taker_asset_data(self):
        """Gets the taker_asset_data of this OrderSchema.  # noqa: E501


        :return: The taker_asset_data of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._taker_asset_data

    @taker_asset_data.setter
    def taker_asset_data(self, taker_asset_data):
        """Sets the taker_asset_data of this OrderSchema.


        :param taker_asset_data: The taker_asset_data of this OrderSchema.  # noqa: E501
        :type: str
        """
        if taker_asset_data is None:
            raise ValueError(
                "Invalid value for `taker_asset_data`, must not be `None`"
            )  # noqa: E501
        if taker_asset_data is not None and not re.search(
            r"^0x(([0-9a-f][0-9a-f])+)?$", taker_asset_data
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `taker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
            )  # noqa: E501

        self._taker_asset_data = taker_asset_data

    @property
    def salt(self):
        """Gets the salt of this OrderSchema.  # noqa: E501


        :return: The salt of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._salt

    @salt.setter
    def salt(self, salt):
        """Sets the salt of this OrderSchema.


        :param salt: The salt of this OrderSchema.  # noqa: E501
        :type: str
        """
        if salt is None:
            raise ValueError(
                "Invalid value for `salt`, must not be `None`"
            )  # noqa: E501
        if salt is not None and not re.search(r"^\\d+$", salt):  # noqa: E501
            raise ValueError(
                r"Invalid value for `salt`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._salt = salt

    @property
    def exchange_address(self):
        """Gets the exchange_address of this OrderSchema.  # noqa: E501


        :return: The exchange_address of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._exchange_address

    @exchange_address.setter
    def exchange_address(self, exchange_address):
        """Sets the exchange_address of this OrderSchema.


        :param exchange_address: The exchange_address of this OrderSchema.  # noqa: E501
        :type: str
        """
        if exchange_address is None:
            raise ValueError(
                "Invalid value for `exchange_address`, must not be `None`"
            )  # noqa: E501
        if exchange_address is not None and not re.search(
            r"^0x[0-9a-f]{40}$", exchange_address
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `exchange_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
            )  # noqa: E501

        self._exchange_address = exchange_address

    @property
    def fee_recipient_address(self):
        """Gets the fee_recipient_address of this OrderSchema.  # noqa: E501


        :return: The fee_recipient_address of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._fee_recipient_address

    @fee_recipient_address.setter
    def fee_recipient_address(self, fee_recipient_address):
        """Sets the fee_recipient_address of this OrderSchema.


        :param fee_recipient_address: The fee_recipient_address of this OrderSchema.  # noqa: E501
        :type: str
        """
        if fee_recipient_address is None:
            raise ValueError(
                "Invalid value for `fee_recipient_address`, must not be `None`"
            )  # noqa: E501
        if fee_recipient_address is not None and not re.search(
            r"^0x[0-9a-f]{40}$", fee_recipient_address
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `fee_recipient_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
            )  # noqa: E501

        self._fee_recipient_address = fee_recipient_address

    @property
    def expiration_time_seconds(self):
        """Gets the expiration_time_seconds of this OrderSchema.  # noqa: E501


        :return: The expiration_time_seconds of this OrderSchema.  # noqa: E501
        :rtype: str
        """
        return self._expiration_time_seconds

    @expiration_time_seconds.setter
    def expiration_time_seconds(self, expiration_time_seconds):
        """Sets the expiration_time_seconds of this OrderSchema.


        :param expiration_time_seconds: The expiration_time_seconds of this OrderSchema.  # noqa: E501
        :type: str
        """
        if expiration_time_seconds is None:
            raise ValueError(
                "Invalid value for `expiration_time_seconds`, must not be `None`"
            )  # noqa: E501
        if expiration_time_seconds is not None and not re.search(
            r"^\\d+$", expiration_time_seconds
        ):  # noqa: E501
            raise ValueError(
                r"Invalid value for `expiration_time_seconds`, must be a follow pattern or equal to `/^\\d+$/`"
            )  # noqa: E501

        self._expiration_time_seconds = expiration_time_seconds

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(
                    map(
                        lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                        value,
                    )
                )
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(
                    map(
                        lambda item: (item[0], item[1].to_dict())
                        if hasattr(item[1], "to_dict")
                        else item,
                        value.items(),
                    )
                )
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, OrderSchema):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other