6 This is the initial REST API for RIC subscription # noqa: E501
8 OpenAPI spec version: 0.0.4
10 Generated by: https://github.com/swagger-api/swagger-codegen.git
15 import re # noqa: F401
19 from ricxappframe.subsclient.configuration import Configuration
22 class ConfigMetadata(object):
23 """NOTE: This class is auto generated by the swagger code generator program.
25 Do not edit the class manually.
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.
41 'xapp_name': 'xappName',
42 'config_type': 'configType'
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
51 self._xapp_name = None
52 self._config_type = None
53 self.discriminator = None
55 self.xapp_name = xapp_name
56 self.config_type = config_type
60 """Gets the xapp_name of this ConfigMetadata. # noqa: E501
62 Name of the xApp # noqa: E501
64 :return: The xapp_name of this ConfigMetadata. # noqa: E501
67 return self._xapp_name
70 def xapp_name(self, xapp_name):
71 """Sets the xapp_name of this ConfigMetadata.
73 Name of the xApp # noqa: E501
75 :param xapp_name: The xapp_name of this ConfigMetadata. # noqa: E501
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
81 self._xapp_name = xapp_name
84 def config_type(self):
85 """Gets the config_type of this ConfigMetadata. # noqa: E501
87 The type of the content # noqa: E501
89 :return: The config_type of this ConfigMetadata. # noqa: E501
92 return self._config_type
95 def config_type(self, config_type):
96 """Sets the config_type of this ConfigMetadata.
98 The type of the content # noqa: E501
100 :param config_type: The config_type of this ConfigMetadata. # noqa: E501
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):
109 "Invalid value for `config_type` ({0}), must be one of {1}" # noqa: E501
110 .format(config_type, allowed_values)
113 self._config_type = config_type
116 """Returns the model properties as a dict"""
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,
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,
136 if issubclass(ConfigMetadata, dict):
137 for key, value in self.items():
143 """Returns the string representation of the model"""
144 return pprint.pformat(self.to_dict())
147 """For `print` and `pprint`"""
150 def __eq__(self, other):
151 """Returns true if both objects are equal"""
152 if not isinstance(other, ConfigMetadata):
155 return self.to_dict() == other.to_dict()
157 def __ne__(self, other):
158 """Returns true if both objects are not equal"""
159 if not isinstance(other, ConfigMetadata):
162 return self.to_dict() != other.to_dict()