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