pulp_2to3_migration_client 0.2.0b4.dev01592833441 → 0.2.0b4.dev01592853251
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/pulp_2to3_migration_client/version.rb +1 -1
- metadata +1 -40
- data/pulpcore/__init__.py +0 -2
- data/pulpcore/client/__init__.py +0 -2
- data/pulpcore/client/pulp_2to3_migration/__init__.py +0 -42
- data/pulpcore/client/pulp_2to3_migration/api/__init__.py +0 -8
- data/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +0 -609
- data/pulpcore/client/pulp_2to3_migration/api/pulp2content_api.py +0 -317
- data/pulpcore/client/pulp_2to3_migration/api/pulp2repositories_api.py +0 -289
- data/pulpcore/client/pulp_2to3_migration/api_client.py +0 -647
- data/pulpcore/client/pulp_2to3_migration/configuration.py +0 -387
- data/pulpcore/client/pulp_2to3_migration/exceptions.py +0 -120
- data/pulpcore/client/pulp_2to3_migration/models/__init__.py +0 -25
- data/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +0 -123
- data/pulpcore/client/pulp_2to3_migration/models/inline_response200.py +0 -198
- data/pulpcore/client/pulp_2to3_migration/models/inline_response2001.py +0 -198
- data/pulpcore/client/pulp_2to3_migration/models/inline_response2002.py +0 -198
- data/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +0 -150
- data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +0 -177
- data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_read.py +0 -177
- data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_read.py +0 -353
- data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_read.py +0 -441
- data/pulpcore/client/pulp_2to3_migration/rest.py +0 -296
- data/requirements.txt +0 -6
- data/setup.cfg +0 -2
- data/setup.py +0 -41
- data/test-requirements.txt +0 -3
- data/test/__init__.py +0 -0
- data/test/test_async_operation_response.py +0 -53
- data/test/test_inline_response200.py +0 -67
- data/test/test_inline_response2001.py +0 -79
- data/test/test_inline_response2002.py +0 -89
- data/test/test_migration_plan_run.py +0 -53
- data/test/test_migration_plans_api.py +0 -68
- data/test/test_pulp2content_api.py +0 -47
- data/test/test_pulp2repositories_api.py +0 -47
- data/test/test_pulp2to3_migration_migration_plan.py +0 -55
- data/test/test_pulp2to3_migration_migration_plan_read.py +0 -55
- data/test/test_pulp2to3_migration_pulp2_content_read.py +0 -64
- data/test/test_pulp2to3_migration_pulp2_repository_read.py +0 -68
- data/tox.ini +0 -9
@@ -1,25 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
# flake8: noqa
|
4
|
-
"""
|
5
|
-
Pulp 3 API
|
6
|
-
|
7
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
8
|
-
|
9
|
-
The version of the OpenAPI document: v3
|
10
|
-
Generated by: https://openapi-generator.tech
|
11
|
-
"""
|
12
|
-
|
13
|
-
|
14
|
-
from __future__ import absolute_import
|
15
|
-
|
16
|
-
# import models into model package
|
17
|
-
from pulpcore.client.pulp_2to3_migration.models.async_operation_response import AsyncOperationResponse
|
18
|
-
from pulpcore.client.pulp_2to3_migration.models.inline_response200 import InlineResponse200
|
19
|
-
from pulpcore.client.pulp_2to3_migration.models.inline_response2001 import InlineResponse2001
|
20
|
-
from pulpcore.client.pulp_2to3_migration.models.inline_response2002 import InlineResponse2002
|
21
|
-
from pulpcore.client.pulp_2to3_migration.models.migration_plan_run import MigrationPlanRun
|
22
|
-
from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan import Pulp2to3MigrationMigrationPlan
|
23
|
-
from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan_read import Pulp2to3MigrationMigrationPlanRead
|
24
|
-
from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_content_read import Pulp2to3MigrationPulp2ContentRead
|
25
|
-
from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_repository_read import Pulp2to3MigrationPulp2RepositoryRead
|
@@ -1,123 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Pulp 3 API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v3
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from pulpcore.client.pulp_2to3_migration.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class AsyncOperationResponse(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_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
|
-
openapi_types = {
|
36
|
-
'task': 'str'
|
37
|
-
}
|
38
|
-
|
39
|
-
attribute_map = {
|
40
|
-
'task': 'task'
|
41
|
-
}
|
42
|
-
|
43
|
-
def __init__(self, task=None, local_vars_configuration=None): # noqa: E501
|
44
|
-
"""AsyncOperationResponse - a model defined in OpenAPI""" # noqa: E501
|
45
|
-
if local_vars_configuration is None:
|
46
|
-
local_vars_configuration = Configuration()
|
47
|
-
self.local_vars_configuration = local_vars_configuration
|
48
|
-
|
49
|
-
self._task = None
|
50
|
-
self.discriminator = None
|
51
|
-
|
52
|
-
self.task = task
|
53
|
-
|
54
|
-
@property
|
55
|
-
def task(self):
|
56
|
-
"""Gets the task of this AsyncOperationResponse. # noqa: E501
|
57
|
-
|
58
|
-
The href of the task. # noqa: E501
|
59
|
-
|
60
|
-
:return: The task of this AsyncOperationResponse. # noqa: E501
|
61
|
-
:rtype: str
|
62
|
-
"""
|
63
|
-
return self._task
|
64
|
-
|
65
|
-
@task.setter
|
66
|
-
def task(self, task):
|
67
|
-
"""Sets the task of this AsyncOperationResponse.
|
68
|
-
|
69
|
-
The href of the task. # noqa: E501
|
70
|
-
|
71
|
-
:param task: The task of this AsyncOperationResponse. # noqa: E501
|
72
|
-
:type: str
|
73
|
-
"""
|
74
|
-
if self.local_vars_configuration.client_side_validation and task is None: # noqa: E501
|
75
|
-
raise ValueError("Invalid value for `task`, must not be `None`") # noqa: E501
|
76
|
-
|
77
|
-
self._task = task
|
78
|
-
|
79
|
-
def to_dict(self):
|
80
|
-
"""Returns the model properties as a dict"""
|
81
|
-
result = {}
|
82
|
-
|
83
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
84
|
-
value = getattr(self, attr)
|
85
|
-
if isinstance(value, list):
|
86
|
-
result[attr] = list(map(
|
87
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
88
|
-
value
|
89
|
-
))
|
90
|
-
elif hasattr(value, "to_dict"):
|
91
|
-
result[attr] = value.to_dict()
|
92
|
-
elif isinstance(value, dict):
|
93
|
-
result[attr] = dict(map(
|
94
|
-
lambda item: (item[0], item[1].to_dict())
|
95
|
-
if hasattr(item[1], "to_dict") else item,
|
96
|
-
value.items()
|
97
|
-
))
|
98
|
-
else:
|
99
|
-
result[attr] = value
|
100
|
-
|
101
|
-
return result
|
102
|
-
|
103
|
-
def to_str(self):
|
104
|
-
"""Returns the string representation of the model"""
|
105
|
-
return pprint.pformat(self.to_dict())
|
106
|
-
|
107
|
-
def __repr__(self):
|
108
|
-
"""For `print` and `pprint`"""
|
109
|
-
return self.to_str()
|
110
|
-
|
111
|
-
def __eq__(self, other):
|
112
|
-
"""Returns true if both objects are equal"""
|
113
|
-
if not isinstance(other, AsyncOperationResponse):
|
114
|
-
return False
|
115
|
-
|
116
|
-
return self.to_dict() == other.to_dict()
|
117
|
-
|
118
|
-
def __ne__(self, other):
|
119
|
-
"""Returns true if both objects are not equal"""
|
120
|
-
if not isinstance(other, AsyncOperationResponse):
|
121
|
-
return True
|
122
|
-
|
123
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,198 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Pulp 3 API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v3
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from pulpcore.client.pulp_2to3_migration.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class InlineResponse200(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_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
|
-
openapi_types = {
|
36
|
-
'count': 'int',
|
37
|
-
'next': 'str',
|
38
|
-
'previous': 'str',
|
39
|
-
'results': 'list[Pulp2to3MigrationMigrationPlanRead]'
|
40
|
-
}
|
41
|
-
|
42
|
-
attribute_map = {
|
43
|
-
'count': 'count',
|
44
|
-
'next': 'next',
|
45
|
-
'previous': 'previous',
|
46
|
-
'results': 'results'
|
47
|
-
}
|
48
|
-
|
49
|
-
def __init__(self, count=None, next=None, previous=None, results=None, local_vars_configuration=None): # noqa: E501
|
50
|
-
"""InlineResponse200 - a model defined in OpenAPI""" # noqa: E501
|
51
|
-
if local_vars_configuration is None:
|
52
|
-
local_vars_configuration = Configuration()
|
53
|
-
self.local_vars_configuration = local_vars_configuration
|
54
|
-
|
55
|
-
self._count = None
|
56
|
-
self._next = None
|
57
|
-
self._previous = None
|
58
|
-
self._results = None
|
59
|
-
self.discriminator = None
|
60
|
-
|
61
|
-
self.count = count
|
62
|
-
self.next = next
|
63
|
-
self.previous = previous
|
64
|
-
self.results = results
|
65
|
-
|
66
|
-
@property
|
67
|
-
def count(self):
|
68
|
-
"""Gets the count of this InlineResponse200. # noqa: E501
|
69
|
-
|
70
|
-
|
71
|
-
:return: The count of this InlineResponse200. # noqa: E501
|
72
|
-
:rtype: int
|
73
|
-
"""
|
74
|
-
return self._count
|
75
|
-
|
76
|
-
@count.setter
|
77
|
-
def count(self, count):
|
78
|
-
"""Sets the count of this InlineResponse200.
|
79
|
-
|
80
|
-
|
81
|
-
:param count: The count of this InlineResponse200. # noqa: E501
|
82
|
-
:type: int
|
83
|
-
"""
|
84
|
-
if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501
|
85
|
-
raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501
|
86
|
-
|
87
|
-
self._count = count
|
88
|
-
|
89
|
-
@property
|
90
|
-
def next(self):
|
91
|
-
"""Gets the next of this InlineResponse200. # noqa: E501
|
92
|
-
|
93
|
-
|
94
|
-
:return: The next of this InlineResponse200. # noqa: E501
|
95
|
-
:rtype: str
|
96
|
-
"""
|
97
|
-
return self._next
|
98
|
-
|
99
|
-
@next.setter
|
100
|
-
def next(self, next):
|
101
|
-
"""Sets the next of this InlineResponse200.
|
102
|
-
|
103
|
-
|
104
|
-
:param next: The next of this InlineResponse200. # noqa: E501
|
105
|
-
:type: str
|
106
|
-
"""
|
107
|
-
|
108
|
-
self._next = next
|
109
|
-
|
110
|
-
@property
|
111
|
-
def previous(self):
|
112
|
-
"""Gets the previous of this InlineResponse200. # noqa: E501
|
113
|
-
|
114
|
-
|
115
|
-
:return: The previous of this InlineResponse200. # noqa: E501
|
116
|
-
:rtype: str
|
117
|
-
"""
|
118
|
-
return self._previous
|
119
|
-
|
120
|
-
@previous.setter
|
121
|
-
def previous(self, previous):
|
122
|
-
"""Sets the previous of this InlineResponse200.
|
123
|
-
|
124
|
-
|
125
|
-
:param previous: The previous of this InlineResponse200. # noqa: E501
|
126
|
-
:type: str
|
127
|
-
"""
|
128
|
-
|
129
|
-
self._previous = previous
|
130
|
-
|
131
|
-
@property
|
132
|
-
def results(self):
|
133
|
-
"""Gets the results of this InlineResponse200. # noqa: E501
|
134
|
-
|
135
|
-
|
136
|
-
:return: The results of this InlineResponse200. # noqa: E501
|
137
|
-
:rtype: list[Pulp2to3MigrationMigrationPlanRead]
|
138
|
-
"""
|
139
|
-
return self._results
|
140
|
-
|
141
|
-
@results.setter
|
142
|
-
def results(self, results):
|
143
|
-
"""Sets the results of this InlineResponse200.
|
144
|
-
|
145
|
-
|
146
|
-
:param results: The results of this InlineResponse200. # noqa: E501
|
147
|
-
:type: list[Pulp2to3MigrationMigrationPlanRead]
|
148
|
-
"""
|
149
|
-
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
150
|
-
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
151
|
-
|
152
|
-
self._results = results
|
153
|
-
|
154
|
-
def to_dict(self):
|
155
|
-
"""Returns the model properties as a dict"""
|
156
|
-
result = {}
|
157
|
-
|
158
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
159
|
-
value = getattr(self, attr)
|
160
|
-
if isinstance(value, list):
|
161
|
-
result[attr] = list(map(
|
162
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
163
|
-
value
|
164
|
-
))
|
165
|
-
elif hasattr(value, "to_dict"):
|
166
|
-
result[attr] = value.to_dict()
|
167
|
-
elif isinstance(value, dict):
|
168
|
-
result[attr] = dict(map(
|
169
|
-
lambda item: (item[0], item[1].to_dict())
|
170
|
-
if hasattr(item[1], "to_dict") else item,
|
171
|
-
value.items()
|
172
|
-
))
|
173
|
-
else:
|
174
|
-
result[attr] = value
|
175
|
-
|
176
|
-
return result
|
177
|
-
|
178
|
-
def to_str(self):
|
179
|
-
"""Returns the string representation of the model"""
|
180
|
-
return pprint.pformat(self.to_dict())
|
181
|
-
|
182
|
-
def __repr__(self):
|
183
|
-
"""For `print` and `pprint`"""
|
184
|
-
return self.to_str()
|
185
|
-
|
186
|
-
def __eq__(self, other):
|
187
|
-
"""Returns true if both objects are equal"""
|
188
|
-
if not isinstance(other, InlineResponse200):
|
189
|
-
return False
|
190
|
-
|
191
|
-
return self.to_dict() == other.to_dict()
|
192
|
-
|
193
|
-
def __ne__(self, other):
|
194
|
-
"""Returns true if both objects are not equal"""
|
195
|
-
if not isinstance(other, InlineResponse200):
|
196
|
-
return True
|
197
|
-
|
198
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,198 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Pulp 3 API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v3
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from pulpcore.client.pulp_2to3_migration.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class InlineResponse2001(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_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
|
-
openapi_types = {
|
36
|
-
'count': 'int',
|
37
|
-
'next': 'str',
|
38
|
-
'previous': 'str',
|
39
|
-
'results': 'list[Pulp2to3MigrationPulp2ContentRead]'
|
40
|
-
}
|
41
|
-
|
42
|
-
attribute_map = {
|
43
|
-
'count': 'count',
|
44
|
-
'next': 'next',
|
45
|
-
'previous': 'previous',
|
46
|
-
'results': 'results'
|
47
|
-
}
|
48
|
-
|
49
|
-
def __init__(self, count=None, next=None, previous=None, results=None, local_vars_configuration=None): # noqa: E501
|
50
|
-
"""InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501
|
51
|
-
if local_vars_configuration is None:
|
52
|
-
local_vars_configuration = Configuration()
|
53
|
-
self.local_vars_configuration = local_vars_configuration
|
54
|
-
|
55
|
-
self._count = None
|
56
|
-
self._next = None
|
57
|
-
self._previous = None
|
58
|
-
self._results = None
|
59
|
-
self.discriminator = None
|
60
|
-
|
61
|
-
self.count = count
|
62
|
-
self.next = next
|
63
|
-
self.previous = previous
|
64
|
-
self.results = results
|
65
|
-
|
66
|
-
@property
|
67
|
-
def count(self):
|
68
|
-
"""Gets the count of this InlineResponse2001. # noqa: E501
|
69
|
-
|
70
|
-
|
71
|
-
:return: The count of this InlineResponse2001. # noqa: E501
|
72
|
-
:rtype: int
|
73
|
-
"""
|
74
|
-
return self._count
|
75
|
-
|
76
|
-
@count.setter
|
77
|
-
def count(self, count):
|
78
|
-
"""Sets the count of this InlineResponse2001.
|
79
|
-
|
80
|
-
|
81
|
-
:param count: The count of this InlineResponse2001. # noqa: E501
|
82
|
-
:type: int
|
83
|
-
"""
|
84
|
-
if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501
|
85
|
-
raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501
|
86
|
-
|
87
|
-
self._count = count
|
88
|
-
|
89
|
-
@property
|
90
|
-
def next(self):
|
91
|
-
"""Gets the next of this InlineResponse2001. # noqa: E501
|
92
|
-
|
93
|
-
|
94
|
-
:return: The next of this InlineResponse2001. # noqa: E501
|
95
|
-
:rtype: str
|
96
|
-
"""
|
97
|
-
return self._next
|
98
|
-
|
99
|
-
@next.setter
|
100
|
-
def next(self, next):
|
101
|
-
"""Sets the next of this InlineResponse2001.
|
102
|
-
|
103
|
-
|
104
|
-
:param next: The next of this InlineResponse2001. # noqa: E501
|
105
|
-
:type: str
|
106
|
-
"""
|
107
|
-
|
108
|
-
self._next = next
|
109
|
-
|
110
|
-
@property
|
111
|
-
def previous(self):
|
112
|
-
"""Gets the previous of this InlineResponse2001. # noqa: E501
|
113
|
-
|
114
|
-
|
115
|
-
:return: The previous of this InlineResponse2001. # noqa: E501
|
116
|
-
:rtype: str
|
117
|
-
"""
|
118
|
-
return self._previous
|
119
|
-
|
120
|
-
@previous.setter
|
121
|
-
def previous(self, previous):
|
122
|
-
"""Sets the previous of this InlineResponse2001.
|
123
|
-
|
124
|
-
|
125
|
-
:param previous: The previous of this InlineResponse2001. # noqa: E501
|
126
|
-
:type: str
|
127
|
-
"""
|
128
|
-
|
129
|
-
self._previous = previous
|
130
|
-
|
131
|
-
@property
|
132
|
-
def results(self):
|
133
|
-
"""Gets the results of this InlineResponse2001. # noqa: E501
|
134
|
-
|
135
|
-
|
136
|
-
:return: The results of this InlineResponse2001. # noqa: E501
|
137
|
-
:rtype: list[Pulp2to3MigrationPulp2ContentRead]
|
138
|
-
"""
|
139
|
-
return self._results
|
140
|
-
|
141
|
-
@results.setter
|
142
|
-
def results(self, results):
|
143
|
-
"""Sets the results of this InlineResponse2001.
|
144
|
-
|
145
|
-
|
146
|
-
:param results: The results of this InlineResponse2001. # noqa: E501
|
147
|
-
:type: list[Pulp2to3MigrationPulp2ContentRead]
|
148
|
-
"""
|
149
|
-
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
150
|
-
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
151
|
-
|
152
|
-
self._results = results
|
153
|
-
|
154
|
-
def to_dict(self):
|
155
|
-
"""Returns the model properties as a dict"""
|
156
|
-
result = {}
|
157
|
-
|
158
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
159
|
-
value = getattr(self, attr)
|
160
|
-
if isinstance(value, list):
|
161
|
-
result[attr] = list(map(
|
162
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
163
|
-
value
|
164
|
-
))
|
165
|
-
elif hasattr(value, "to_dict"):
|
166
|
-
result[attr] = value.to_dict()
|
167
|
-
elif isinstance(value, dict):
|
168
|
-
result[attr] = dict(map(
|
169
|
-
lambda item: (item[0], item[1].to_dict())
|
170
|
-
if hasattr(item[1], "to_dict") else item,
|
171
|
-
value.items()
|
172
|
-
))
|
173
|
-
else:
|
174
|
-
result[attr] = value
|
175
|
-
|
176
|
-
return result
|
177
|
-
|
178
|
-
def to_str(self):
|
179
|
-
"""Returns the string representation of the model"""
|
180
|
-
return pprint.pformat(self.to_dict())
|
181
|
-
|
182
|
-
def __repr__(self):
|
183
|
-
"""For `print` and `pprint`"""
|
184
|
-
return self.to_str()
|
185
|
-
|
186
|
-
def __eq__(self, other):
|
187
|
-
"""Returns true if both objects are equal"""
|
188
|
-
if not isinstance(other, InlineResponse2001):
|
189
|
-
return False
|
190
|
-
|
191
|
-
return self.to_dict() == other.to_dict()
|
192
|
-
|
193
|
-
def __ne__(self, other):
|
194
|
-
"""Returns true if both objects are not equal"""
|
195
|
-
if not isinstance(other, InlineResponse2001):
|
196
|
-
return True
|
197
|
-
|
198
|
-
return self.to_dict() != other.to_dict()
|