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