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