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 SubscriptionResponse(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.
36 'subscription_id': 'str',
37 'subscription_instances': 'list[SubscriptionInstance]'
41 'subscription_id': 'SubscriptionId',
42 'subscription_instances': 'SubscriptionInstances'
45 def __init__(self, subscription_id=None, subscription_instances=None, _configuration=None): # noqa: E501
46 """SubscriptionResponse - a model defined in Swagger""" # noqa: E501
47 if _configuration is None:
48 _configuration = Configuration()
49 self._configuration = _configuration
51 self._subscription_id = None
52 self._subscription_instances = None
53 self.discriminator = None
55 self.subscription_id = subscription_id
56 self.subscription_instances = subscription_instances
59 def subscription_id(self):
60 """Gets the subscription_id of this SubscriptionResponse. # noqa: E501
63 :return: The subscription_id of this SubscriptionResponse. # noqa: E501
66 return self._subscription_id
68 @subscription_id.setter
69 def subscription_id(self, subscription_id):
70 """Sets the subscription_id of this SubscriptionResponse.
73 :param subscription_id: The subscription_id of this SubscriptionResponse. # noqa: E501
76 if self._configuration.client_side_validation and subscription_id is None:
77 raise ValueError("Invalid value for `subscription_id`, must not be `None`") # noqa: E501
79 self._subscription_id = subscription_id
82 def subscription_instances(self):
83 """Gets the subscription_instances of this SubscriptionResponse. # noqa: E501
86 :return: The subscription_instances of this SubscriptionResponse. # noqa: E501
87 :rtype: list[SubscriptionInstance]
89 return self._subscription_instances
91 @subscription_instances.setter
92 def subscription_instances(self, subscription_instances):
93 """Sets the subscription_instances of this SubscriptionResponse.
96 :param subscription_instances: The subscription_instances of this SubscriptionResponse. # noqa: E501
97 :type: list[SubscriptionInstance]
99 if self._configuration.client_side_validation and subscription_instances is None:
100 raise ValueError("Invalid value for `subscription_instances`, must not be `None`") # noqa: E501
102 self._subscription_instances = subscription_instances
105 """Returns the model properties as a dict"""
108 for attr, _ in six.iteritems(self.swagger_types):
109 value = getattr(self, attr)
110 if isinstance(value, list):
111 result[attr] = list(map(
112 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
115 elif hasattr(value, "to_dict"):
116 result[attr] = value.to_dict()
117 elif isinstance(value, dict):
118 result[attr] = dict(map(
119 lambda item: (item[0], item[1].to_dict())
120 if hasattr(item[1], "to_dict") else item,
125 if issubclass(SubscriptionResponse, dict):
126 for key, value in self.items():
132 """Returns the string representation of the model"""
133 return pprint.pformat(self.to_dict())
136 """For `print` and `pprint`"""
139 def __eq__(self, other):
140 """Returns true if both objects are equal"""
141 if not isinstance(other, SubscriptionResponse):
144 return self.to_dict() == other.to_dict()
146 def __ne__(self, other):
147 """Returns true if both objects are not equal"""
148 if not isinstance(other, SubscriptionResponse):
151 return self.to_dict() != other.to_dict()