aboutsummaryrefslogtreecommitdiffstats
path: root/python-packages/sra_client/sra_client/models/relayer_api_order_config_payload_schema.py
blob: 8d19d80e2c41e34c575cff0b62d0132b9563c147 (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
# coding: utf-8


import pprint
import re  # noqa: F401

import six


class RelayerApiOrderConfigPayloadSchema(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_asset_amount": "str",
        "taker_asset_amount": "str",
        "maker_asset_data": "str",
        "taker_asset_data": "str",
        "exchange_address": "str",
        "expiration_time_seconds": "str",
    }

    attribute_map = {
        "maker_address": "makerAddress",
        "taker_address": "takerAddress",
        "maker_asset_amount": "makerAssetAmount",
        "taker_asset_amount": "takerAssetAmount",
        "maker_asset_data": "makerAssetData",
        "taker_asset_data": "takerAssetData",
        "exchange_address": "exchangeAddress",
        "expiration_time_seconds": "expirationTimeSeconds",
    }

    def __init__(
        self,
        maker_address=None,
        taker_address=None,
        maker_asset_amount=None,
        taker_asset_amount=None,
        maker_asset_data=None,
        taker_asset_data=None,
        exchange_address=None,
        expiration_time_seconds=None,
    ):  # noqa: E501
        """RelayerApiOrderConfigPayloadSchema - a model defined in OpenAPI"""  # noqa: E501

        self._maker_address = None
        self._taker_address = None
        self._maker_asset_amount = None
        self._taker_asset_amount = None
        self._maker_asset_data = None
        self._taker_asset_data = None
        self._exchange_address = None
        self._expiration_time_seconds = None
        self.discriminator = None

        self.maker_address = maker_address
        self.taker_address = taker_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.exchange_address = exchange_address
        self.expiration_time_seconds = expiration_time_seconds

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


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

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


        :param maker_address: The maker_address of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.  # noqa: E501


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

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


        :param taker_address: The taker_address of this RelayerApiOrderConfigPayloadSchema.  # 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_asset_amount(self):
        """Gets the maker_asset_amount of this RelayerApiOrderConfigPayloadSchema.  # noqa: E501


        :return: The maker_asset_amount of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.


        :param maker_asset_amount: The maker_asset_amount of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.  # noqa: E501


        :return: The taker_asset_amount of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.


        :param taker_asset_amount: The taker_asset_amount of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.  # noqa: E501


        :return: The maker_asset_data of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.


        :param maker_asset_data: The maker_asset_data of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.  # noqa: E501


        :return: The taker_asset_data of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.


        :param taker_asset_data: The taker_asset_data of this RelayerApiOrderConfigPayloadSchema.  # 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 exchange_address(self):
        """Gets the exchange_address of this RelayerApiOrderConfigPayloadSchema.  # noqa: E501


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

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


        :param exchange_address: The exchange_address of this RelayerApiOrderConfigPayloadSchema.  # 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 expiration_time_seconds(self):
        """Gets the expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema.  # noqa: E501


        :return: The expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema.  # 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 RelayerApiOrderConfigPayloadSchema.


        :param expiration_time_seconds: The expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema.  # 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, RelayerApiOrderConfigPayloadSchema):
            return False

        return self.__dict__ == other.__dict__

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