forked from CircleCI-Public/sample-python-cfd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu_item.py
More file actions
190 lines (143 loc) · 4.74 KB
/
menu_item.py
File metadata and controls
190 lines (143 loc) · 4.74 KB
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
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from openapi_server.models.base_model_ import Model
from openapi_server import util
class MenuItem(Model):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
"""
def __init__(
self, id=None, description=None, name=None, price=None, image_id=None
): # noqa: E501
"""MenuItem - a model defined in OpenAPI
:param id: The id of this MenuItem. # noqa: E501
:type id: int
:param description: The description of this MenuItem. # noqa: E501
:type description: str
:param name: The name of this MenuItem. # noqa: E501
:type name: str
:param price: The price of this MenuItem. # noqa: E501
:type price: float
:param image_id: The image_id of this MenuItem. # noqa: E501
:type image_id: int
"""
self.openapi_types = {
"id": int,
"description": str,
"name": str,
"price": float,
"image_id": int,
}
self.attribute_map = {
"id": "id",
"description": "description",
"name": "name",
"price": "price",
"image_id": "imageId",
}
self._id = id
self._description = description
self._name = name
self._price = price
self._image_id = image_id
@classmethod
def from_dict(cls, dikt) -> "MenuItem":
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The MenuItem of this MenuItem. # noqa: E501
:rtype: MenuItem
"""
return util.deserialize_model(dikt, cls)
@property
def id(self):
"""Gets the id of this MenuItem.
:return: The id of this MenuItem.
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this MenuItem.
:param id: The id of this MenuItem.
:type id: int
"""
if id is None:
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
self._id = id
@property
def description(self):
"""Gets the description of this MenuItem.
:return: The description of this MenuItem.
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this MenuItem.
:param description: The description of this MenuItem.
:type description: str
"""
if description is None:
raise ValueError(
"Invalid value for `description`, must not be `None`"
) # noqa: E501
self._description = description
@property
def name(self):
"""Gets the name of this MenuItem.
:return: The name of this MenuItem.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this MenuItem.
:param name: The name of this MenuItem.
:type name: str
"""
if name is None:
raise ValueError(
"Invalid value for `name`, must not be `None`"
) # noqa: E501
self._name = name
@property
def price(self):
"""Gets the price of this MenuItem.
:return: The price of this MenuItem.
:rtype: float
"""
return self._price
@price.setter
def price(self, price):
"""Sets the price of this MenuItem.
:param price: The price of this MenuItem.
:type price: float
"""
if price is None:
raise ValueError(
"Invalid value for `price`, must not be `None`"
) # noqa: E501
self._price = price
@property
def image_id(self):
"""Gets the image_id of this MenuItem.
URL to an image of the menu item. This should be the image from the /image endpoint # noqa: E501
:return: The image_id of this MenuItem.
:rtype: int
"""
return self._image_id
@image_id.setter
def image_id(self, image_id):
"""Sets the image_id of this MenuItem.
URL to an image of the menu item. This should be the image from the /image endpoint # noqa: E501
:param image_id: The image_id of this MenuItem.
:type image_id: int
"""
if image_id is None:
raise ValueError(
"Invalid value for `image_id`, must not be `None`"
) # noqa: E501
self._image_id = image_id