RIC-642 related changes: REST subscription, rnib enhancements, symptomdata, rest...
[ric-plt/xapp-frame-py.git] / ricxappframe / subsclient / models / subscription_detail.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 SubscriptionDetail(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         'xapp_event_instance_id': 'int',
37         'event_triggers': 'EventTriggerDefinition',
38         'action_to_be_setup_list': 'ActionsToBeSetup'
39     }
40
41     attribute_map = {
42         'xapp_event_instance_id': 'XappEventInstanceId',
43         'event_triggers': 'EventTriggers',
44         'action_to_be_setup_list': 'ActionToBeSetupList'
45     }
46
47     def __init__(self, xapp_event_instance_id=None, event_triggers=None, action_to_be_setup_list=None, _configuration=None):  # noqa: E501
48         """SubscriptionDetail - a model defined in Swagger"""  # noqa: E501
49         if _configuration is None:
50             _configuration = Configuration()
51         self._configuration = _configuration
52
53         self._xapp_event_instance_id = None
54         self._event_triggers = None
55         self._action_to_be_setup_list = None
56         self.discriminator = None
57
58         self.xapp_event_instance_id = xapp_event_instance_id
59         self.event_triggers = event_triggers
60         self.action_to_be_setup_list = action_to_be_setup_list
61
62     @property
63     def xapp_event_instance_id(self):
64         """Gets the xapp_event_instance_id of this SubscriptionDetail.  # noqa: E501
65
66
67         :return: The xapp_event_instance_id of this SubscriptionDetail.  # noqa: E501
68         :rtype: int
69         """
70         return self._xapp_event_instance_id
71
72     @xapp_event_instance_id.setter
73     def xapp_event_instance_id(self, xapp_event_instance_id):
74         """Sets the xapp_event_instance_id of this SubscriptionDetail.
75
76
77         :param xapp_event_instance_id: The xapp_event_instance_id of this SubscriptionDetail.  # noqa: E501
78         :type: int
79         """
80         if self._configuration.client_side_validation and xapp_event_instance_id is None:
81             raise ValueError("Invalid value for `xapp_event_instance_id`, must not be `None`")  # noqa: E501
82         if (self._configuration.client_side_validation and
83                 xapp_event_instance_id is not None and xapp_event_instance_id > 65535):  # noqa: E501
84             raise ValueError("Invalid value for `xapp_event_instance_id`, must be a value less than or equal to `65535`")  # noqa: E501
85         if (self._configuration.client_side_validation and
86                 xapp_event_instance_id is not None and xapp_event_instance_id < 0):  # noqa: E501
87             raise ValueError("Invalid value for `xapp_event_instance_id`, must be a value greater than or equal to `0`")  # noqa: E501
88
89         self._xapp_event_instance_id = xapp_event_instance_id
90
91     @property
92     def event_triggers(self):
93         """Gets the event_triggers of this SubscriptionDetail.  # noqa: E501
94
95
96         :return: The event_triggers of this SubscriptionDetail.  # noqa: E501
97         :rtype: EventTriggerDefinition
98         """
99         return self._event_triggers
100
101     @event_triggers.setter
102     def event_triggers(self, event_triggers):
103         """Sets the event_triggers of this SubscriptionDetail.
104
105
106         :param event_triggers: The event_triggers of this SubscriptionDetail.  # noqa: E501
107         :type: EventTriggerDefinition
108         """
109         if self._configuration.client_side_validation and event_triggers is None:
110             raise ValueError("Invalid value for `event_triggers`, must not be `None`")  # noqa: E501
111
112         self._event_triggers = event_triggers
113
114     @property
115     def action_to_be_setup_list(self):
116         """Gets the action_to_be_setup_list of this SubscriptionDetail.  # noqa: E501
117
118
119         :return: The action_to_be_setup_list of this SubscriptionDetail.  # noqa: E501
120         :rtype: ActionsToBeSetup
121         """
122         return self._action_to_be_setup_list
123
124     @action_to_be_setup_list.setter
125     def action_to_be_setup_list(self, action_to_be_setup_list):
126         """Sets the action_to_be_setup_list of this SubscriptionDetail.
127
128
129         :param action_to_be_setup_list: The action_to_be_setup_list of this SubscriptionDetail.  # noqa: E501
130         :type: ActionsToBeSetup
131         """
132         if self._configuration.client_side_validation and action_to_be_setup_list is None:
133             raise ValueError("Invalid value for `action_to_be_setup_list`, must not be `None`")  # noqa: E501
134
135         self._action_to_be_setup_list = action_to_be_setup_list
136
137     def to_dict(self):
138         """Returns the model properties as a dict"""
139         result = {}
140
141         for attr, _ in six.iteritems(self.swagger_types):
142             value = getattr(self, attr)
143             if isinstance(value, list):
144                 result[attr] = list(map(
145                     lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
146                     value
147                 ))
148             elif hasattr(value, "to_dict"):
149                 result[attr] = value.to_dict()
150             elif isinstance(value, dict):
151                 result[attr] = dict(map(
152                     lambda item: (item[0], item[1].to_dict())
153                     if hasattr(item[1], "to_dict") else item,
154                     value.items()
155                 ))
156             else:
157                 result[attr] = value
158         if issubclass(SubscriptionDetail, dict):
159             for key, value in self.items():
160                 result[key] = value
161
162         return result
163
164     def to_str(self):
165         """Returns the string representation of the model"""
166         return pprint.pformat(self.to_dict())
167
168     def __repr__(self):
169         """For `print` and `pprint`"""
170         return self.to_str()
171
172     def __eq__(self, other):
173         """Returns true if both objects are equal"""
174         if not isinstance(other, SubscriptionDetail):
175             return False
176
177         return self.to_dict() == other.to_dict()
178
179     def __ne__(self, other):
180         """Returns true if both objects are not equal"""
181         if not isinstance(other, SubscriptionDetail):
182             return True
183
184         return self.to_dict() != other.to_dict()