RIC-642 related changes: REST subscription, rnib enhancements, symptomdata, rest...
[ric-plt/xapp-frame-py.git] / ricxappframe / subsclient / models / subscription_params.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 SubscriptionParams(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         'subscription_id': 'str',
37         'client_endpoint': 'SubscriptionParamsClientEndpoint',
38         'meid': 'str',
39         'ran_function_id': 'int',
40         'e2_subscription_directives': 'SubscriptionParamsE2SubscriptionDirectives',
41         'subscription_details': 'SubscriptionDetailsList'
42     }
43
44     attribute_map = {
45         'subscription_id': 'SubscriptionId',
46         'client_endpoint': 'ClientEndpoint',
47         'meid': 'Meid',
48         'ran_function_id': 'RANFunctionID',
49         'e2_subscription_directives': 'E2SubscriptionDirectives',
50         'subscription_details': 'SubscriptionDetails'
51     }
52
53     def __init__(self, subscription_id=None, client_endpoint=None, meid=None, ran_function_id=None, e2_subscription_directives=None, subscription_details=None, _configuration=None):  # noqa: E501
54         """SubscriptionParams - a model defined in Swagger"""  # noqa: E501
55         if _configuration is None:
56             _configuration = Configuration()
57         self._configuration = _configuration
58
59         self._subscription_id = None
60         self._client_endpoint = None
61         self._meid = None
62         self._ran_function_id = None
63         self._e2_subscription_directives = None
64         self._subscription_details = None
65         self.discriminator = None
66
67         if subscription_id is not None:
68             self.subscription_id = subscription_id
69         self.client_endpoint = client_endpoint
70         self.meid = meid
71         self.ran_function_id = ran_function_id
72         if e2_subscription_directives is not None:
73             self.e2_subscription_directives = e2_subscription_directives
74         self.subscription_details = subscription_details
75
76     @property
77     def subscription_id(self):
78         """Gets the subscription_id of this SubscriptionParams.  # noqa: E501
79
80         Optional subscription ID (Submgr allocates if not given)  # noqa: E501
81
82         :return: The subscription_id of this SubscriptionParams.  # noqa: E501
83         :rtype: str
84         """
85         return self._subscription_id
86
87     @subscription_id.setter
88     def subscription_id(self, subscription_id):
89         """Sets the subscription_id of this SubscriptionParams.
90
91         Optional subscription ID (Submgr allocates if not given)  # noqa: E501
92
93         :param subscription_id: The subscription_id of this SubscriptionParams.  # noqa: E501
94         :type: str
95         """
96
97         self._subscription_id = subscription_id
98
99     @property
100     def client_endpoint(self):
101         """Gets the client_endpoint of this SubscriptionParams.  # noqa: E501
102
103
104         :return: The client_endpoint of this SubscriptionParams.  # noqa: E501
105         :rtype: SubscriptionParamsClientEndpoint
106         """
107         return self._client_endpoint
108
109     @client_endpoint.setter
110     def client_endpoint(self, client_endpoint):
111         """Sets the client_endpoint of this SubscriptionParams.
112
113
114         :param client_endpoint: The client_endpoint of this SubscriptionParams.  # noqa: E501
115         :type: SubscriptionParamsClientEndpoint
116         """
117         if self._configuration.client_side_validation and client_endpoint is None:
118             raise ValueError("Invalid value for `client_endpoint`, must not be `None`")  # noqa: E501
119
120         self._client_endpoint = client_endpoint
121
122     @property
123     def meid(self):
124         """Gets the meid of this SubscriptionParams.  # noqa: E501
125
126
127         :return: The meid of this SubscriptionParams.  # noqa: E501
128         :rtype: str
129         """
130         return self._meid
131
132     @meid.setter
133     def meid(self, meid):
134         """Sets the meid of this SubscriptionParams.
135
136
137         :param meid: The meid of this SubscriptionParams.  # noqa: E501
138         :type: str
139         """
140         if self._configuration.client_side_validation and meid is None:
141             raise ValueError("Invalid value for `meid`, must not be `None`")  # noqa: E501
142
143         self._meid = meid
144
145     @property
146     def ran_function_id(self):
147         """Gets the ran_function_id of this SubscriptionParams.  # noqa: E501
148
149
150         :return: The ran_function_id of this SubscriptionParams.  # noqa: E501
151         :rtype: int
152         """
153         return self._ran_function_id
154
155     @ran_function_id.setter
156     def ran_function_id(self, ran_function_id):
157         """Sets the ran_function_id of this SubscriptionParams.
158
159
160         :param ran_function_id: The ran_function_id of this SubscriptionParams.  # noqa: E501
161         :type: int
162         """
163         if self._configuration.client_side_validation and ran_function_id is None:
164             raise ValueError("Invalid value for `ran_function_id`, must not be `None`")  # noqa: E501
165         if (self._configuration.client_side_validation and
166                 ran_function_id is not None and ran_function_id > 4095):  # noqa: E501
167             raise ValueError("Invalid value for `ran_function_id`, must be a value less than or equal to `4095`")  # noqa: E501
168         if (self._configuration.client_side_validation and
169                 ran_function_id is not None and ran_function_id < 0):  # noqa: E501
170             raise ValueError("Invalid value for `ran_function_id`, must be a value greater than or equal to `0`")  # noqa: E501
171
172         self._ran_function_id = ran_function_id
173
174     @property
175     def e2_subscription_directives(self):
176         """Gets the e2_subscription_directives of this SubscriptionParams.  # noqa: E501
177
178
179         :return: The e2_subscription_directives of this SubscriptionParams.  # noqa: E501
180         :rtype: SubscriptionParamsE2SubscriptionDirectives
181         """
182         return self._e2_subscription_directives
183
184     @e2_subscription_directives.setter
185     def e2_subscription_directives(self, e2_subscription_directives):
186         """Sets the e2_subscription_directives of this SubscriptionParams.
187
188
189         :param e2_subscription_directives: The e2_subscription_directives of this SubscriptionParams.  # noqa: E501
190         :type: SubscriptionParamsE2SubscriptionDirectives
191         """
192
193         self._e2_subscription_directives = e2_subscription_directives
194
195     @property
196     def subscription_details(self):
197         """Gets the subscription_details of this SubscriptionParams.  # noqa: E501
198
199
200         :return: The subscription_details of this SubscriptionParams.  # noqa: E501
201         :rtype: SubscriptionDetailsList
202         """
203         return self._subscription_details
204
205     @subscription_details.setter
206     def subscription_details(self, subscription_details):
207         """Sets the subscription_details of this SubscriptionParams.
208
209
210         :param subscription_details: The subscription_details of this SubscriptionParams.  # noqa: E501
211         :type: SubscriptionDetailsList
212         """
213         if self._configuration.client_side_validation and subscription_details is None:
214             raise ValueError("Invalid value for `subscription_details`, must not be `None`")  # noqa: E501
215
216         self._subscription_details = subscription_details
217
218     def to_dict(self):
219         """Returns the model properties as a dict"""
220         result = {}
221
222         for attr, _ in six.iteritems(self.swagger_types):
223             value = getattr(self, attr)
224             if isinstance(value, list):
225                 result[attr] = list(map(
226                     lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
227                     value
228                 ))
229             elif hasattr(value, "to_dict"):
230                 result[attr] = value.to_dict()
231             elif isinstance(value, dict):
232                 result[attr] = dict(map(
233                     lambda item: (item[0], item[1].to_dict())
234                     if hasattr(item[1], "to_dict") else item,
235                     value.items()
236                 ))
237             else:
238                 result[attr] = value
239         if issubclass(SubscriptionParams, dict):
240             for key, value in self.items():
241                 result[key] = value
242
243         return result
244
245     def to_str(self):
246         """Returns the string representation of the model"""
247         return pprint.pformat(self.to_dict())
248
249     def __repr__(self):
250         """For `print` and `pprint`"""
251         return self.to_str()
252
253     def __eq__(self, other):
254         """Returns true if both objects are equal"""
255         if not isinstance(other, SubscriptionParams):
256             return False
257
258         return self.to_dict() == other.to_dict()
259
260     def __ne__(self, other):
261         """Returns true if both objects are not equal"""
262         if not isinstance(other, SubscriptionParams):
263             return True
264
265         return self.to_dict() != other.to_dict()