pulp-python-client 3.12.5__py3-none-any.whl → 3.13.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulp-python-client might be problematic. Click here for more details.
- pulp_python_client-3.13.0.dist-info/METADATA +17 -0
- pulp_python_client-3.13.0.dist-info/RECORD +64 -0
- {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/WHEEL +1 -1
- pulpcore/client/pulp_python/__init__.py +9 -10
- pulpcore/client/pulp_python/api/__init__.py +1 -2
- pulpcore/client/pulp_python/api/content_packages_api.py +1800 -655
- pulpcore/client/pulp_python/api/distributions_pypi_api.py +3755 -1474
- pulpcore/client/pulp_python/api/publications_pypi_api.py +2574 -982
- pulpcore/client/pulp_python/api/pypi_api.py +302 -128
- pulpcore/client/pulp_python/api/pypi_legacy_api.py +326 -153
- pulpcore/client/pulp_python/api/pypi_metadata_api.py +319 -139
- pulpcore/client/pulp_python/api/pypi_simple_api.py +899 -382
- pulpcore/client/pulp_python/api/remotes_python_api.py +4092 -1589
- pulpcore/client/pulp_python/api/repositories_python_api.py +4380 -1719
- pulpcore/client/pulp_python/api/repositories_python_versions_api.py +1526 -561
- pulpcore/client/pulp_python/api_client.py +444 -313
- pulpcore/client/pulp_python/api_response.py +21 -0
- pulpcore/client/pulp_python/configuration.py +266 -73
- pulpcore/client/pulp_python/exceptions.py +99 -20
- pulpcore/client/pulp_python/models/__init__.py +5 -8
- pulpcore/client/pulp_python/models/async_operation_response.py +60 -96
- pulpcore/client/pulp_python/models/content_summary_response.py +70 -154
- pulpcore/client/pulp_python/models/exclude_platforms_enum.py +19 -82
- pulpcore/client/pulp_python/models/my_permissions_response.py +60 -94
- pulpcore/client/pulp_python/models/nested_role.py +71 -155
- pulpcore/client/pulp_python/models/nested_role_response.py +70 -152
- pulpcore/client/pulp_python/models/object_roles_response.py +70 -96
- pulpcore/client/pulp_python/models/package_metadata_response.py +91 -191
- pulpcore/client/pulp_python/models/package_types_enum.py +23 -86
- pulpcore/client/pulp_python/models/package_upload_task_response.py +85 -154
- pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +94 -181
- pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +108 -330
- pulpcore/client/pulp_python/models/patchedpython_python_remote.py +204 -864
- pulpcore/client/pulp_python/models/patchedpython_python_repository.py +96 -249
- pulpcore/client/pulp_python/models/policy_enum.py +18 -81
- pulpcore/client/pulp_python/models/python_python_distribution.py +108 -332
- pulpcore/client/pulp_python/models/python_python_distribution_response.py +132 -490
- pulpcore/client/pulp_python/models/python_python_package_content_response.py +182 -972
- pulpcore/client/pulp_python/models/python_python_publication.py +68 -127
- pulpcore/client/pulp_python/models/python_python_publication_response.py +93 -269
- pulpcore/client/pulp_python/models/python_python_remote.py +204 -866
- pulpcore/client/pulp_python/models/python_python_remote_response.py +198 -839
- pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- pulpcore/client/pulp_python/models/python_python_repository.py +96 -250
- pulpcore/client/pulp_python/models/python_python_repository_response.py +122 -407
- pulpcore/client/pulp_python/models/repair.py +60 -95
- pulpcore/client/pulp_python/models/repository_add_remove_content.py +71 -157
- pulpcore/client/pulp_python/models/repository_sync_url.py +68 -129
- pulpcore/client/pulp_python/models/repository_version_response.py +104 -296
- pulpcore/client/pulp_python/models/set_label.py +80 -130
- pulpcore/client/pulp_python/models/set_label_response.py +80 -127
- pulpcore/client/pulp_python/models/summary_response.py +70 -160
- pulpcore/client/pulp_python/models/unset_label.py +75 -107
- pulpcore/client/pulp_python/models/unset_label_response.py +78 -129
- pulpcore/client/pulp_python/py.typed +0 -0
- pulpcore/client/pulp_python/rest.py +136 -170
- pulp_python_client-3.12.5.dist-info/METADATA +0 -17
- pulp_python_client-3.12.5.dist-info/RECORD +0 -65
- pulpcore/client/pulp_python/models/package_upload.py +0 -190
- pulpcore/client/pulp_python/models/python_bander_remote.py +0 -184
- pulpcore/client/pulp_python/models/python_python_package_content.py +0 -889
- pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields.py +0 -149
- {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
|
@@ -3,148 +3,101 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Pulp 3 API
|
|
5
5
|
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v3
|
|
9
9
|
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by
|
|
11
|
-
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
12
14
|
|
|
13
15
|
|
|
16
|
+
from __future__ import annotations
|
|
14
17
|
import pprint
|
|
15
18
|
import re # noqa: F401
|
|
19
|
+
import json
|
|
16
20
|
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
from
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class SetLabelResponse(object):
|
|
23
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
24
|
-
Ref: https://openapi-generator.tech
|
|
25
|
-
|
|
26
|
-
Do not edit the class manually.
|
|
27
|
-
"""
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
28
26
|
|
|
27
|
+
class SetLabelResponse(BaseModel):
|
|
29
28
|
"""
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
self.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
self.
|
|
58
|
-
|
|
59
|
-
@
|
|
60
|
-
def
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
:param key: The key of this SetLabelResponse. # noqa: E501
|
|
75
|
-
:type: str
|
|
29
|
+
Serializer for synchronously setting a label.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
key: Annotated[str, Field(strict=True)]
|
|
32
|
+
value: Optional[StrictStr]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["key", "value"]
|
|
34
|
+
|
|
35
|
+
@field_validator('key')
|
|
36
|
+
def key_validate_regular_expression(cls, value):
|
|
37
|
+
"""Validates the regular expression"""
|
|
38
|
+
if not re.match(r"^[-a-zA-Z0-9_]+$", value):
|
|
39
|
+
raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SetLabelResponse from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
76
72
|
"""
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
80
|
-
key is not None and not re.search(r'^[-a-zA-Z0-9_]+$', key)): # noqa: E501
|
|
81
|
-
raise ValueError(r"Invalid value for `key`, must be a follow pattern or equal to `/^[-a-zA-Z0-9_]+$/`") # noqa: E501
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
82
75
|
|
|
83
|
-
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# set to None if value (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.value is None and "value" in self.model_fields_set:
|
|
84
|
+
_dict['value'] = None
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
def value(self):
|
|
87
|
-
"""Gets the value of this SetLabelResponse. # noqa: E501
|
|
86
|
+
return _dict
|
|
88
87
|
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of SetLabelResponse from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"""
|
|
93
|
-
return self._value
|
|
94
|
-
|
|
95
|
-
@value.setter
|
|
96
|
-
def value(self, value):
|
|
97
|
-
"""Sets the value of this SetLabelResponse.
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
98
96
|
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"key": obj.get("key"),
|
|
99
|
+
"value": obj.get("value")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
99
102
|
|
|
100
|
-
:param value: The value of this SetLabelResponse. # noqa: E501
|
|
101
|
-
:type: str
|
|
102
|
-
"""
|
|
103
103
|
|
|
104
|
-
self._value = value
|
|
105
|
-
|
|
106
|
-
def to_dict(self):
|
|
107
|
-
"""Returns the model properties as a dict"""
|
|
108
|
-
result = {}
|
|
109
|
-
|
|
110
|
-
for attr, _ in six.iteritems(self.openapi_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
|
-
|
|
128
|
-
return result
|
|
129
|
-
|
|
130
|
-
def to_str(self):
|
|
131
|
-
"""Returns the string representation of the model"""
|
|
132
|
-
return pprint.pformat(self.to_dict())
|
|
133
|
-
|
|
134
|
-
def __repr__(self):
|
|
135
|
-
"""For `print` and `pprint`"""
|
|
136
|
-
return self.to_str()
|
|
137
|
-
|
|
138
|
-
def __eq__(self, other):
|
|
139
|
-
"""Returns true if both objects are equal"""
|
|
140
|
-
if not isinstance(other, SetLabelResponse):
|
|
141
|
-
return False
|
|
142
|
-
|
|
143
|
-
return self.to_dict() == other.to_dict()
|
|
144
|
-
|
|
145
|
-
def __ne__(self, other):
|
|
146
|
-
"""Returns true if both objects are not equal"""
|
|
147
|
-
if not isinstance(other, SetLabelResponse):
|
|
148
|
-
return True
|
|
149
|
-
|
|
150
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,180 +3,90 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Pulp 3 API
|
|
5
5
|
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v3
|
|
9
9
|
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by
|
|
11
|
-
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
12
14
|
|
|
13
15
|
|
|
16
|
+
from __future__ import annotations
|
|
14
17
|
import pprint
|
|
15
18
|
import re # noqa: F401
|
|
19
|
+
import json
|
|
16
20
|
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
from
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
class SummaryResponse(object):
|
|
23
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
24
|
-
Ref: https://openapi-generator.tech
|
|
25
|
-
|
|
26
|
-
Do not edit the class manually.
|
|
26
|
+
class SummaryResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
self.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"""Gets the projects of this SummaryResponse. # noqa: E501
|
|
66
|
-
|
|
67
|
-
Number of Python projects in index # noqa: E501
|
|
68
|
-
|
|
69
|
-
:return: The projects of this SummaryResponse. # noqa: E501
|
|
70
|
-
:rtype: int
|
|
71
|
-
"""
|
|
72
|
-
return self._projects
|
|
73
|
-
|
|
74
|
-
@projects.setter
|
|
75
|
-
def projects(self, projects):
|
|
76
|
-
"""Sets the projects of this SummaryResponse.
|
|
77
|
-
|
|
78
|
-
Number of Python projects in index # noqa: E501
|
|
79
|
-
|
|
80
|
-
:param projects: The projects of this SummaryResponse. # noqa: E501
|
|
81
|
-
:type: int
|
|
28
|
+
A Serializer for summary information of an index.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
projects: StrictInt = Field(description="Number of Python projects in index")
|
|
31
|
+
releases: StrictInt = Field(description="Number of Python distribution releases in index")
|
|
32
|
+
files: StrictInt = Field(description="Number of files for all distributions in index")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["projects", "releases", "files"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of SummaryResponse from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
82
65
|
"""
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
self._projects = projects
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
87
68
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
91
75
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:
|
|
96
|
-
|
|
97
|
-
return self._releases
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of SummaryResponse from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
98
81
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"""Sets the releases of this SummaryResponse.
|
|
102
|
-
|
|
103
|
-
Number of Python distribution releases in index # noqa: E501
|
|
104
|
-
|
|
105
|
-
:param releases: The releases of this SummaryResponse. # noqa: E501
|
|
106
|
-
:type: int
|
|
107
|
-
"""
|
|
108
|
-
if self.local_vars_configuration.client_side_validation and releases is None: # noqa: E501
|
|
109
|
-
raise ValueError("Invalid value for `releases`, must not be `None`") # noqa: E501
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
110
84
|
|
|
111
|
-
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"projects": obj.get("projects"),
|
|
87
|
+
"releases": obj.get("releases"),
|
|
88
|
+
"files": obj.get("files")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
112
91
|
|
|
113
|
-
@property
|
|
114
|
-
def files(self):
|
|
115
|
-
"""Gets the files of this SummaryResponse. # noqa: E501
|
|
116
92
|
|
|
117
|
-
Number of files for all distributions in index # noqa: E501
|
|
118
|
-
|
|
119
|
-
:return: The files of this SummaryResponse. # noqa: E501
|
|
120
|
-
:rtype: int
|
|
121
|
-
"""
|
|
122
|
-
return self._files
|
|
123
|
-
|
|
124
|
-
@files.setter
|
|
125
|
-
def files(self, files):
|
|
126
|
-
"""Sets the files of this SummaryResponse.
|
|
127
|
-
|
|
128
|
-
Number of files for all distributions in index # noqa: E501
|
|
129
|
-
|
|
130
|
-
:param files: The files of this SummaryResponse. # noqa: E501
|
|
131
|
-
:type: int
|
|
132
|
-
"""
|
|
133
|
-
if self.local_vars_configuration.client_side_validation and files is None: # noqa: E501
|
|
134
|
-
raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501
|
|
135
|
-
|
|
136
|
-
self._files = files
|
|
137
|
-
|
|
138
|
-
def to_dict(self):
|
|
139
|
-
"""Returns the model properties as a dict"""
|
|
140
|
-
result = {}
|
|
141
|
-
|
|
142
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
143
|
-
value = getattr(self, attr)
|
|
144
|
-
if isinstance(value, list):
|
|
145
|
-
result[attr] = list(map(
|
|
146
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
147
|
-
value
|
|
148
|
-
))
|
|
149
|
-
elif hasattr(value, "to_dict"):
|
|
150
|
-
result[attr] = value.to_dict()
|
|
151
|
-
elif isinstance(value, dict):
|
|
152
|
-
result[attr] = dict(map(
|
|
153
|
-
lambda item: (item[0], item[1].to_dict())
|
|
154
|
-
if hasattr(item[1], "to_dict") else item,
|
|
155
|
-
value.items()
|
|
156
|
-
))
|
|
157
|
-
else:
|
|
158
|
-
result[attr] = value
|
|
159
|
-
|
|
160
|
-
return result
|
|
161
|
-
|
|
162
|
-
def to_str(self):
|
|
163
|
-
"""Returns the string representation of the model"""
|
|
164
|
-
return pprint.pformat(self.to_dict())
|
|
165
|
-
|
|
166
|
-
def __repr__(self):
|
|
167
|
-
"""For `print` and `pprint`"""
|
|
168
|
-
return self.to_str()
|
|
169
|
-
|
|
170
|
-
def __eq__(self, other):
|
|
171
|
-
"""Returns true if both objects are equal"""
|
|
172
|
-
if not isinstance(other, SummaryResponse):
|
|
173
|
-
return False
|
|
174
|
-
|
|
175
|
-
return self.to_dict() == other.to_dict()
|
|
176
|
-
|
|
177
|
-
def __ne__(self, other):
|
|
178
|
-
"""Returns true if both objects are not equal"""
|
|
179
|
-
if not isinstance(other, SummaryResponse):
|
|
180
|
-
return True
|
|
181
|
-
|
|
182
|
-
return self.to_dict() != other.to_dict()
|