wordlift-client 1.111.0__py3-none-any.whl → 1.113.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.
@@ -17,8 +17,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
17
  from typing import Any, Dict, List, Optional, Tuple, Union
18
18
  from typing_extensions import Annotated
19
19
 
20
- from wordlift_client.models.request import Request
21
- from wordlift_client.models.response import Response
20
+ from wordlift_client.models.request2 import Request2
21
+ from wordlift_client.models.response1 import Response1
22
22
 
23
23
  from wordlift_client.api_client import ApiClient, RequestSerialized
24
24
  from wordlift_client.api_response import ApiResponse
@@ -41,7 +41,7 @@ class RedeemCodesApi:
41
41
  @validate_call
42
42
  async def redeem_code(
43
43
  self,
44
- request: Request,
44
+ request2: Request2,
45
45
  _request_timeout: Union[
46
46
  None,
47
47
  Annotated[StrictFloat, Field(gt=0)],
@@ -54,12 +54,12 @@ class RedeemCodesApi:
54
54
  _content_type: Optional[StrictStr] = None,
55
55
  _headers: Optional[Dict[StrictStr, Any]] = None,
56
56
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
- ) -> Response:
57
+ ) -> Response1:
58
58
  """Redeem the provided code and get a key
59
59
 
60
60
 
61
- :param request: (required)
62
- :type request: Request
61
+ :param request2: (required)
62
+ :type request2: Request2
63
63
  :param _request_timeout: timeout setting for this request. If one
64
64
  number provided, it will be total request
65
65
  timeout. It can also be a pair (tuple) of
@@ -83,7 +83,7 @@ class RedeemCodesApi:
83
83
  """ # noqa: E501
84
84
 
85
85
  _param = self._redeem_code_serialize(
86
- request=request,
86
+ request2=request2,
87
87
  _request_auth=_request_auth,
88
88
  _content_type=_content_type,
89
89
  _headers=_headers,
@@ -91,7 +91,7 @@ class RedeemCodesApi:
91
91
  )
92
92
 
