cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
instance.py
Go to the documentation of this file.
1 # coding: utf-8
2 
3 """
4  cloudFPGA Resource Manager API
5 
6  No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7 
8  OpenAPI spec version: 0.8
9 
10  Generated by: https://github.com/swagger-api/swagger-codegen.git
11 """
12 
13 import pprint
14 import re # noqa: F401
15 
16 import six
17 
18 class Instance(object):
19  """NOTE: This class is auto generated by the swagger code generator program.
20 
21  Do not edit the class manually.
22  """
23  """
24  Attributes:
25  swagger_types (dict): The key is attribute name
26  and the value is attribute type.
27  attribute_map (dict): The key is attribute name
28  and the value is json key in definition.
29  """
30  swagger_types = {
31  'fpga_board': 'str',
32  'image_id': 'str',
33  'instance_id': 'int',
34  'project_name': 'str',
35  'role_ip': 'str',
36  'shell_type': 'str',
37  'slot_num': 'int',
38  'status': 'str',
39  'user_id': 'str'
40  }
41 
42  attribute_map = {
43  'fpga_board': 'fpga_board',
44  'image_id': 'image_id',
45  'instance_id': 'instance_id',
46  'project_name': 'project_name',
47  'role_ip': 'role_ip',
48  'shell_type': 'shell_type',
49  'slot_num': 'slot_num',
50  'status': 'status',
51  'user_id': 'user_id'
52  }
53 
54  def __init__(self, fpga_board=None, image_id=None, instance_id=None, project_name=None, role_ip=None, shell_type=None, slot_num=None, status=None, user_id=None): # noqa: E501
55  """Instance - a model defined in Swagger""" # noqa: E501
56  self._fpga_board_fpga_board = None
57  self._image_id_image_id = None
58  self._instance_id_instance_id = None
59  self._project_name_project_name = None
60  self._role_ip_role_ip = None
61  self._shell_type_shell_type = None
62  self._slot_num_slot_num = None
63  self._status_status = None
64  self._user_id_user_id = None
65  self.discriminatordiscriminator = None
66  if fpga_board is not None:
67  self.fpga_boardfpga_boardfpga_boardfpga_board = fpga_board
68  if image_id is not None:
69  self.image_idimage_idimage_idimage_id = image_id
70  if instance_id is not None:
71  self.instance_idinstance_idinstance_idinstance_id = instance_id
72  if project_name is not None:
73  self.project_nameproject_nameproject_nameproject_name = project_name
74  if role_ip is not None:
75  self.role_iprole_iprole_iprole_ip = role_ip
76  if shell_type is not None:
77  self.shell_typeshell_typeshell_typeshell_type = shell_type
78  if slot_num is not None:
79  self.slot_numslot_numslot_numslot_num = slot_num
80  if status is not None:
81  self.statusstatusstatusstatus = status
82  if user_id is not None:
83  self.user_iduser_iduser_iduser_id = user_id
84 
85  @property
86  def fpga_board(self):
87  """Gets the fpga_board of this Instance. # noqa: E501
88 
89  Type of cloudFPGA # noqa: E501
90 
91  :return: The fpga_board of this Instance. # noqa: E501
92  :rtype: str
93  """
94  return self._fpga_board_fpga_board
95 
96  @fpga_board.setter
97  def fpga_board(self, fpga_board):
98  """Sets the fpga_board of this Instance.
99 
100  Type of cloudFPGA # noqa: E501
101 
102  :param fpga_board: The fpga_board of this Instance. # noqa: E501
103  :type: str
104  """
105 
106  self._fpga_board_fpga_board = fpga_board
107 
108  @property
109  def image_id(self):
110  """Gets the image_id of this Instance. # noqa: E501
111 
112  Image ID # noqa: E501
113 
114  :return: The image_id of this Instance. # noqa: E501
115  :rtype: str
116  """
117  return self._image_id_image_id
118 
119  @image_id.setter
120  def image_id(self, image_id):
121  """Sets the image_id of this Instance.
122 
123  Image ID # noqa: E501
124 
125  :param image_id: The image_id of this Instance. # noqa: E501
126  :type: str
127  """
128 
129  self._image_id_image_id = image_id
130 
131  @property
132  def instance_id(self):
133  """Gets the instance_id of this Instance. # noqa: E501
134 
135  ID of the instance # noqa: E501
136 
137  :return: The instance_id of this Instance. # noqa: E501
138  :rtype: int
139  """
140  return self._instance_id_instance_id
141 
142  @instance_id.setter
143  def instance_id(self, instance_id):
144  """Sets the instance_id of this Instance.
145 
146  ID of the instance # noqa: E501
147 
148  :param instance_id: The instance_id of this Instance. # noqa: E501
149  :type: int
150  """
151 
152  self._instance_id_instance_id = instance_id
153 
154  @property
155  def project_name(self):
156  """Gets the project_name of this Instance. # noqa: E501
157 
158  Name of the OpenStack project the quota should be acounted to, if a user has multiple projects. # noqa: E501
159 
160  :return: The project_name of this Instance. # noqa: E501
161  :rtype: str
162  """
163  return self._project_name_project_name
164 
165  @project_name.setter
166  def project_name(self, project_name):
167  """Sets the project_name of this Instance.
168 
169  Name of the OpenStack project the quota should be acounted to, if a user has multiple projects. # noqa: E501
170 
171  :param project_name: The project_name of this Instance. # noqa: E501
172  :type: str
173  """
174 
175  self._project_name_project_name = project_name
176 
177  @property
178  def role_ip(self):
179  """Gets the role_ip of this Instance. # noqa: E501
180 
181  IP of sled manager # noqa: E501
182 
183  :return: The role_ip of this Instance. # noqa: E501
184  :rtype: str
185  """
186  return self._role_ip_role_ip
187 
188  @role_ip.setter
189  def role_ip(self, role_ip):
190  """Sets the role_ip of this Instance.
191 
192  IP of sled manager # noqa: E501
193 
194  :param role_ip: The role_ip of this Instance. # noqa: E501
195  :type: str
196  """
197 
198  self._role_ip_role_ip = role_ip
199 
200  @property
201  def shell_type(self):
202  """Gets the shell_type of this Instance. # noqa: E501
203 
204  Type of the current Shell (interface) of the FPGA # noqa: E501
205 
206  :return: The shell_type of this Instance. # noqa: E501
207  :rtype: str
208  """
209  return self._shell_type_shell_type
210 
211  @shell_type.setter
212  def shell_type(self, shell_type):
213  """Sets the shell_type of this Instance.
214 
215  Type of the current Shell (interface) of the FPGA # noqa: E501
216 
217  :param shell_type: The shell_type of this Instance. # noqa: E501
218  :type: str
219  """
220 
221  self._shell_type_shell_type = shell_type
222 
223  @property
224  def slot_num(self):
225  """Gets the slot_num of this Instance. # noqa: E501
226 
227  Slot number of resource # noqa: E501
228 
229  :return: The slot_num of this Instance. # noqa: E501
230  :rtype: int
231  """
232  return self._slot_num_slot_num
233 
234  @slot_num.setter
235  def slot_num(self, slot_num):
236  """Sets the slot_num of this Instance.
237 
238  Slot number of resource # noqa: E501
239 
240  :param slot_num: The slot_num of this Instance. # noqa: E501
241  :type: int
242  """
243 
244  self._slot_num_slot_num = slot_num
245 
246  @property
247  def status(self):
248  """Gets the status of this Instance. # noqa: E501
249 
250  Status of instance # noqa: E501
251 
252  :return: The status of this Instance. # noqa: E501
253  :rtype: str
254  """
255  return self._status_status
256 
257  @status.setter
258  def status(self, status):
259  """Sets the status of this Instance.
260 
261  Status of instance # noqa: E501
262 
263  :param status: The status of this Instance. # noqa: E501
264  :type: str
265  """
266 
267  self._status_status = status
268 
269  @property
270  def user_id(self):
271  """Gets the user_id of this Instance. # noqa: E501
272 
273  User ID # noqa: E501
274 
275  :return: The user_id of this Instance. # noqa: E501
276  :rtype: str
277  """
278  return self._user_id_user_id
279 
280  @user_id.setter
281  def user_id(self, user_id):
282  """Sets the user_id of this Instance.
283 
284  User ID # noqa: E501
285 
286  :param user_id: The user_id of this Instance. # noqa: E501
287  :type: str
288  """
289 
290  self._user_id_user_id = user_id
291 
292  def to_dict(self):
293  """Returns the model properties as a dict"""
294  result = {}
295 
296  for attr, _ in six.iteritems(self.swagger_typesswagger_types):
297  value = getattr(self, attr)
298  if isinstance(value, list):
299  result[attr] = list(map(
300  lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
301  value
302  ))
303  elif hasattr(value, "to_dict"):
304  result[attr] = value.to_dict()
305  elif isinstance(value, dict):
306  result[attr] = dict(map(
307  lambda item: (item[0], item[1].to_dict())
308  if hasattr(item[1], "to_dict") else item,
309  value.items()
310  ))
311  else:
312  result[attr] = value
313  if issubclass(Instance, dict):
314  for key, value in self.items():
315  result[key] = value
316 
317  return result
318 
319  def to_str(self):
320  """Returns the string representation of the model"""
321  return pprint.pformat(self.to_dictto_dict())
322 
323  def __repr__(self):
324  """For `print` and `pprint`"""
325  return self.to_strto_str()
326 
327  def __eq__(self, other):
328  """Returns true if both objects are equal"""
329  if not isinstance(other, Instance):
330  return False
331 
332  return self.__dict____dict__ == other.__dict__
333 
334  def __ne__(self, other):
335  """Returns true if both objects are not equal"""
336  return not self == other
def __init__(self, fpga_board=None, image_id=None, instance_id=None, project_name=None, role_ip=None, shell_type=None, slot_num=None, status=None, user_id=None)
Definition: instance.py:54