cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
instance_id_api_gateway_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 
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  'custom_request_method': 'str',
32  'custom_request_uri': 'str',
33  'custom_request_payload': 'str'
34  }
35 
36  attribute_map = {
37  'custom_request_method': 'custom_request_method',
38  'custom_request_uri': 'custom_request_uri',
39  'custom_request_payload': 'custom_request_payload'
40  }
41 
42  def __init__(self, custom_request_method=None, custom_request_uri=None, custom_request_payload=None): # noqa: E501
43  """InstanceIdApiGatewayBody - a model defined in Swagger""" # noqa: E501
44  self._custom_request_method_custom_request_method = None
45  self._custom_request_uri_custom_request_uri = None
46  self._custom_request_payload_custom_request_payload = None
47  self.discriminatordiscriminator = None
48  self.custom_request_methodcustom_request_methodcustom_request_methodcustom_request_method = custom_request_method
49  self.custom_request_uricustom_request_uricustom_request_uricustom_request_uri = custom_request_uri
50  if custom_request_payload is not None:
51  self.custom_request_payloadcustom_request_payloadcustom_request_payloadcustom_request_payload = custom_request_payload
52 
53  @property
55  """Gets the custom_request_method of this InstanceIdApiGatewayBody. # noqa: E501
56 
57  The METHOD of the custom API request # noqa: E501
58 
59  :return: The custom_request_method of this InstanceIdApiGatewayBody. # noqa: E501
60  :rtype: str
61  """
62  return self._custom_request_method_custom_request_method
63 
64  @custom_request_method.setter
65  def custom_request_method(self, custom_request_method):
66  """Sets the custom_request_method of this InstanceIdApiGatewayBody.
67 
68  The METHOD of the custom API request # noqa: E501
69 
70  :param custom_request_method: The custom_request_method of this InstanceIdApiGatewayBody. # noqa: E501
71  :type: str
72  """
73  if custom_request_method is None:
74  raise ValueError("Invalid value for `custom_request_method`, must not be `None`") # noqa: E501
75 
76  self._custom_request_method_custom_request_method = custom_request_method
77 
78  @property
79  def custom_request_uri(self):
80  """Gets the custom_request_uri of this InstanceIdApiGatewayBody. # noqa: E501
81 
82  The URI (i.e. path) of the custom API request # noqa: E501
83 
84  :return: The custom_request_uri of this InstanceIdApiGatewayBody. # noqa: E501
85  :rtype: str
86  """
87  return self._custom_request_uri_custom_request_uri
88 
89  @custom_request_uri.setter
90  def custom_request_uri(self, custom_request_uri):
91  """Sets the custom_request_uri of this InstanceIdApiGatewayBody.
92 
93  The URI (i.e. path) of the custom API request # noqa: E501
94 
95  :param custom_request_uri: The custom_request_uri of this InstanceIdApiGatewayBody. # noqa: E501
96  :type: str
97  """
98  if custom_request_uri is None:
99  raise ValueError("Invalid value for `custom_request_uri`, must not be `None`") # noqa: E501
100 
101  self._custom_request_uri_custom_request_uri = custom_request_uri
102 
103  @property
105  """Gets the custom_request_payload of this InstanceIdApiGatewayBody. # noqa: E501
106 
107  The PAYLPOAD (i.e. body) of the custom API request # noqa: E501
108 
109  :return: The custom_request_payload of this InstanceIdApiGatewayBody. # noqa: E501
110  :rtype: str
111  """
112  return self._custom_request_payload_custom_request_payload
113 
114  @custom_request_payload.setter
115  def custom_request_payload(self, custom_request_payload):
116  """Sets the custom_request_payload of this InstanceIdApiGatewayBody.
117 
118  The PAYLPOAD (i.e. body) of the custom API request # noqa: E501
119 
120  :param custom_request_payload: The custom_request_payload of this InstanceIdApiGatewayBody. # noqa: E501
121  :type: str
122  """
123 
124  self._custom_request_payload_custom_request_payload = custom_request_payload
125 
126  def to_dict(self):
127  """Returns the model properties as a dict"""
128  result = {}
129 
130  for attr, _ in six.iteritems(self.swagger_typesswagger_types):
131  value = getattr(self, attr)
132  if isinstance(value, list):
133  result[attr] = list(map(
134  lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
135  value
136  ))
137  elif hasattr(value, "to_dict"):
138  result[attr] = value.to_dict()
139  elif isinstance(value, dict):
140  result[attr] = dict(map(
141  lambda item: (item[0], item[1].to_dict())
142  if hasattr(item[1], "to_dict") else item,
143  value.items()
144  ))
145  else:
146  result[attr] = value
147  if issubclass(InstanceIdApiGatewayBody, dict):
148  for key, value in self.items():
149  result[key] = value
150 
151  return result
152 
153  def to_str(self):
154  """Returns the string representation of the model"""
155  return pprint.pformat(self.to_dictto_dict())
156 
157  def __repr__(self):
158  """For `print` and `pprint`"""
159  return self.to_strto_str()
160 
161  def __eq__(self, other):
162  """Returns true if both objects are equal"""
163  if not isinstance(other, InstanceIdApiGatewayBody):
164  return False
165 
166  return self.__dict____dict__ == other.__dict__
167 
168  def __ne__(self, other):
169  """Returns true if both objects are not equal"""
170  return not self == other
def __init__(self, custom_request_method=None, custom_request_uri=None, custom_request_payload=None)