wordlift-client 1.135.0__py3-none-any.whl → 1.136.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.
- wordlift_client/__init__.py +16 -2
- wordlift_client/api/__init__.py +1 -0
- wordlift_client/api/audit_api.py +3 -3
- wordlift_client/api/default_api.py +1767 -39
- wordlift_client/api_client.py +1 -1
- wordlift_client/configuration.py +1 -1
- wordlift_client/models/__init__.py +14 -1
- wordlift_client/models/http_validation_error1.py +96 -0
- wordlift_client/models/monitor_result_item.py +117 -0
- wordlift_client/models/monitor_state.py +39 -0
- wordlift_client/models/monitor_summary_item.py +105 -0
- wordlift_client/models/neighbors.py +101 -0
- wordlift_client/models/page_info.py +95 -0
- wordlift_client/models/resource_request.py +92 -0
- wordlift_client/models/resource_type.py +40 -0
- wordlift_client/models/url_list_item.py +132 -0
- wordlift_client/models/url_list_response.py +104 -0
- wordlift_client/models/url_results_response.py +121 -0
- wordlift_client/models/url_summary_response.py +136 -0
- wordlift_client/models/validation_error1.py +22 -9
- wordlift_client/models/validation_error2.py +96 -0
- wordlift_client/models/validation_error2_detail_inner.py +92 -0
- {wordlift_client-1.135.0.dist-info → wordlift_client-1.136.0.dist-info}/METADATA +1 -1
- {wordlift_client-1.135.0.dist-info → wordlift_client-1.136.0.dist-info}/RECORD +27 -13
- {wordlift_client-1.135.0.dist-info → wordlift_client-1.136.0.dist-info}/LICENSE +0 -0
- {wordlift_client-1.135.0.dist-info → wordlift_client-1.136.0.dist-info}/WHEEL +0 -0
- {wordlift_client-1.135.0.dist-info → wordlift_client-1.136.0.dist-info}/top_level.txt +0 -0
wordlift_client/api_client.py
CHANGED
|
@@ -89,7 +89,7 @@ class ApiClient:
|
|
|
89
89
|
self.default_headers[header_name] = header_value
|
|
90
90
|
self.cookie = cookie
|
|
91
91
|
# Set default User-Agent.
|
|
92
|
-
self.user_agent = 'OpenAPI-Generator/1.
|
|
92
|
+
self.user_agent = 'OpenAPI-Generator/1.136.0/python'
|
|
93
93
|
self.client_side_validation = configuration.client_side_validation
|
|
94
94
|
|
|
95
95
|
async def __aenter__(self):
|
wordlift_client/configuration.py
CHANGED
|
@@ -426,7 +426,7 @@ conf = wordlift_client.Configuration(
|
|
|
426
426
|
"OS: {env}\n"\
|
|
427
427
|
"Python Version: {pyversion}\n"\
|
|
428
428
|
"Version of the API: 1.0\n"\
|
|
429
|
-
"SDK Package Version: 1.
|
|
429
|
+
"SDK Package Version: 1.136.0".\
|
|
430
430
|
format(env=sys.platform, pyversion=sys.version)
|
|
431
431
|
|
|
432
432
|
def get_host_settings(self):
|
|
@@ -93,6 +93,7 @@ from wordlift_client.models.generate_sitemap200_response import GenerateSitemap2
|
|
|
93
93
|
from wordlift_client.models.generate_sitemap_request import GenerateSitemapRequest
|
|
94
94
|
from wordlift_client.models.graphql_request import GraphqlRequest
|
|
95
95
|
from wordlift_client.models.http_validation_error import HTTPValidationError
|
|
96
|
+
from wordlift_client.models.http_validation_error1 import HTTPValidationError1
|
|
96
97
|
from wordlift_client.models.html import Html
|
|
97
98
|
from wordlift_client.models.html_semantics import HtmlSemantics
|
|
98
99
|
from wordlift_client.models.image import Image
|
|
@@ -121,6 +122,10 @@ from wordlift_client.models.merchant_sync import MerchantSync
|
|
|
121
122
|
from wordlift_client.models.merchant_view import MerchantView
|
|
122
123
|
from wordlift_client.models.model import Model
|
|
123
124
|
from wordlift_client.models.model_field import ModelField
|
|
125
|
+
from wordlift_client.models.monitor_result_item import MonitorResultItem
|
|
126
|
+
from wordlift_client.models.monitor_state import MonitorState
|
|
127
|
+
from wordlift_client.models.monitor_summary_item import MonitorSummaryItem
|
|
128
|
+
from wordlift_client.models.neighbors import Neighbors
|
|
124
129
|
from wordlift_client.models.network_account_info import NetworkAccountInfo
|
|
125
130
|
from wordlift_client.models.node_request import NodeRequest
|
|
126
131
|
from wordlift_client.models.node_request_metadata_value import NodeRequestMetadataValue
|
|
@@ -130,6 +135,7 @@ from wordlift_client.models.page_active_account import PageActiveAccount
|
|
|
130
135
|
from wordlift_client.models.page_add_on_configuration import PageAddOnConfiguration
|
|
131
136
|
from wordlift_client.models.page_content_generation import PageContentGeneration
|
|
132
137
|
from wordlift_client.models.page_field import PageField
|
|
138
|
+
from wordlift_client.models.page_info import PageInfo
|
|
133
139
|
from wordlift_client.models.page_merchant_entry import PageMerchantEntry
|
|
134
140
|
from wordlift_client.models.page_merchant_sync import PageMerchantSync
|
|
135
141
|
from wordlift_client.models.page_merchant_view import PageMerchantView
|
|
@@ -164,6 +170,8 @@ from wordlift_client.models.request import Request
|
|
|
164
170
|
from wordlift_client.models.request1 import Request1
|
|
165
171
|
from wordlift_client.models.request2 import Request2
|
|
166
172
|
from wordlift_client.models.request3 import Request3
|
|
173
|
+
from wordlift_client.models.resource_request import ResourceRequest
|
|
174
|
+
from wordlift_client.models.resource_type import ResourceType
|
|
167
175
|
from wordlift_client.models.response import Response
|
|
168
176
|
from wordlift_client.models.response1 import Response1
|
|
169
177
|
from wordlift_client.models.response2 import Response2
|
|
@@ -187,9 +195,14 @@ from wordlift_client.models.update_question_and_answer_request import UpdateQues
|
|
|
187
195
|
from wordlift_client.models.update_record_request import UpdateRecordRequest
|
|
188
196
|
from wordlift_client.models.update_records_request import UpdateRecordsRequest
|
|
189
197
|
from wordlift_client.models.update_site_url_request import UpdateSiteUrlRequest
|
|
198
|
+
from wordlift_client.models.url_list_item import UrlListItem
|
|
199
|
+
from wordlift_client.models.url_list_response import UrlListResponse
|
|
200
|
+
from wordlift_client.models.url_results_response import UrlResultsResponse
|
|
201
|
+
from wordlift_client.models.url_summary_response import UrlSummaryResponse
|
|
190
202
|
from wordlift_client.models.validation_error import ValidationError
|
|
191
203
|
from wordlift_client.models.validation_error1 import ValidationError1
|
|
192
|
-
from wordlift_client.models.
|
|
204
|
+
from wordlift_client.models.validation_error2 import ValidationError2
|
|
205
|
+
from wordlift_client.models.validation_error2_detail_inner import ValidationError2DetailInner
|
|
193
206
|
from wordlift_client.models.validation_fix import ValidationFix
|
|
194
207
|
from wordlift_client.models.validation_result import ValidationResult
|
|
195
208
|
from wordlift_client.models.validation_type_enum import ValidationTypeEnum
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from wordlift_client.models.validation_error1 import ValidationError1
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class HTTPValidationError1(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
HTTPValidationError1
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
detail: Optional[List[ValidationError1]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["detail"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of HTTPValidationError1 from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in detail (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.detail:
|
|
76
|
+
for _item in self.detail:
|
|
77
|
+
if _item:
|
|
78
|
+
_items.append(_item.to_dict())
|
|
79
|
+
_dict['detail'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of HTTPValidationError1 from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"detail": [ValidationError1.from_dict(_item) for _item in obj["detail"]] if obj.get("detail") is not None else None
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
24
|
+
from wordlift_client.models.monitor_state import MonitorState
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class MonitorResultItem(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
MonitorResultItem
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
monitor_name: StrictStr
|
|
33
|
+
state: MonitorState
|
|
34
|
+
details: Optional[StrictStr] = None
|
|
35
|
+
score: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
|
+
metadata: Optional[Dict[str, Any]] = None
|
|
37
|
+
created_at: datetime
|
|
38
|
+
processed_at: Optional[datetime] = None
|
|
39
|
+
__properties: ClassVar[List[str]] = ["monitor_name", "state", "details", "score", "metadata", "created_at", "processed_at"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of MonitorResultItem from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# set to None if details (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.details is None and "details" in self.model_fields_set:
|
|
83
|
+
_dict['details'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if score (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.score is None and "score" in self.model_fields_set:
|
|
88
|
+
_dict['score'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if processed_at (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.processed_at is None and "processed_at" in self.model_fields_set:
|
|
93
|
+
_dict['processed_at'] = None
|
|
94
|
+
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
+
"""Create an instance of MonitorResultItem from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return cls.model_validate(obj)
|
|
105
|
+
|
|
106
|
+
_obj = cls.model_validate({
|
|
107
|
+
"monitor_name": obj.get("monitor_name"),
|
|
108
|
+
"state": obj.get("state"),
|
|
109
|
+
"details": obj.get("details"),
|
|
110
|
+
"score": obj.get("score"),
|
|
111
|
+
"metadata": obj.get("metadata"),
|
|
112
|
+
"created_at": obj.get("created_at"),
|
|
113
|
+
"processed_at": obj.get("processed_at")
|
|
114
|
+
})
|
|
115
|
+
return _obj
|
|
116
|
+
|
|
117
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class MonitorState(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
MonitorState
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
OK = 'OK'
|
|
31
|
+
WARN = 'WARN'
|
|
32
|
+
FAIL = 'FAIL'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of MonitorState from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from wordlift_client.models.monitor_state import MonitorState
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class MonitorSummaryItem(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
MonitorSummaryItem
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
name: StrictStr
|
|
32
|
+
state: MonitorState
|
|
33
|
+
details: Optional[StrictStr] = None
|
|
34
|
+
score: Optional[Union[StrictFloat, StrictInt]] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "state", "details", "score"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of MonitorSummaryItem from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# set to None if details (nullable) is None
|
|
77
|
+
# and model_fields_set contains the field
|
|
78
|
+
if self.details is None and "details" in self.model_fields_set:
|
|
79
|
+
_dict['details'] = None
|
|
80
|
+
|
|
81
|
+
# set to None if score (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.score is None and "score" in self.model_fields_set:
|
|
84
|
+
_dict['score'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of MonitorSummaryItem from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"name": obj.get("name"),
|
|
99
|
+
"state": obj.get("state"),
|
|
100
|
+
"details": obj.get("details"),
|
|
101
|
+
"score": obj.get("score")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
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
|
|
26
|
+
|
|
27
|
+
class Neighbors(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Neighbors
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
previous: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2083)]] = None
|
|
32
|
+
next: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2083)]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["previous", "next"]
|
|
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 Neighbors 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.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if previous (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
77
|
+
_dict['previous'] = None
|
|
78
|
+
|
|
79
|
+
# set to None if next (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
82
|
+
_dict['next'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of Neighbors from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"previous": obj.get("previous"),
|
|
97
|
+
"next": obj.get("next")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
WordLift API
|
|
5
|
+
|
|
6
|
+
WordLift API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: hello@wordlift.io
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PageInfo(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PageInfo
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
limit: StrictInt
|
|
31
|
+
cursor: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["limit", "cursor"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PageInfo from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# set to None if cursor (nullable) is None
|
|
74
|
+
# and model_fields_set contains the field
|
|
75
|
+
if self.cursor is None and "cursor" in self.model_fields_set:
|
|
76
|
+
_dict['cursor'] = None
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of PageInfo from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"limit": obj.get("limit"),
|
|
91
|
+
"cursor": obj.get("cursor")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|