93
93
  _response_types_map: Dict[str, Optional[str]] = {
94
- '200': "Response",
94
+ '200': "Response1",
95
95
  '404': "ProblemDetail",
96
96
  '409': "ProblemDetail",
97
97
  '500': "ProblemDetail",
@@ -110,7 +110,7 @@ class RedeemCodesApi:
110
110
  @validate_call
111
111
  async def redeem_code_with_http_info(
112
112
  self,
113
- request: Request,
113
+ request2: Request2,
114
114
  _request_timeout: Union[
115
115
  None,
116
116
  Annotated[StrictFloat, Field(gt=0)],
@@ -123,12 +123,12 @@ class RedeemCodesApi:
123
123
  _content_type: Optional[StrictStr] = None,
124
124
  _headers: Optional[Dict[StrictStr, Any]] = None,
125
125
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
- ) -> ApiResponse[Response]:
126
+ ) -> ApiResponse[Response1]:
127
127
  """Redeem the provided code and get a key
128
128
 
129
129
 
130
- :param request: (required)
131
- :type request: Request
130
+ :param request2: (required)
131
+ :type request2: Request2
132
132
  :param _request_timeout: timeout setting for this request. If one
133
133
  number provided, it will be total request
134
134
  timeout. It can also be a pair (tuple) of
@@ -152,7 +152,7 @@ class RedeemCodesApi:
152
152
  """ # noqa: E501
153
153
 
154
154
  _param = self._redeem_code_serialize(
155
- request=request,
155
+ request2=request2,
156
156
  _request_auth=_request_auth,
157
157
  _content_type=_content_type,
158
158
  _headers=_headers,
@@ -160,7 +160,7 @@ class RedeemCodesApi:
160
160
  )
161
161
 
162
162
  _response_types_map: Dict[str, Optional[str]] = {
163
- '200': "Response",
163
+ '200': "Response1",
164
164
  '404': "ProblemDetail",
165
165
  '409': "ProblemDetail",
166
166
  '500': "ProblemDetail",
@@ -179,7 +179,7 @@ class RedeemCodesApi:
179
179
  @validate_call
180
180
  async def redeem_code_without_preload_content(
181
181
  self,
182
- request: Request,
182
+ request2: Request2,
183
183
  _request_timeout: Union[
184
184
  None,
185
185
  Annotated[StrictFloat, Field(gt=0)],
@@ -196,8 +196,8 @@ class RedeemCodesApi:
196
196
  """Redeem the provided code and get a key
197
197
 
198
198
 
199
- :param request: (required)
200
- :type request: Request
199
+ :param request2: (required)
200
+ :type request2: Request2
201
201
  :param _request_timeout: timeout setting for this request. If one
202
202
  number provided, it will be total request
203
203
  timeout. It can also be a pair (tuple) of
@@ -221,7 +221,7 @@ class RedeemCodesApi:
221
221
  """ # noqa: E501
222
222
 
223
223
  _param = self._redeem_code_serialize(
224
- request=request,
224
+ request2=request2,
225
225
  _request_auth=_request_auth,
226
226
  _content_type=_content_type,
227
227
  _headers=_headers,
@@ -229,7 +229,7 @@ class RedeemCodesApi:
229
229
  )
230
230
 
231
231
  _response_types_map: Dict[str, Optional[str]] = {
232
- '200': "Response",
232
+ '200': "Response1",
233
233
  '404': "ProblemDetail",
234
234
  '409': "ProblemDetail",
235
235
  '500': "ProblemDetail",
@@ -243,7 +243,7 @@ class RedeemCodesApi:
243
243
 
244
244
  def _redeem_code_serialize(
245
245
  self,
246
- request,
246
+ request2,
247
247
  _request_auth,
248
248
  _content_type,
249
249
  _headers,
@@ -267,8 +267,8 @@ class RedeemCodesApi:
267
267
  # process the header parameters
268
268
  # process the form parameters
269
269
  # process the body parameter
270
- if request is not None:
271
- _body_params = request
270
+ if request2 is not None:
271
+ _body_params = request2
272
272
 
273
273
 
274
274
  # set the HTTP header `Accept`
@@ -41,7 +41,7 @@ class WebAsyncsMetadataApi:
41
41
 
42
42
 
43
43
  @validate_call
44
- async def get1(
44
+ async def get(
45
45
  self,
46
46
  id: Annotated[StrictStr, Field(description="The Web Async id")],
47
47
  _request_timeout: Union[
@@ -85,7 +85,7 @@ class WebAsyncsMetadataApi:
85
85
  :return: Returns the result object.
86
86
  """ # noqa: E501
87
87
 
88
- _param = self._get1_serialize(
88
+ _param = self._get_serialize(
89
89
  id=id,
90
90
  _request_auth=_request_auth,
91
91
  _content_type=_content_type,
@@ -110,7 +110,7 @@ class WebAsyncsMetadataApi:
110
110
 
111
111
 
112
112
  @validate_call
113
- async def get1_with_http_info(
113
+ async def get_with_http_info(
114
114
  self,
115
115
  id: Annotated[StrictStr, Field(description="The Web Async id")],
116
116
  _request_timeout: Union[
@@ -154,7 +154,7 @@ class WebAsyncsMetadataApi:
154
154
  :return: Returns the result object.
155
155
  """ # noqa: E501
156
156
 
157
- _param = self._get1_serialize(
157
+ _param = self._get_serialize(
158
158
  id=id,
159
159
  _request_auth=_request_auth,
160
160
  _content_type=_content_type,
@@ -179,7 +179,7 @@ class WebAsyncsMetadataApi:
179
179
 
180
180
 
181
181
  @validate_call
182
- async def get1_without_preload_content(
182
+ async def get_without_preload_content(
183
183
  self,
184
184
  id: Annotated[StrictStr, Field(description="The Web Async id")],
185
185
  _request_timeout: Union[
@@ -223,7 +223,7 @@ class WebAsyncsMetadataApi:
223
223
  :return: Returns the result object.
224
224
  """ # noqa: E501
225
225
 
226
- _param = self._get1_serialize(
226
+ _param = self._get_serialize(
227
227
  id=id,
228
228
  _request_auth=_request_auth,
229
229
  _content_type=_content_type,
@@ -243,7 +243,7 @@ class WebAsyncsMetadataApi:
243
243
  return response_data.response
244
244
 
245
245
 
246
- def _get1_serialize(
246
+ def _get_serialize(
247
247
  self,
248
248
  id,
249
249
  _request_auth,
@@ -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.111.0/python'
92
+ self.user_agent = 'OpenAPI-Generator/1.113.0/python'
93
93
  self.client_side_validation = configuration.client_side_validation
94
94
 
95
95
  async def __aenter__(self):
@@ -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.111.0".\
429
+ "SDK Package Version: 1.113.0".\
430
430
  format(env=sys.platform, pyversion=sys.version)
431
431
 
432
432
  def get_host_settings(self):
@@ -37,10 +37,10 @@ class AutocompleteResult(BaseModel):
37
37
  scope: Optional[StrictStr] = None
38
38
  description: Optional[StrictStr] = None
39
39
  main_type: Optional[StrictStr] = Field(default=None, description="Schema type slug", alias="mainType")
40
- value: Optional[StrictStr] = None
41
40
  label: Optional[StrictStr] = None
41
+ value: Optional[StrictStr] = None
42
42
  display_types: Optional[StrictStr] = Field(default=None, alias="displayTypes")
43
- __properties: ClassVar[List[str]] = ["id", "labels", "descriptions", "types", "urls", "images", "sameAss", "scope", "description", "mainType", "value", "label", "displayTypes"]
43
+ __properties: ClassVar[List[str]] = ["id", "labels", "descriptions", "types", "urls", "images", "sameAss", "scope", "description", "mainType", "label", "value", "displayTypes"]
44
44
 
45
45
  @field_validator('scope')
46
46
  def scope_validate_enum(cls, value):
@@ -113,8 +113,8 @@ class AutocompleteResult(BaseModel):
113
113
  "scope": obj.get("scope"),
114
114
  "description": obj.get("description"),
115
115
  "mainType": obj.get("mainType"),
116
- "value": obj.get("value"),
117
116
  "label": obj.get("label"),
117
+ "value": obj.get("value"),
118
118
  "displayTypes": obj.get("displayTypes")
119
119
  })
120
120
  return _obj
@@ -25,10 +25,12 @@ from typing_extensions import Self
25
25
 
26
26
  class Request(BaseModel):
27
27
  """
28
- Request
28
+ The Event request
29
29
  """ # noqa: E501
30
- redeem_code: Optional[StrictStr] = None
31
- __properties: ClassVar[List[str]] = ["redeem_code"]
30
+ source: Optional[StrictStr] = None
31
+ args: Optional[Dict[str, Any]] = None
32
+ url: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["source", "args", "url"]
32
34
 
33
35
  model_config = ConfigDict(
34
36
  populate_by_name=True,
@@ -81,7 +83,9 @@ class Request(BaseModel):
81
83
  return cls.model_validate(obj)
82
84
 
83
85
  _obj = cls.model_validate({
84
- "redeem_code": obj.get("redeem_code")
86
+ "source": obj.get("source"),
87
+ "args": obj.get("args"),
88
+ "url": obj.get("url")
85
89
  })
86
90
  return _obj
87
91
 
@@ -18,37 +18,21 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
23
  from typing import Any, ClassVar, Dict, List, Optional
23
- from typing_extensions import Annotated
24
- from wordlift_client.models.html import Html
25
24
  from typing import Optional, Set
26
25
  from typing_extensions import Self
27
26
 
28
27
  class Request1(BaseModel):
29
28
  """
30
- The request
29
+ Request1
31
30
  """ # noqa: E501
32
- html: Optional[Html] = None
33
- url: Optional[StrictStr] = Field(default=None, description="The url of the page to analyze.")
34
- url_client: Optional[StrictStr] = Field(default=None, description="The client which the analysis should use to extract the content, by default chrome is used.", alias="urlClient")
35
- language: Annotated[str, Field(min_length=2, strict=True, max_length=2)] = Field(description="The content language, 2 letters code, e.g. 'en'.")
36
- text: Optional[StrictStr] = Field(default=None, description="A textual fragment.")
37
- exclude: Optional[List[StrictStr]] = Field(default=None, description="An array of item IDs to exclude from the analysis results.")
38
- scope: StrictStr = Field(description="The scope of the analysis, one of 'local', 'network', 'cloud-only', 'network-only' or 'all'.")
39
- matches: Optional[StrictInt] = Field(default=None, description="Filter out results that don't have at least the specified number of occurrences. By default 1.")
40
- links: Optional[StrictStr] = Field(default=None, description="When returning an interpolated HTML results, matches should have the 'wl-link' class. By default 'no'.")
41
- __properties: ClassVar[List[str]] = ["html", "url", "urlClient", "language", "text", "exclude", "scope", "matches", "links"]
42
-
43
- @field_validator('url_client')
44
- def url_client_validate_enum(cls, value):
45
- """Validates the enum"""
46
- if value is None:
47
- return value
48
-
49
- if value not in set(['CHROME', 'PLAIN_HTTP', 'CHROME, PLAIN_HTTP']):
50
- raise ValueError("must be one of enum values ('CHROME', 'PLAIN_HTTP', 'CHROME, PLAIN_HTTP')")
51
- return value
31
+ completion: Optional[StrictStr] = None
32
+ has_upvote: StrictBool = Field(description="This indicates whether the user upvoted the completion.")
33
+ is_accepted: StrictBool = Field(description="This indicates whether the completion is accepted by the user.")
34
+ validated_at: Optional[datetime] = Field(default=None, description="Validation time of the record - null to revalidate.")
35
+ __properties: ClassVar[List[str]] = ["completion", "has_upvote", "is_accepted", "validated_at"]
52
36
 
53
37
  model_config = ConfigDict(
54
38
  populate_by_name=True,
@@ -89,9 +73,6 @@ class Request1(BaseModel):
89
73
  exclude=excluded_fields,
90
74
  exclude_none=True,
91
75
  )
92
- # override the default output from pydantic by calling `to_dict()` of html
93
- if self.html:
94
- _dict['html'] = self.html.to_dict()
95
76
  return _dict
96
77
 
97
78
  @classmethod
@@ -104,15 +85,10 @@ class Request1(BaseModel):
104
85
  return cls.model_validate(obj)
105
86
 
106
87
  _obj = cls.model_validate({
107
- "html": Html.from_dict(obj["html"]) if obj.get("html") is not None else None,
108
- "url": obj.get("url"),
109
- "urlClient": obj.get("urlClient"),
110
- "language": obj.get("language"),
111
- "text": obj.get("text"),
112
- "exclude": obj.get("exclude"),
113
- "scope": obj.get("scope"),
114
- "matches": obj.get("matches"),
115
- "links": obj.get("links")
88
+ "completion": obj.get("completion"),
89
+ "has_upvote": obj.get("has_upvote"),
90
+ "is_accepted": obj.get("is_accepted"),
91
+ "validated_at": obj.get("validated_at")
116
92
  })
117
93
  return _obj
118
94
 
@@ -25,12 +25,10 @@ from typing_extensions import Self
25
25
 
26
26
  class Request2(BaseModel):
27
27
  """
28
- The Event request
28
+ Request2
29
29
  """ # noqa: E501
30
- source: Optional[StrictStr] = None
31
- args: Optional[Dict[str, Any]] = None
32
- url: Optional[StrictStr] = None
33
- __properties: ClassVar[List[str]] = ["source", "args", "url"]
30
+ redeem_code: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["redeem_code"]
34
32
 
35
33
  model_config = ConfigDict(
36
34
  populate_by_name=True,
@@ -83,9 +81,7 @@ class Request2(BaseModel):
83
81
  return cls.model_validate(obj)
84
82
 
85
83
  _obj = cls.model_validate({
86
- "source": obj.get("source"),
87
- "args": obj.get("args"),
88
- "url": obj.get("url")
84
+ "redeem_code": obj.get("redeem_code")
89
85
  })
90
86
  return _obj
91
87
 
@@ -18,21 +18,37 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from datetime import datetime
22
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
23
22
  from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from wordlift_client.models.html import Html
24
25
  from typing import Optional, Set
25
26
  from typing_extensions import Self
26
27
 
27
28
  class Request3(BaseModel):
28
29
  """
29
- Request3
30
+ The request
30
31
  """ # noqa: E501
31
- completion: Optional[StrictStr] = None
32
- has_upvote: StrictBool = Field(description="This indicates whether the user upvoted the completion.")
33
- is_accepted: StrictBool = Field(description="This indicates whether the completion is accepted by the user.")
34
- validated_at: Optional[datetime] = Field(default=None, description="Validation time of the record - null to revalidate.")
35
- __properties: ClassVar[List[str]] = ["completion", "has_upvote", "is_accepted", "validated_at"]
32
+ html: Optional[Html] = None
33
+ url: Optional[StrictStr] = Field(default=None, description="The url of the page to analyze.")
34
+ url_client: Optional[StrictStr] = Field(default=None, description="The client which the analysis should use to extract the content, by default chrome is used.", alias="urlClient")
35
+ language: Annotated[str, Field(min_length=2, strict=True, max_length=2)] = Field(description="The content language, 2 letters code, e.g. 'en'.")
36
+ text: Optional[StrictStr] = Field(default=None, description="A textual fragment.")
37
+ exclude: Optional[List[StrictStr]] = Field(default=None, description="An array of item IDs to exclude from the analysis results.")
38
+ scope: StrictStr = Field(description="The scope of the analysis, one of 'local', 'network', 'cloud-only', 'network-only' or 'all'.")
39
+ matches: Optional[StrictInt] = Field(default=None, description="Filter out results that don't have at least the specified number of occurrences. By default 1.")
40
+ links: Optional[StrictStr] = Field(default=None, description="When returning an interpolated HTML results, matches should have the 'wl-link' class. By default 'no'.")
41
+ __properties: ClassVar[List[str]] = ["html", "url", "urlClient", "language", "text", "exclude", "scope", "matches", "links"]
42
+
43
+ @field_validator('url_client')
44
+ def url_client_validate_enum(cls, value):
45
+ """Validates the enum"""
46
+ if value is None:
47
+ return value
48
+
49
+ if value not in set(['CHROME', 'PLAIN_HTTP', 'CHROME, PLAIN_HTTP']):
50
+ raise ValueError("must be one of enum values ('CHROME', 'PLAIN_HTTP', 'CHROME, PLAIN_HTTP')")
51
+ return value
36
52
 
37
53
  model_config = ConfigDict(
38
54
  populate_by_name=True,
@@ -73,6 +89,9 @@ class Request3(BaseModel):
73
89
  exclude=excluded_fields,
74
90
  exclude_none=True,
75
91
  )
92
+ # override the default output from pydantic by calling `to_dict()` of html
93
+ if self.html:
94
+ _dict['html'] = self.html.to_dict()
76
95
  return _dict
77
96
 
78
97
  @classmethod
@@ -85,10 +104,15 @@ class Request3(BaseModel):
85
104
  return cls.model_validate(obj)
86
105
 
87
106
  _obj = cls.model_validate({
88
- "completion": obj.get("completion"),
89
- "has_upvote": obj.get("has_upvote"),
90
- "is_accepted": obj.get("is_accepted"),
91
- "validated_at": obj.get("validated_at")
107
+ "html": Html.from_dict(obj["html"]) if obj.get("html") is not None else None,
108
+ "url": obj.get("url"),
109
+ "urlClient": obj.get("urlClient"),
110
+ "language": obj.get("language"),
111
+ "text": obj.get("text"),
112
+ "exclude": obj.get("exclude"),
113
+ "scope": obj.get("scope"),
114
+ "matches": obj.get("matches"),
115
+ "links": obj.get("links")
92
116
  })
93
117
  return _obj
94
118
 
@@ -18,8 +18,9 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
+ from wordlift_client.models.event import Event
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
25
26
 
@@ -27,8 +28,13 @@ class Response(BaseModel):
27
28
  """
28
29
  Response
29
30
  """ # noqa: E501
30
- key: Optional[StrictStr] = None
31
- __properties: ClassVar[List[str]] = ["key"]
31
+ items: Optional[List[Event]] = None
32
+ var_self: Optional[StrictStr] = Field(default=None, alias="self")
33
+ next: Optional[StrictStr] = None
34
+ prev: Optional[StrictStr] = None
35
+ last: Optional[StrictStr] = None
36
+ first: Optional[StrictStr] = None
37
+ __properties: ClassVar[List[str]] = ["items", "self", "next", "prev", "last", "first"]
32
38
 
33
39
  model_config = ConfigDict(
34
40
  populate_by_name=True,
@@ -69,6 +75,13 @@ class Response(BaseModel):
69
75
  exclude=excluded_fields,
70
76
  exclude_none=True,
71
77
  )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
72
85
  return _dict
73
86
 
74
87
  @classmethod
@@ -81,7 +94,12 @@ class Response(BaseModel):
81
94
  return cls.model_validate(obj)
82
95
 
83
96
  _obj = cls.model_validate({
84
- "key": obj.get("key")
97
+ "items": [Event.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
98
+ "self": obj.get("self"),
99
+ "next": obj.get("next"),
100
+ "prev": obj.get("prev"),
101
+ "last": obj.get("last"),
102
+ "first": obj.get("first")
85
103
  })
86
104
  return _obj
87
105
 
@@ -18,26 +18,17 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from wordlift_client.models.annotation import Annotation
24
- from wordlift_client.models.entity1 import Entity1
25
- from wordlift_client.models.image import Image
26
- from wordlift_client.models.topic import Topic
27
23
  from typing import Optional, Set
28
24
  from typing_extensions import Self
29
25
 
30
26
  class Response1(BaseModel):
31
27
  """
32
- Response
28
+ Response1
33
29
  """ # noqa: E501
34
- entities: Optional[Dict[str, Entity1]] = Field(default=None, description="A map of entity URI to the respective entity.")
35
- annotations: Optional[Dict[str, Annotation]] = Field(default=None, description="A map of annotation id to the respective annotation.")
36
- images: Optional[List[Image]] = Field(default=None, description="A list of images.")
37
- languages: Optional[List[StrictStr]] = Field(default=None, description="A list of languages.")
38
- topics: Optional[List[Topic]] = Field(default=None, description="A list of topics.")
39
- content: Optional[StrictStr] = Field(default=None, description="The text supplied for analysis.")
40
- __properties: ClassVar[List[str]] = ["entities", "annotations", "images", "languages", "topics", "content"]
30
+ key: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["key"]
41
32
 
42
33
  model_config = ConfigDict(
43
34
  populate_by_name=True,
@@ -78,34 +69,6 @@ class Response1(BaseModel):
78
69
  exclude=excluded_fields,
79
70
  exclude_none=True,
80
71
  )
81
- # override the default output from pydantic by calling `to_dict()` of each value in entities (dict)
82
- _field_dict = {}
83
- if self.entities:
84
- for _key in self.entities:
85
- if self.entities[_key]:
86
- _field_dict[_key] = self.entities[_key].to_dict()
87
- _dict['entities'] = _field_dict
88
- # override the default output from pydantic by calling `to_dict()` of each value in annotations (dict)
89
- _field_dict = {}
90
- if self.annotations:
91
- for _key in self.annotations:
92
- if self.annotations[_key]:
93
- _field_dict[_key] = self.annotations[_key].to_dict()
94
- _dict['annotations'] = _field_dict
95
- # override the default output from pydantic by calling `to_dict()` of each item in images (list)
96
- _items = []
97
- if self.images:
98
- for _item in self.images:
99
- if _item:
100
- _items.append(_item.to_dict())
101
- _dict['images'] = _items
102
- # override the default output from pydantic by calling `to_dict()` of each item in topics (list)
103
- _items = []
104
- if self.topics:
105
- for _item in self.topics:
106
- if _item:
107
- _items.append(_item.to_dict())
108
- _dict['topics'] = _items
109
72
  return _dict
110
73
 
111
74
  @classmethod
@@ -118,22 +81,7 @@ class Response1(BaseModel):
118
81
  return cls.model_validate(obj)
119
82
 
120
83
  _obj = cls.model_validate({
121
- "entities": dict(
122
- (_k, Entity1.from_dict(_v))
123
- for _k, _v in obj["entities"].items()
124
- )
125
- if obj.get("entities") is not None
126
- else None,
127
- "annotations": dict(
128
- (_k, Annotation.from_dict(_v))
129
- for _k, _v in obj["annotations"].items()
130
- )
131
- if obj.get("annotations") is not None
132
- else None,
133
- "images": [Image.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None,
134
- "languages": obj.get("languages"),
135
- "topics": [Topic.from_dict(_item) for _item in obj["topics"]] if obj.get("topics") is not None else None,
136
- "content": obj.get("content")
84
+ "key": obj.get("key")
137
85
  })
138
86
  return _obj
139
87