cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
image.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 Image(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  'breed': 'str',
32  'comment': 'str',
33  'fpga_board': 'str',
34  'id': 'str',
35  'shell_type': 'str'
36  }
37 
38  attribute_map = {
39  'breed': 'breed',
40  'comment': 'comment',
41  'fpga_board': 'fpga_board',
42  'id': 'id',
43  'shell_type': 'shell_type'
44  }
45 
46  def __init__(self, breed=None, comment=None, fpga_board=None, id=None, shell_type=None): # noqa: E501
47  """Image - a model defined in Swagger""" # noqa: E501
48  self._breed_breed = None
49  self._comment_comment = None
50  self._fpga_board_fpga_board = None
51  self._id_id = None
52  self._shell_type_shell_type = None
53  self.discriminatordiscriminator = None
54  if breed is not None:
55  self.breedbreedbreedbreed = breed
56  if comment is not None:
57  self.commentcommentcommentcomment = comment
58  if fpga_board is not None:
59  self.fpga_boardfpga_boardfpga_boardfpga_board = fpga_board
60  if id is not None:
61  self.idididid = id
62  if shell_type is not None:
63  self.shell_typeshell_typeshell_typeshell_type = shell_type
64 
65  @property
66  def breed(self):
67  """Gets the breed of this Image. # noqa: E501
68 
69  SHELL or ROLE; SHELL is only allowed by admins # noqa: E501
70 
71  :return: The breed of this Image. # noqa: E501
72  :rtype: str
73  """
74  return self._breed_breed
75 
76  @breed.setter
77  def breed(self, breed):
78  """Sets the breed of this Image.
79 
80  SHELL or ROLE; SHELL is only allowed by admins # noqa: E501
81 
82  :param breed: The breed of this Image. # noqa: E501
83  :type: str
84  """
85 
86  self._breed_breed = breed
87 
88  @property
89  def comment(self):
90  """Gets the comment of this Image. # noqa: E501
91 
92  Some valuable information for humans (optional) # noqa: E501
93 
94  :return: The comment of this Image. # noqa: E501
95  :rtype: str
96  """
97  return self._comment_comment
98 
99  @comment.setter
100  def comment(self, comment):
101  """Sets the comment of this Image.
102 
103  Some valuable information for humans (optional) # noqa: E501
104 
105  :param comment: The comment of this Image. # noqa: E501
106  :type: str
107  """
108 
109  self._comment_comment = comment
110 
111  @property
112  def fpga_board(self):
113  """Gets the fpga_board of this Image. # noqa: E501
114 
115  Type of cloudFPGA (for SHELL only) # noqa: E501
116 
117  :return: The fpga_board of this Image. # noqa: E501
118  :rtype: str
119  """
120  return self._fpga_board_fpga_board
121 
122  @fpga_board.setter
123  def fpga_board(self, fpga_board):
124  """Sets the fpga_board of this Image.
125 
126  Type of cloudFPGA (for SHELL only) # noqa: E501
127 
128  :param fpga_board: The fpga_board of this Image. # noqa: E501
129  :type: str
130  """
131 
132  self._fpga_board_fpga_board = fpga_board
133 
134  @property
135  def id(self):
136  """Gets the id of this Image. # noqa: E501
137 
138  ID of the Image # noqa: E501
139 
140  :return: The id of this Image. # noqa: E501
141  :rtype: str
142  """
143  return self._id_id
144 
145  @id.setter
146  def id(self, id):
147  """Sets the id of this Image.
148 
149  ID of the Image # noqa: E501
150 
151  :param id: The id of this Image. # noqa: E501
152  :type: str
153  """
154 
155  self._id_id = id
156 
157  @property
158  def shell_type(self):
159  """Gets the shell_type of this Image. # noqa: E501
160 
161  Shell type as interface # noqa: E501
162 
163  :return: The shell_type of this Image. # noqa: E501
164  :rtype: str
165  """
166  return self._shell_type_shell_type
167 
168  @shell_type.setter
169  def shell_type(self, shell_type):
170  """Sets the shell_type of this Image.
171 
172  Shell type as interface # noqa: E501
173 
174  :param shell_type: The shell_type of this Image. # noqa: E501
175  :type: str
176  """
177 
178  self._shell_type_shell_type = shell_type
179 
180  def to_dict(self):
181  """Returns the model properties as a dict"""
182  result = {}
183 
184  for attr, _ in six.iteritems(self.swagger_typesswagger_types):
185  value = getattr(self, attr)
186  if isinstance(value, list):
187  result[attr] = list(map(
188  lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
189  value
190  ))
191  elif hasattr(value, "to_dict"):
192  result[attr] = value.to_dict()
193  elif isinstance(value, dict):
194  result[attr] = dict(map(
195  lambda item: (item[0], item[1].to_dict())
196  if hasattr(item[1], "to_dict") else item,
197  value.items()
198  ))
199  else:
200  result[attr] = value
201  if issubclass(Image, dict):
202  for key, value in self.items():
203  result[key] = value
204 
205  return result
206 
207  def to_str(self):
208  """Returns the string representation of the model"""
209  return pprint.pformat(self.to_dictto_dict())
210 
211  def __repr__(self):
212  """For `print` and `pprint`"""
213  return self.to_strto_str()
214 
215  def __eq__(self, other):
216  """Returns true if both objects are equal"""
217  if not isinstance(other, Image):
218  return False
219 
220  return self.__dict____dict__ == other.__dict__
221 
222  def __ne__(self, other):
223  """Returns true if both objects are not equal"""
224  return not self == other
def __init__(self, breed=None, comment=None, fpga_board=None, id=None, shell_type=None)
Definition: image.py:46