source: src/mapservice/src-gen/openapi_server/models/water.py@ 5e4cb73

debian/bullseye
Last change on this file since 5e4cb73 was 5e4cb73, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

Refactored mapservice

  • mapservice is a connexion python webservice with openapi defined api
  • mapservice-webclient is a angular app, consuming the openapi webservice mapservice
  • Property mode set to 100644
File size: 5.3 KB
Line 
1# coding: utf-8
2
3from __future__ import absolute_import
4from datetime import date, datetime # noqa: F401
5
6from typing import List, Dict # noqa: F401
7
8from openapi_server.models.base_model_ import Model
9from openapi_server import util
10
11
12class Water(Model):
13 """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
14
15 Do not edit the class manually.
16 """
17
18 def __init__(self, water_id=None, name=None, manager=None, osm_id=None, osm_type=None, osm_class=None): # noqa: E501
19 """Water - a model defined in OpenAPI
20
21 :param water_id: The water_id of this Water. # noqa: E501
22 :type water_id: int
23 :param name: The name of this Water. # noqa: E501
24 :type name: str
25 :param manager: The manager of this Water. # noqa: E501
26 :type manager: str
27 :param osm_id: The osm_id of this Water. # noqa: E501
28 :type osm_id: int
29 :param osm_type: The osm_type of this Water. # noqa: E501
30 :type osm_type: str
31 :param osm_class: The osm_class of this Water. # noqa: E501
32 :type osm_class: str
33 """
34 self.openapi_types = {
35 'water_id': int,
36 'name': str,
37 'manager': str,
38 'osm_id': int,
39 'osm_type': str,
40 'osm_class': str
41 }
42
43 self.attribute_map = {
44 'water_id': 'water_id',
45 'name': 'name',
46 'manager': 'manager',
47 'osm_id': 'osm_id',
48 'osm_type': 'osm_type',
49 'osm_class': 'osm_class'
50 }
51
52 self._water_id = water_id
53 self._name = name
54 self._manager = manager
55 self._osm_id = osm_id
56 self._osm_type = osm_type
57 self._osm_class = osm_class
58
59 @classmethod
60 def from_dict(cls, dikt) -> 'Water':
61 """Returns the dict as a model
62
63 :param dikt: A dict.
64 :type: dict
65 :return: The Water of this Water. # noqa: E501
66 :rtype: Water
67 """
68 return util.deserialize_model(dikt, cls)
69
70 @property
71 def water_id(self):
72 """Gets the water_id of this Water.
73
74
75 :return: The water_id of this Water.
76 :rtype: int
77 """
78 return self._water_id
79
80 @water_id.setter
81 def water_id(self, water_id):
82 """Sets the water_id of this Water.
83
84
85 :param water_id: The water_id of this Water.
86 :type water_id: int
87 """
88 if water_id is None:
89 raise ValueError("Invalid value for `water_id`, must not be `None`") # noqa: E501
90
91 self._water_id = water_id
92
93 @property
94 def name(self):
95 """Gets the name of this Water.
96
97
98 :return: The name of this Water.
99 :rtype: str
100 """
101 return self._name
102
103 @name.setter
104 def name(self, name):
105 """Sets the name of this Water.
106
107
108 :param name: The name of this Water.
109 :type name: str
110 """
111 if name is None:
112 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
113
114 self._name = name
115
116 @property
117 def manager(self):
118 """Gets the manager of this Water.
119
120
121 :return: The manager of this Water.
122 :rtype: str
123 """
124 return self._manager
125
126 @manager.setter
127 def manager(self, manager):
128 """Sets the manager of this Water.
129
130
131 :param manager: The manager of this Water.
132 :type manager: str
133 """
134
135 self._manager = manager
136
137 @property
138 def osm_id(self):
139 """Gets the osm_id of this Water.
140
141
142 :return: The osm_id of this Water.
143 :rtype: int
144 """
145 return self._osm_id
146
147 @osm_id.setter
148 def osm_id(self, osm_id):
149 """Sets the osm_id of this Water.
150
151
152 :param osm_id: The osm_id of this Water.
153 :type osm_id: int
154 """
155
156 self._osm_id = osm_id
157
158 @property
159 def osm_type(self):
160 """Gets the osm_type of this Water.
161
162
163 :return: The osm_type of this Water.
164 :rtype: str
165 """
166 return self._osm_type
167
168 @osm_type.setter
169 def osm_type(self, osm_type):
170 """Sets the osm_type of this Water.
171
172
173 :param osm_type: The osm_type of this Water.
174 :type osm_type: str
175 """
176 if osm_type is not None and len(osm_type) > 1:
177 raise ValueError("Invalid value for `osm_type`, length must be less than or equal to `1`") # noqa: E501
178 if osm_type is not None and len(osm_type) < 1:
179 raise ValueError("Invalid value for `osm_type`, length must be greater than or equal to `1`") # noqa: E501
180
181 self._osm_type = osm_type
182
183 @property
184 def osm_class(self):
185 """Gets the osm_class of this Water.
186
187
188 :return: The osm_class of this Water.
189 :rtype: str
190 """
191 return self._osm_class
192
193 @osm_class.setter
194 def osm_class(self, osm_class):
195 """Sets the osm_class of this Water.
196
197
198 :param osm_class: The osm_class of this Water.
199 :type osm_class: str
200 """
201 if osm_class is not None and len(osm_class) > 1:
202 raise ValueError("Invalid value for `osm_class`, length must be less than or equal to `1`") # noqa: E501
203 if osm_class is not None and len(osm_class) < 1:
204 raise ValueError("Invalid value for `osm_class`, length must be greater than or equal to `1`") # noqa: E501
205
206 self._osm_class = osm_class
Note: See TracBrowser for help on using the repository browser.