RIC-642 related changes: REST subscription, rnib enhancements, symptomdata, rest...
[ric-plt/xapp-frame-py.git] / ricxappframe / subsclient / models / subsequent_action.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 SubsequentAction(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         'subsequent_action_type': 'str',
37         'time_to_wait': 'str'
38     }
39
40     attribute_map = {
41         'subsequent_action_type': 'SubsequentActionType',
42         'time_to_wait': 'TimeToWait'
43     }
44
45     def __init__(self, subsequent_action_type=None, time_to_wait=None, _configuration=None):  # noqa: E501
46         """SubsequentAction - a model defined in Swagger"""  # noqa: E501
47         if _configuration is None:
48             _configuration = Configuration()
49         self._configuration = _configuration
50
51         self._subsequent_action_type = None
52         self._time_to_wait = None
53         self.discriminator = None
54
55         self.subsequent_action_type = subsequent_action_type
56         self.time_to_wait = time_to_wait
57
58     @property
59     def subsequent_action_type(self):
60         """Gets the subsequent_action_type of this SubsequentAction.  # noqa: E501
61
62
63         :return: The subsequent_action_type of this SubsequentAction.  # noqa: E501
64         :rtype: str
65         """
66         return self._subsequent_action_type
67
68     @subsequent_action_type.setter
69     def subsequent_action_type(self, subsequent_action_type):
70         """Sets the subsequent_action_type of this SubsequentAction.
71
72
73         :param subsequent_action_type: The subsequent_action_type of this SubsequentAction.  # noqa: E501
74         :type: str
75         """
76         if self._configuration.client_side_validation and subsequent_action_type is None:
77             raise ValueError("Invalid value for `subsequent_action_type`, must not be `None`")  # noqa: E501
78         allowed_values = ["continue", "wait"]  # noqa: E501
79         if (self._configuration.client_side_validation and
80                 subsequent_action_type not in allowed_values):
81             raise ValueError(
82                 "Invalid value for `subsequent_action_type` ({0}), must be one of {1}"  # noqa: E501
83                 .format(subsequent_action_type, allowed_values)
84             )
85
86         self._subsequent_action_type = subsequent_action_type
87
88     @property
89     def time_to_wait(self):
90         """Gets the time_to_wait of this SubsequentAction.  # noqa: E501
91
92
93         :return: The time_to_wait of this SubsequentAction.  # noqa: E501
94         :rtype: str
95         """
96         return self._time_to_wait
97
98     @time_to_wait.setter
99     def time_to_wait(self, time_to_wait):
100         """Sets the time_to_wait of this SubsequentAction.
101
102
103         :param time_to_wait: The time_to_wait of this SubsequentAction.  # noqa: E501
104         :type: str
105         """
106         if self._configuration.client_side_validation and time_to_wait is None:
107             raise ValueError("Invalid value for `time_to_wait`, must not be `None`")  # noqa: E501
108         allowed_values = ["zero", "w1ms", "w2ms", "w5ms", "w10ms", "w20ms", "w30ms", "w40ms", "w50ms", "w100ms", "w200ms", "w500ms", "w1s", "w2s", "w5s", "w10s", "w20s", "w60s"]  # noqa: E501
109         if (self._configuration.client_side_validation and
110                 time_to_wait not in allowed_values):
111             raise ValueError(
112                 "Invalid value for `time_to_wait` ({0}), must be one of {1}"  # noqa: E501
113                 .format(time_to_wait, allowed_values)
114             )
115
116         self._time_to_wait = time_to_wait
117
118     def to_dict(self):
119         """Returns the model properties as a dict"""
120         result = {}
121
122         for attr, _ in six.iteritems(self.swagger_types):
123             value = getattr(self, attr)
124             if isinstance(value, list):
125                 result[attr] = list(map(
126                     lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
127                     value
128                 ))
129             elif hasattr(value, "to_dict"):
130                 result[attr] = value.to_dict()
131             elif isinstance(value, dict):
132                 result[attr] = dict(map(
133                     lambda item: (item[0], item[1].to_dict())
134                     if hasattr(item[1], "to_dict") else item,
135                     value.items()
136                 ))
137             else:
138                 result[attr] = value
139         if issubclass(SubsequentAction, dict):
140             for key, value in self.items():
141                 result[key] = value
142
143         return result
144
145     def to_str(self):
146         """Returns the string representation of the model"""
147         return pprint.pformat(self.to_dict())
148
149     def __repr__(self):
150         """For `print` and `pprint`"""
151         return self.to_str()
152
153     def __eq__(self, other):
154         """Returns true if both objects are equal"""
155         if not isinstance(other, SubsequentAction):
156             return False
157
158         return self.to_dict() == other.to_dict()
159
160     def __ne__(self, other):
161         """Returns true if both objects are not equal"""
162         if not isinstance(other, SubsequentAction):
163             return True
164
165         return self.to_dict() != other.to_dict()