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