cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
build_script.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 BuildScript(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  'comment': 'str',
32  'hash': 'str',
33  'hash_algorithm': 'str',
34  'name': 'str',
35  'version': 'str'
36  }
37 
38  attribute_map = {
39  'comment': 'comment',
40  'hash': 'hash',
41  'hash_algorithm': 'hash_algorithm',
42  'name': 'name',
43  'version': 'version'
44  }
45 
46  def __init__(self, comment=None, hash=None, hash_algorithm=None, name=None, version=None): # noqa: E501
47  """BuildScript - a model defined in Swagger""" # noqa: E501
48  self._comment_comment = None
49  self._hash_hash = None
50  self._hash_algorithm_hash_algorithm = None
51  self._name_name = None
52  self._version_version = None
53  self.discriminatordiscriminator = None
54  if comment is not None:
55  self.commentcommentcommentcomment = comment
56  if hash is not None:
57  self.hashhashhashhash = hash
58  if hash_algorithm is not None:
59  self.hash_algorithmhash_algorithmhash_algorithmhash_algorithm = hash_algorithm
60  if name is not None:
61  self.namenamenamename = name
62  if version is not None:
63  self.versionversionversionversion = version
64 
65  @property
66  def comment(self):
67  """Gets the comment of this BuildScript. # noqa: E501
68 
69  Some valuable information for humans # noqa: E501
70 
71  :return: The comment of this BuildScript. # noqa: E501
72  :rtype: str
73  """
74  return self._comment_comment
75 
76  @comment.setter
77  def comment(self, comment):
78  """Sets the comment of this BuildScript.
79 
80  Some valuable information for humans # noqa: E501
81 
82  :param comment: The comment of this BuildScript. # noqa: E501
83  :type: str
84  """
85 
86  self._comment_comment = comment
87 
88  @property
89  def hash(self):
90  """Gets the hash of this BuildScript. # noqa: E501
91 
92  Hash of the build script to register # noqa: E501
93 
94  :return: The hash of this BuildScript. # noqa: E501
95  :rtype: str
96  """
97  return self._hash_hash
98 
99  @hash.setter
100  def hash(self, hash):
101  """Sets the hash of this BuildScript.
102 
103  Hash of the build script to register # noqa: E501
104 
105  :param hash: The hash of this BuildScript. # noqa: E501
106  :type: str
107  """
108 
109  self._hash_hash = hash
110 
111  @property
112  def hash_algorithm(self):
113  """Gets the hash_algorithm of this BuildScript. # noqa: E501
114 
115  Algorithm used to create the hash # noqa: E501
116 
117  :return: The hash_algorithm of this BuildScript. # noqa: E501
118  :rtype: str
119  """
120  return self._hash_algorithm_hash_algorithm
121 
122  @hash_algorithm.setter
123  def hash_algorithm(self, hash_algorithm):
124  """Sets the hash_algorithm of this BuildScript.
125 
126  Algorithm used to create the hash # noqa: E501
127 
128  :param hash_algorithm: The hash_algorithm of this BuildScript. # noqa: E501
129  :type: str
130  """
131 
132  self._hash_algorithm_hash_algorithm = hash_algorithm
133 
134  @property
135  def name(self):
136  """Gets the name of this BuildScript. # noqa: E501
137 
138  Name of the build script # noqa: E501
139 
140  :return: The name of this BuildScript. # noqa: E501
141  :rtype: str
142  """
143  return self._name_name
144 
145  @name.setter
146  def name(self, name):
147  """Sets the name of this BuildScript.
148 
149  Name of the build script # noqa: E501
150 
151  :param name: The name of this BuildScript. # noqa: E501
152  :type: str
153  """
154 
155  self._name_name = name
156 
157  @property
158  def version(self):
159  """Gets the version of this BuildScript. # noqa: E501
160 
161  Version of the build script # noqa: E501
162 
163  :return: The version of this BuildScript. # noqa: E501
164  :rtype: str
165  """
166  return self._version_version
167 
168  @version.setter
169  def version(self, version):
170  """Sets the version of this BuildScript.
171 
172  Version of the build script # noqa: E501
173 
174  :param version: The version of this BuildScript. # noqa: E501
175  :type: str
176  """
177 
178  self._version_version = version
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(BuildScript, 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, BuildScript):
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, comment=None, hash=None, hash_algorithm=None, name=None, version=None)
Definition: build_script.py:46