RIC-642 related changes: REST subscription, rnib enhancements, symptomdata, rest...
[ric-plt/xapp-frame-py.git] / ricxappframe / subsclient / models / subscription_params_client_endpoint.py
1 # coding: utf-8
2
3 """
4     RIC subscription
5
6     This is the initial REST API for RIC subscription  # noqa: E501
7
8     OpenAPI spec version: 0.0.4
9     
10     Generated by: https://github.com/swagger-api/swagger-codegen.git
11 """
12
13
14 import pprint
15 import re  # noqa: F401
16
17 import six
18
19 from ricxappframe.subsclient.configuration import Configuration
20
21
22 class SubscriptionParamsClientEndpoint(object):
23     """NOTE: This class is auto generated by the swagger code generator program.
24
25     Do not edit the class manually.
26     """
27
28     """
29     Attributes:
30       swagger_types (dict): The key is attribute name
31                             and the value is attribute type.
32       attribute_map (dict): The key is attribute name
33                             and the value is json key in definition.
34     """
35     swagger_types = {
36         'host': 'str',
37         'http_port': 'int',
38         'rmr_port': 'int'
39     }
40
41     attribute_map = {
42         'host': 'Host',
43         'http_port': 'HTTPPort',
44         'rmr_port': 'RMRPort'
45     }
46
47     def __init__(self, host=None, http_port=None, rmr_port=None, _configuration=None):  # noqa: E501
48         """SubscriptionParamsClientEndpoint - a model defined in Swagger"""  # noqa: E501
49         if _configuration is None:
50             _configuration = Configuration()
51         self._configuration = _configuration
52
53         self._host = None
54         self._http_port = None
55         self._rmr_port = None
56         self.discriminator = None
57
58         if host is not None:
59             self.host = host
60         if http_port is not None:
61             self.http_port = http_port
62         if rmr_port is not None:
63             self.rmr_port = rmr_port
64
65     @property
66     def host(self):
67         """Gets the host of this SubscriptionParamsClientEndpoint.  # noqa: E501
68
69         xApp service address name like 'service-ricxapp-xappname-http.ricxapp'  # noqa: E501
70
71         :return: The host of this SubscriptionParamsClientEndpoint.  # noqa: E501
72         :rtype: str
73         """
74         return self._host
75
76     @host.setter
77     def host(self, host):
78         """Sets the host of this SubscriptionParamsClientEndpoint.
79
80         xApp service address name like 'service-ricxapp-xappname-http.ricxapp'  # noqa: E501
81
82         :param host: The host of this SubscriptionParamsClientEndpoint.  # noqa: E501
83         :type: str
84         """
85
86         self._host = host
87
88     @property
89     def http_port(self):
90         """Gets the http_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
91
92         xApp HTTP service address port  # noqa: E501
93
94         :return: The http_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
95         :rtype: int
96         """
97         return self._http_port
98
99     @http_port.setter
100     def http_port(self, http_port):
101         """Sets the http_port of this SubscriptionParamsClientEndpoint.
102
103         xApp HTTP service address port  # noqa: E501
104
105         :param http_port: The http_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
106         :type: int
107         """
108         if (self._configuration.client_side_validation and
109                 http_port is not None and http_port > 65535):  # noqa: E501
110             raise ValueError("Invalid value for `http_port`, must be a value less than or equal to `65535`")  # noqa: E501
111         if (self._configuration.client_side_validation and
112                 http_port is not None and http_port < 0):  # noqa: E501
113             raise ValueError("Invalid value for `http_port`, must be a value greater than or equal to `0`")  # noqa: E501
114
115         self._http_port = http_port
116
117     @property
118     def rmr_port(self):
119         """Gets the rmr_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
120
121         xApp RMR service address port  # noqa: E501
122
123         :return: The rmr_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
124         :rtype: int
125         """
126         return self._rmr_port
127
128     @rmr_port.setter
129     def rmr_port(self, rmr_port):
130         """Sets the rmr_port of this SubscriptionParamsClientEndpoint.
131
132         xApp RMR service address port  # noqa: E501
133
134         :param rmr_port: The rmr_port of this SubscriptionParamsClientEndpoint.  # noqa: E501
135         :type: int
136         """
137         if (self._configuration.client_side_validation and
138                 rmr_port is not None and rmr_port > 65535):  # noqa: E501
139             raise ValueError("Invalid value for `rmr_port`, must be a value less than or equal to `65535`")  # noqa: E501
140         if (self._configuration.client_side_validation and
141                 rmr_port is not None and rmr_port < 0):  # noqa: E501
142             raise ValueError("Invalid value for `rmr_port`, must be a value greater than or equal to `0`")  # noqa: E501
143
144         self._rmr_port = rmr_port
145
146     def to_dict(self):
147         """Returns the model properties as a dict"""
148         result = {}
149
150         for attr, _ in six.iteritems(self.swagger_types):
151             value = getattr(self, attr)
152             if isinstance(value, list):
153                 result[attr] = list(map(
154                     lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
155                     value
156                 ))
157             elif hasattr(value, "to_dict"):
158                 result[attr] = value.to_dict()
159             elif isinstance(value, dict):
160                 result[attr] = dict(map(
161                     lambda item: (item[0], item[1].to_dict())
162                     if hasattr(item[1], "to_dict") else item,
163                     value.items()
164                 ))
165             else:
166                 result[attr] = value
167         if issubclass(SubscriptionParamsClientEndpoint, dict):
168             for key, value in self.items():
169                 result[key] = value
170
171         return result
172
173     def to_str(self):
174         """Returns the string representation of the model"""
175         return pprint.pformat(self.to_dict())
176
177     def __repr__(self):
178         """For `print` and `pprint`"""
179         return self.to_str()
180
181     def __eq__(self, other):
182         """Returns true if both objects are equal"""
183         if not isinstance(other, SubscriptionParamsClientEndpoint):
184             return False
185
186         return self.to_dict() == other.to_dict()
187
188     def __ne__(self, other):
189         """Returns true if both objects are not equal"""
190         if not isinstance(other, SubscriptionParamsClientEndpoint):
191             return True
192
193         return self.to_dict() != other.to_dict()