cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
instance_id_runlevel_body.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 InstanceIdRunlevelBody(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  'new_runlevel': 'int'
32  }
33 
34  attribute_map = {
35  'new_runlevel': 'new_runlevel'
36  }
37 
38  def __init__(self, new_runlevel=None): # noqa: E501
39  """InstanceIdRunlevelBody - a model defined in Swagger""" # noqa: E501
40  self._new_runlevel_new_runlevel = None
41  self.discriminatordiscriminator = None
42  self.new_runlevelnew_runlevelnew_runlevelnew_runlevel = new_runlevel
43 
44  @property
45  def new_runlevel(self):
46  """Gets the new_runlevel of this InstanceIdRunlevelBody. # noqa: E501
47 
48 
49  :return: The new_runlevel of this InstanceIdRunlevelBody. # noqa: E501
50  :rtype: int
51  """
52  return self._new_runlevel_new_runlevel
53 
54  @new_runlevel.setter
55  def new_runlevel(self, new_runlevel):
56  """Sets the new_runlevel of this InstanceIdRunlevelBody.
57 
58 
59  :param new_runlevel: The new_runlevel of this InstanceIdRunlevelBody. # noqa: E501
60  :type: int
61  """
62  if new_runlevel is None:
63  raise ValueError("Invalid value for `new_runlevel`, must not be `None`") # noqa: E501
64 
65  self._new_runlevel_new_runlevel = new_runlevel
66 
67  def to_dict(self):
68  """Returns the model properties as a dict"""
69  result = {}
70 
71  for attr, _ in six.iteritems(self.swagger_typesswagger_types):
72  value = getattr(self, attr)
73  if isinstance(value, list):
74  result[attr] = list(map(
75  lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
76  value
77  ))
78  elif hasattr(value, "to_dict"):
79  result[attr] = value.to_dict()
80  elif isinstance(value, dict):
81  result[attr] = dict(map(
82  lambda item: (item[0], item[1].to_dict())
83  if hasattr(item[1], "to_dict") else item,
84  value.items()
85  ))
86  else:
87  result[attr] = value
88  if issubclass(InstanceIdRunlevelBody, dict):
89  for key, value in self.items():
90  result[key] = value
91 
92  return result
93 
94  def to_str(self):
95  """Returns the string representation of the model"""
96  return pprint.pformat(self.to_dictto_dict())
97 
98  def __repr__(self):
99  """For `print` and `pprint`"""
100  return self.to_strto_str()
101 
102  def __eq__(self, other):
103  """Returns true if both objects are equal"""
104  if not isinstance(other, InstanceIdRunlevelBody):
105  return False
106 
107  return self.__dict____dict__ == other.__dict__
108 
109  def __ne__(self, other):
110  """Returns true if both objects are not equal"""
111  return not self == other