cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
node_map_inner.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 NodeMapInner(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  'image_id': 'str',
32  'instance_id': 'int',
33  'node_id': 'int',
34  'node_ip': 'str'
35  }
36 
37  attribute_map = {
38  'image_id': 'image_id',
39  'instance_id': 'instance_id',
40  'node_id': 'node_id',
41  'node_ip': 'node_ip'
42  }
43 
44  def __init__(self, image_id=None, instance_id=None, node_id=None, node_ip=None): # noqa: E501
45  """NodeMapInner - a model defined in Swagger""" # noqa: E501
46  self._image_id_image_id = None
47  self._instance_id_instance_id = None
48  self._node_id_node_id = None
49  self._node_ip_node_ip = None
50  self.discriminatordiscriminator = None
51  if image_id is not None:
52  self.image_idimage_idimage_idimage_id = image_id
53  if instance_id is not None:
54  self.instance_idinstance_idinstance_idinstance_id = instance_id
55  if node_id is not None:
56  self.node_idnode_idnode_idnode_id = node_id
57  if node_ip is not None:
58  self.node_ipnode_ipnode_ipnode_ip = node_ip
59 
60  @property
61  def image_id(self):
62  """Gets the image_id of this NodeMapInner. # noqa: E501
63 
64  ID of Image for that Node # noqa: E501
65 
66  :return: The image_id of this NodeMapInner. # noqa: E501
67  :rtype: str
68  """
69  return self._image_id_image_id
70 
71  @image_id.setter
72  def image_id(self, image_id):
73  """Sets the image_id of this NodeMapInner.
74 
75  ID of Image for that Node # noqa: E501
76 
77  :param image_id: The image_id of this NodeMapInner. # noqa: E501
78  :type: str
79  """
80 
81  self._image_id_image_id = image_id
82 
83  @property
84  def instance_id(self):
85  """Gets the instance_id of this NodeMapInner. # noqa: E501
86 
87  ID of the instance for that Node (set by the server) # noqa: E501
88 
89  :return: The instance_id of this NodeMapInner. # noqa: E501
90  :rtype: int
91  """
92  return self._instance_id_instance_id
93 
94  @instance_id.setter
95  def instance_id(self, instance_id):
96  """Sets the instance_id of this NodeMapInner.
97 
98  ID of the instance for that Node (set by the server) # noqa: E501
99 
100  :param instance_id: The instance_id of this NodeMapInner. # noqa: E501
101  :type: int
102  """
103 
104  self._instance_id_instance_id = instance_id
105 
106  @property
107  def node_id(self):
108  """Gets the node_id of this NodeMapInner. # noqa: E501
109 
110  ID of a Node # noqa: E501
111 
112  :return: The node_id of this NodeMapInner. # noqa: E501
113  :rtype: int
114  """
115  return self._node_id_node_id
116 
117  @node_id.setter
118  def node_id(self, node_id):
119  """Sets the node_id of this NodeMapInner.
120 
121  ID of a Node # noqa: E501
122 
123  :param node_id: The node_id of this NodeMapInner. # noqa: E501
124  :type: int
125  """
126 
127  self._node_id_node_id = node_id
128 
129  @property
130  def node_ip(self):
131  """Gets the node_ip of this NodeMapInner. # noqa: E501
132 
133  IP of a non-FPGA node (is used only if image_id=NON_FPGA) # noqa: E501
134 
135  :return: The node_ip of this NodeMapInner. # noqa: E501
136  :rtype: str
137  """
138  return self._node_ip_node_ip
139 
140  @node_ip.setter
141  def node_ip(self, node_ip):
142  """Sets the node_ip of this NodeMapInner.
143 
144  IP of a non-FPGA node (is used only if image_id=NON_FPGA) # noqa: E501
145 
146  :param node_ip: The node_ip of this NodeMapInner. # noqa: E501
147  :type: str
148  """
149 
150  self._node_ip_node_ip = node_ip
151 
152  def to_dict(self):
153  """Returns the model properties as a dict"""
154  result = {}
155 
156  for attr, _ in six.iteritems(self.swagger_typesswagger_types):
157  value = getattr(self, attr)
158  if isinstance(value, list):
159  result[attr] = list(map(
160  lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
161  value
162  ))
163  elif hasattr(value, "to_dict"):
164  result[attr] = value.to_dict()
165  elif isinstance(value, dict):
166  result[attr] = dict(map(
167  lambda item: (item[0], item[1].to_dict())
168  if hasattr(item[1], "to_dict") else item,
169  value.items()
170  ))
171  else:
172  result[attr] = value
173  if issubclass(NodeMapInner, dict):
174  for key, value in self.items():
175  result[key] = value
176 
177  return result
178 
179  def to_str(self):
180  """Returns the string representation of the model"""
181  return pprint.pformat(self.to_dictto_dict())
182 
183  def __repr__(self):
184  """For `print` and `pprint`"""
185  return self.to_strto_str()
186 
187  def __eq__(self, other):
188  """Returns true if both objects are equal"""
189  if not isinstance(other, NodeMapInner):
190  return False
191 
192  return self.__dict____dict__ == other.__dict__
193 
194  def __ne__(self, other):
195  """Returns true if both objects are not equal"""
196  return not self == other
def __init__(self, image_id=None, instance_id=None, node_id=None, node_ip=None)