kaggle 1.8.0__py3-none-any.whl → 1.8.3__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.
- kaggle/__init__.py +1 -1
- kaggle/api/kaggle_api_extended.py +24 -2
- {kaggle-1.8.0.dist-info → kaggle-1.8.3.dist-info}/METADATA +4 -3
- kaggle-1.8.3.dist-info/RECORD +28 -0
- {kaggle-1.8.0.dist-info → kaggle-1.8.3.dist-info}/WHEEL +1 -1
- kaggle-1.8.0.dist-info/RECORD +0 -148
- kagglesdk/LICENSE +0 -201
- kagglesdk/__init__.py +0 -6
- kagglesdk/admin/__init__.py +0 -0
- kagglesdk/admin/services/__init__.py +0 -0
- kagglesdk/admin/services/inbox_file_service.py +0 -22
- kagglesdk/admin/types/__init__.py +0 -0
- kagglesdk/admin/types/inbox_file_service.py +0 -74
- kagglesdk/benchmarks/__init__.py +0 -0
- kagglesdk/benchmarks/services/__init__.py +0 -0
- kagglesdk/benchmarks/services/benchmarks_api_service.py +0 -19
- kagglesdk/benchmarks/types/__init__.py +0 -0
- kagglesdk/benchmarks/types/benchmark_types.py +0 -307
- kagglesdk/benchmarks/types/benchmarks_api_service.py +0 -243
- kagglesdk/blobs/__init__.py +0 -0
- kagglesdk/blobs/services/__init__.py +0 -0
- kagglesdk/blobs/services/blob_api_service.py +0 -25
- kagglesdk/blobs/types/__init__.py +0 -0
- kagglesdk/blobs/types/blob_api_service.py +0 -177
- kagglesdk/common/__init__.py +0 -0
- kagglesdk/common/services/__init__.py +0 -0
- kagglesdk/common/services/operations_service.py +0 -46
- kagglesdk/common/types/__init__.py +0 -0
- kagglesdk/common/types/file_download.py +0 -102
- kagglesdk/common/types/http_redirect.py +0 -105
- kagglesdk/common/types/operations.py +0 -194
- kagglesdk/common/types/operations_service.py +0 -48
- kagglesdk/community/__init__.py +0 -0
- kagglesdk/community/types/__init__.py +0 -0
- kagglesdk/community/types/content_enums.py +0 -44
- kagglesdk/community/types/organization.py +0 -410
- kagglesdk/competitions/__init__.py +0 -0
- kagglesdk/competitions/services/__init__.py +0 -0
- kagglesdk/competitions/services/competition_api_service.py +0 -178
- kagglesdk/competitions/types/__init__.py +0 -0
- kagglesdk/competitions/types/competition.py +0 -14
- kagglesdk/competitions/types/competition_api_service.py +0 -2393
- kagglesdk/competitions/types/competition_enums.py +0 -53
- kagglesdk/competitions/types/search_competitions.py +0 -28
- kagglesdk/competitions/types/submission_status.py +0 -9
- kagglesdk/datasets/__init__.py +0 -0
- kagglesdk/datasets/databundles/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/databundle_api_types.py +0 -540
- kagglesdk/datasets/services/__init__.py +0 -0
- kagglesdk/datasets/services/dataset_api_service.py +0 -195
- kagglesdk/datasets/types/__init__.py +0 -0
- kagglesdk/datasets/types/dataset_api_service.py +0 -3047
- kagglesdk/datasets/types/dataset_enums.py +0 -103
- kagglesdk/datasets/types/dataset_service.py +0 -145
- kagglesdk/datasets/types/dataset_types.py +0 -646
- kagglesdk/datasets/types/search_datasets.py +0 -6
- kagglesdk/discussions/__init__.py +0 -0
- kagglesdk/discussions/types/__init__.py +0 -0
- kagglesdk/discussions/types/search_discussions.py +0 -43
- kagglesdk/discussions/types/writeup_enums.py +0 -11
- kagglesdk/education/__init__.py +0 -0
- kagglesdk/education/services/__init__.py +0 -0
- kagglesdk/education/services/education_api_service.py +0 -19
- kagglesdk/education/types/__init__.py +0 -0
- kagglesdk/education/types/education_api_service.py +0 -248
- kagglesdk/education/types/education_service.py +0 -139
- kagglesdk/kaggle_client.py +0 -101
- kagglesdk/kaggle_creds.py +0 -148
- kagglesdk/kaggle_env.py +0 -104
- kagglesdk/kaggle_http_client.py +0 -261
- kagglesdk/kaggle_oauth.py +0 -200
- kagglesdk/kaggle_object.py +0 -344
- kagglesdk/kernels/__init__.py +0 -0
- kagglesdk/kernels/services/__init__.py +0 -0
- kagglesdk/kernels/services/kernels_api_service.py +0 -146
- kagglesdk/kernels/types/__init__.py +0 -0
- kagglesdk/kernels/types/kernels_api_service.py +0 -2451
- kagglesdk/kernels/types/kernels_enums.py +0 -39
- kagglesdk/kernels/types/search_kernels.py +0 -6
- kagglesdk/licenses/__init__.py +0 -0
- kagglesdk/licenses/types/__init__.py +0 -0
- kagglesdk/licenses/types/licenses_types.py +0 -182
- kagglesdk/models/__init__.py +0 -0
- kagglesdk/models/services/__init__.py +0 -0
- kagglesdk/models/services/model_api_service.py +0 -280
- kagglesdk/models/services/model_service.py +0 -19
- kagglesdk/models/types/__init__.py +0 -0
- kagglesdk/models/types/model_api_service.py +0 -4069
- kagglesdk/models/types/model_enums.py +0 -68
- kagglesdk/models/types/model_service.py +0 -275
- kagglesdk/models/types/model_types.py +0 -1338
- kagglesdk/models/types/search_models.py +0 -8
- kagglesdk/search/__init__.py +0 -0
- kagglesdk/search/services/__init__.py +0 -0
- kagglesdk/search/services/search_api_service.py +0 -19
- kagglesdk/search/types/__init__.py +0 -0
- kagglesdk/search/types/search_api_service.py +0 -2435
- kagglesdk/search/types/search_content_shared.py +0 -50
- kagglesdk/search/types/search_enums.py +0 -45
- kagglesdk/search/types/search_service.py +0 -303
- kagglesdk/security/__init__.py +0 -0
- kagglesdk/security/services/__init__.py +0 -0
- kagglesdk/security/services/iam_service.py +0 -31
- kagglesdk/security/services/oauth_service.py +0 -58
- kagglesdk/security/types/__init__.py +0 -0
- kagglesdk/security/types/authentication.py +0 -171
- kagglesdk/security/types/iam_service.py +0 -496
- kagglesdk/security/types/oauth_service.py +0 -1181
- kagglesdk/security/types/roles.py +0 -8
- kagglesdk/security/types/security_types.py +0 -159
- kagglesdk/test/__init__.py +0 -0
- kagglesdk/test/test_client.py +0 -41
- kagglesdk/users/__init__.py +0 -0
- kagglesdk/users/services/__init__.py +0 -0
- kagglesdk/users/services/account_service.py +0 -31
- kagglesdk/users/services/group_api_service.py +0 -31
- kagglesdk/users/types/__init__.py +0 -0
- kagglesdk/users/types/account_service.py +0 -345
- kagglesdk/users/types/group_api_service.py +0 -315
- kagglesdk/users/types/group_types.py +0 -165
- kagglesdk/users/types/groups_enum.py +0 -8
- kagglesdk/users/types/progression_service.py +0 -9
- kagglesdk/users/types/search_users.py +0 -23
- kagglesdk/users/types/user_avatar.py +0 -226
- kagglesdk/users/types/users_enums.py +0 -22
- {kaggle-1.8.0.dist-info → kaggle-1.8.3.dist-info}/entry_points.txt +0 -0
- {kaggle-1.8.0.dist-info → kaggle-1.8.3.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -1,2435 +0,0 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
import enum
|
|
3
|
-
from kagglesdk.competitions.types.competition import RewardTypeId
|
|
4
|
-
from kagglesdk.competitions.types.competition_enums import HostSegment
|
|
5
|
-
from kagglesdk.competitions.types.search_competitions import SearchCompetitionsOrderBy, SearchCompetitionsProfileVisibility, SearchCompetitionsRole, SearchCompetitionsStatus
|
|
6
|
-
from kagglesdk.datasets.types.dataset_enums import DatasetFileType, DatasetFileTypeGroup, DatasetLicenseGroup, DatasetSizeGroup
|
|
7
|
-
from kagglesdk.datasets.types.search_datasets import SearchDatasetsOrderBy
|
|
8
|
-
from kagglesdk.discussions.types.search_discussions import SearchDiscussionsDocumentType, SearchDiscussionsOrderBy, SearchDiscussionsSourceType, SearchDiscussionsTopicType, WriteUpInclusionType
|
|
9
|
-
from kagglesdk.discussions.types.writeup_enums import WriteUpType
|
|
10
|
-
from kagglesdk.kaggle_object import *
|
|
11
|
-
from kagglesdk.kernels.types.search_kernels import SearchKernelsOrderBy
|
|
12
|
-
from kagglesdk.models.types.search_models import SearchModelsOrderBy
|
|
13
|
-
from kagglesdk.search.types.search_content_shared import ListSearchContentRangeFilter
|
|
14
|
-
from kagglesdk.search.types.search_enums import DocumentType, ListSearchContentOrderBy, OwnerType, PrivacyFilter
|
|
15
|
-
from kagglesdk.search.types.search_service import WriteUpItemInfo
|
|
16
|
-
from kagglesdk.users.types.progression_service import UserAchievementType
|
|
17
|
-
from kagglesdk.users.types.search_users import SearchUsersOrderBy
|
|
18
|
-
from kagglesdk.users.types.users_enums import UserAchievementTier
|
|
19
|
-
from typing import Optional, List
|
|
20
|
-
|
|
21
|
-
class ApiListType(enum.Enum):
|
|
22
|
-
"""Based on kaggle.search.ListType"""
|
|
23
|
-
API_LIST_TYPE_UNSPECIFIED = 0
|
|
24
|
-
API_LIST_TYPE_YOUR_WORK = 1
|
|
25
|
-
|
|
26
|
-
class ApiOrganizationCard(KaggleObject):
|
|
27
|
-
r"""
|
|
28
|
-
Based on kaggle.users.OrganizationCard
|
|
29
|
-
|
|
30
|
-
Attributes:
|
|
31
|
-
name (str)
|
|
32
|
-
id (int)
|
|
33
|
-
thumbnail_image_url (str)
|
|
34
|
-
slug (str)
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
def __init__(self):
|
|
38
|
-
self._name = ""
|
|
39
|
-
self._id = 0
|
|
40
|
-
self._thumbnail_image_url = ""
|
|
41
|
-
self._slug = ""
|
|
42
|
-
self._freeze()
|
|
43
|
-
|
|
44
|
-
@property
|
|
45
|
-
def name(self) -> str:
|
|
46
|
-
return self._name
|
|
47
|
-
|
|
48
|
-
@name.setter
|
|
49
|
-
def name(self, name: str):
|
|
50
|
-
if name is None:
|
|
51
|
-
del self.name
|
|
52
|
-
return
|
|
53
|
-
if not isinstance(name, str):
|
|
54
|
-
raise TypeError('name must be of type str')
|
|
55
|
-
self._name = name
|
|
56
|
-
|
|
57
|
-
@property
|
|
58
|
-
def id(self) -> int:
|
|
59
|
-
return self._id
|
|
60
|
-
|
|
61
|
-
@id.setter
|
|
62
|
-
def id(self, id: int):
|
|
63
|
-
if id is None:
|
|
64
|
-
del self.id
|
|
65
|
-
return
|
|
66
|
-
if not isinstance(id, int):
|
|
67
|
-
raise TypeError('id must be of type int')
|
|
68
|
-
self._id = id
|
|
69
|
-
|
|
70
|
-
@property
|
|
71
|
-
def thumbnail_image_url(self) -> str:
|
|
72
|
-
return self._thumbnail_image_url
|
|
73
|
-
|
|
74
|
-
@thumbnail_image_url.setter
|
|
75
|
-
def thumbnail_image_url(self, thumbnail_image_url: str):
|
|
76
|
-
if thumbnail_image_url is None:
|
|
77
|
-
del self.thumbnail_image_url
|
|
78
|
-
return
|
|
79
|
-
if not isinstance(thumbnail_image_url, str):
|
|
80
|
-
raise TypeError('thumbnail_image_url must be of type str')
|
|
81
|
-
self._thumbnail_image_url = thumbnail_image_url
|
|
82
|
-
|
|
83
|
-
@property
|
|
84
|
-
def slug(self) -> str:
|
|
85
|
-
return self._slug
|
|
86
|
-
|
|
87
|
-
@slug.setter
|
|
88
|
-
def slug(self, slug: str):
|
|
89
|
-
if slug is None:
|
|
90
|
-
del self.slug
|
|
91
|
-
return
|
|
92
|
-
if not isinstance(slug, str):
|
|
93
|
-
raise TypeError('slug must be of type str')
|
|
94
|
-
self._slug = slug
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class ApiSearchCompetitionsDocument(KaggleObject):
|
|
98
|
-
r"""
|
|
99
|
-
Based on kaggle.competitions.SearchCompetitionsDocument
|
|
100
|
-
|
|
101
|
-
Attributes:
|
|
102
|
-
host_segment (HostSegment)
|
|
103
|
-
The host segment of the Competition
|
|
104
|
-
deadline (datetime)
|
|
105
|
-
The deadline of the Competition
|
|
106
|
-
team_count (int)
|
|
107
|
-
The total number of teams participating in the Competition
|
|
108
|
-
team_rank (int)
|
|
109
|
-
The rank of the current user's team on the Competition
|
|
110
|
-
is_environment_evaluation (bool)
|
|
111
|
-
Whether the Competition has an environment evaluation
|
|
112
|
-
prize_type (RewardTypeId)
|
|
113
|
-
The prize/award type of the Competition
|
|
114
|
-
prize_value (float)
|
|
115
|
-
The prize/award value of the Competition
|
|
116
|
-
is_launched (bool)
|
|
117
|
-
Whether the competition has launched (even if it's ended)
|
|
118
|
-
owner_user_has_joined (bool)
|
|
119
|
-
Whether the owner user (profile user, then current user) has joined the
|
|
120
|
-
competition
|
|
121
|
-
is_limited_participation (bool)
|
|
122
|
-
Whether the competition is a limited participation competition
|
|
123
|
-
only_allow_kernel_submissions (bool)
|
|
124
|
-
Whether only kernel submissions are allowed
|
|
125
|
-
"""
|
|
126
|
-
|
|
127
|
-
def __init__(self):
|
|
128
|
-
self._host_segment = HostSegment.HOST_SEGMENT_UNSPECIFIED
|
|
129
|
-
self._deadline = None
|
|
130
|
-
self._team_count = 0
|
|
131
|
-
self._team_rank = None
|
|
132
|
-
self._is_environment_evaluation = False
|
|
133
|
-
self._prize_type = RewardTypeId.REWARD_TYPE_ID_UNSPECIFIED
|
|
134
|
-
self._prize_value = None
|
|
135
|
-
self._is_launched = False
|
|
136
|
-
self._owner_user_has_joined = False
|
|
137
|
-
self._is_limited_participation = False
|
|
138
|
-
self._only_allow_kernel_submissions = False
|
|
139
|
-
self._freeze()
|
|
140
|
-
|
|
141
|
-
@property
|
|
142
|
-
def host_segment(self) -> 'HostSegment':
|
|
143
|
-
"""The host segment of the Competition"""
|
|
144
|
-
return self._host_segment
|
|
145
|
-
|
|
146
|
-
@host_segment.setter
|
|
147
|
-
def host_segment(self, host_segment: 'HostSegment'):
|
|
148
|
-
if host_segment is None:
|
|
149
|
-
del self.host_segment
|
|
150
|
-
return
|
|
151
|
-
if not isinstance(host_segment, HostSegment):
|
|
152
|
-
raise TypeError('host_segment must be of type HostSegment')
|
|
153
|
-
self._host_segment = host_segment
|
|
154
|
-
|
|
155
|
-
@property
|
|
156
|
-
def deadline(self) -> datetime:
|
|
157
|
-
"""The deadline of the Competition"""
|
|
158
|
-
return self._deadline
|
|
159
|
-
|
|
160
|
-
@deadline.setter
|
|
161
|
-
def deadline(self, deadline: datetime):
|
|
162
|
-
if deadline is None:
|
|
163
|
-
del self.deadline
|
|
164
|
-
return
|
|
165
|
-
if not isinstance(deadline, datetime):
|
|
166
|
-
raise TypeError('deadline must be of type datetime')
|
|
167
|
-
self._deadline = deadline
|
|
168
|
-
|
|
169
|
-
@property
|
|
170
|
-
def team_count(self) -> int:
|
|
171
|
-
"""The total number of teams participating in the Competition"""
|
|
172
|
-
return self._team_count
|
|
173
|
-
|
|
174
|
-
@team_count.setter
|
|
175
|
-
def team_count(self, team_count: int):
|
|
176
|
-
if team_count is None:
|
|
177
|
-
del self.team_count
|
|
178
|
-
return
|
|
179
|
-
if not isinstance(team_count, int):
|
|
180
|
-
raise TypeError('team_count must be of type int')
|
|
181
|
-
self._team_count = team_count
|
|
182
|
-
|
|
183
|
-
@property
|
|
184
|
-
def team_rank(self) -> int:
|
|
185
|
-
"""The rank of the current user's team on the Competition"""
|
|
186
|
-
return self._team_rank or 0
|
|
187
|
-
|
|
188
|
-
@team_rank.setter
|
|
189
|
-
def team_rank(self, team_rank: Optional[int]):
|
|
190
|
-
if team_rank is None:
|
|
191
|
-
del self.team_rank
|
|
192
|
-
return
|
|
193
|
-
if not isinstance(team_rank, int):
|
|
194
|
-
raise TypeError('team_rank must be of type int')
|
|
195
|
-
self._team_rank = team_rank
|
|
196
|
-
|
|
197
|
-
@property
|
|
198
|
-
def is_environment_evaluation(self) -> bool:
|
|
199
|
-
"""Whether the Competition has an environment evaluation"""
|
|
200
|
-
return self._is_environment_evaluation
|
|
201
|
-
|
|
202
|
-
@is_environment_evaluation.setter
|
|
203
|
-
def is_environment_evaluation(self, is_environment_evaluation: bool):
|
|
204
|
-
if is_environment_evaluation is None:
|
|
205
|
-
del self.is_environment_evaluation
|
|
206
|
-
return
|
|
207
|
-
if not isinstance(is_environment_evaluation, bool):
|
|
208
|
-
raise TypeError('is_environment_evaluation must be of type bool')
|
|
209
|
-
self._is_environment_evaluation = is_environment_evaluation
|
|
210
|
-
|
|
211
|
-
@property
|
|
212
|
-
def prize_type(self) -> 'RewardTypeId':
|
|
213
|
-
"""The prize/award type of the Competition"""
|
|
214
|
-
return self._prize_type
|
|
215
|
-
|
|
216
|
-
@prize_type.setter
|
|
217
|
-
def prize_type(self, prize_type: 'RewardTypeId'):
|
|
218
|
-
if prize_type is None:
|
|
219
|
-
del self.prize_type
|
|
220
|
-
return
|
|
221
|
-
if not isinstance(prize_type, RewardTypeId):
|
|
222
|
-
raise TypeError('prize_type must be of type RewardTypeId')
|
|
223
|
-
self._prize_type = prize_type
|
|
224
|
-
|
|
225
|
-
@property
|
|
226
|
-
def prize_value(self) -> float:
|
|
227
|
-
"""The prize/award value of the Competition"""
|
|
228
|
-
return self._prize_value or 0.0
|
|
229
|
-
|
|
230
|
-
@prize_value.setter
|
|
231
|
-
def prize_value(self, prize_value: Optional[float]):
|
|
232
|
-
if prize_value is None:
|
|
233
|
-
del self.prize_value
|
|
234
|
-
return
|
|
235
|
-
if not isinstance(prize_value, float):
|
|
236
|
-
raise TypeError('prize_value must be of type float')
|
|
237
|
-
self._prize_value = prize_value
|
|
238
|
-
|
|
239
|
-
@property
|
|
240
|
-
def is_launched(self) -> bool:
|
|
241
|
-
"""Whether the competition has launched (even if it's ended)"""
|
|
242
|
-
return self._is_launched
|
|
243
|
-
|
|
244
|
-
@is_launched.setter
|
|
245
|
-
def is_launched(self, is_launched: bool):
|
|
246
|
-
if is_launched is None:
|
|
247
|
-
del self.is_launched
|
|
248
|
-
return
|
|
249
|
-
if not isinstance(is_launched, bool):
|
|
250
|
-
raise TypeError('is_launched must be of type bool')
|
|
251
|
-
self._is_launched = is_launched
|
|
252
|
-
|
|
253
|
-
@property
|
|
254
|
-
def owner_user_has_joined(self) -> bool:
|
|
255
|
-
r"""
|
|
256
|
-
Whether the owner user (profile user, then current user) has joined the
|
|
257
|
-
competition
|
|
258
|
-
"""
|
|
259
|
-
return self._owner_user_has_joined
|
|
260
|
-
|
|
261
|
-
@owner_user_has_joined.setter
|
|
262
|
-
def owner_user_has_joined(self, owner_user_has_joined: bool):
|
|
263
|
-
if owner_user_has_joined is None:
|
|
264
|
-
del self.owner_user_has_joined
|
|
265
|
-
return
|
|
266
|
-
if not isinstance(owner_user_has_joined, bool):
|
|
267
|
-
raise TypeError('owner_user_has_joined must be of type bool')
|
|
268
|
-
self._owner_user_has_joined = owner_user_has_joined
|
|
269
|
-
|
|
270
|
-
@property
|
|
271
|
-
def is_limited_participation(self) -> bool:
|
|
272
|
-
"""Whether the competition is a limited participation competition"""
|
|
273
|
-
return self._is_limited_participation
|
|
274
|
-
|
|
275
|
-
@is_limited_participation.setter
|
|
276
|
-
def is_limited_participation(self, is_limited_participation: bool):
|
|
277
|
-
if is_limited_participation is None:
|
|
278
|
-
del self.is_limited_participation
|
|
279
|
-
return
|
|
280
|
-
if not isinstance(is_limited_participation, bool):
|
|
281
|
-
raise TypeError('is_limited_participation must be of type bool')
|
|
282
|
-
self._is_limited_participation = is_limited_participation
|
|
283
|
-
|
|
284
|
-
@property
|
|
285
|
-
def only_allow_kernel_submissions(self) -> bool:
|
|
286
|
-
"""Whether only kernel submissions are allowed"""
|
|
287
|
-
return self._only_allow_kernel_submissions
|
|
288
|
-
|
|
289
|
-
@only_allow_kernel_submissions.setter
|
|
290
|
-
def only_allow_kernel_submissions(self, only_allow_kernel_submissions: bool):
|
|
291
|
-
if only_allow_kernel_submissions is None:
|
|
292
|
-
del self.only_allow_kernel_submissions
|
|
293
|
-
return
|
|
294
|
-
if not isinstance(only_allow_kernel_submissions, bool):
|
|
295
|
-
raise TypeError('only_allow_kernel_submissions must be of type bool')
|
|
296
|
-
self._only_allow_kernel_submissions = only_allow_kernel_submissions
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
class ApiSearchCompetitionsFilters(KaggleObject):
|
|
300
|
-
r"""
|
|
301
|
-
Based on kaggle.competitions.SearchCompetitionsFilters
|
|
302
|
-
|
|
303
|
-
Attributes:
|
|
304
|
-
role (SearchCompetitionsRole)
|
|
305
|
-
The Competition role used to filter the documents
|
|
306
|
-
status (SearchCompetitionsStatus)
|
|
307
|
-
The Competition status used to filter the documents
|
|
308
|
-
profile_visibility (SearchCompetitionsProfileVisibility)
|
|
309
|
-
Competition visibility status on user profile
|
|
310
|
-
earned_medal (bool)
|
|
311
|
-
Whether to return documents that the owner_user_id earned a medal for.
|
|
312
|
-
"""
|
|
313
|
-
|
|
314
|
-
def __init__(self):
|
|
315
|
-
self._role = SearchCompetitionsRole.SEARCH_COMPETITIONS_ROLE_ANY
|
|
316
|
-
self._status = SearchCompetitionsStatus.SEARCH_COMPETITIONS_STATUS_ANY
|
|
317
|
-
self._profile_visibility = SearchCompetitionsProfileVisibility.SEARCH_COMPETITIONS_PROFILE_VISIBILITY_ANY
|
|
318
|
-
self._earned_medal = None
|
|
319
|
-
self._freeze()
|
|
320
|
-
|
|
321
|
-
@property
|
|
322
|
-
def role(self) -> 'SearchCompetitionsRole':
|
|
323
|
-
"""The Competition role used to filter the documents"""
|
|
324
|
-
return self._role
|
|
325
|
-
|
|
326
|
-
@role.setter
|
|
327
|
-
def role(self, role: 'SearchCompetitionsRole'):
|
|
328
|
-
if role is None:
|
|
329
|
-
del self.role
|
|
330
|
-
return
|
|
331
|
-
if not isinstance(role, SearchCompetitionsRole):
|
|
332
|
-
raise TypeError('role must be of type SearchCompetitionsRole')
|
|
333
|
-
self._role = role
|
|
334
|
-
|
|
335
|
-
@property
|
|
336
|
-
def status(self) -> 'SearchCompetitionsStatus':
|
|
337
|
-
"""The Competition status used to filter the documents"""
|
|
338
|
-
return self._status
|
|
339
|
-
|
|
340
|
-
@status.setter
|
|
341
|
-
def status(self, status: 'SearchCompetitionsStatus'):
|
|
342
|
-
if status is None:
|
|
343
|
-
del self.status
|
|
344
|
-
return
|
|
345
|
-
if not isinstance(status, SearchCompetitionsStatus):
|
|
346
|
-
raise TypeError('status must be of type SearchCompetitionsStatus')
|
|
347
|
-
self._status = status
|
|
348
|
-
|
|
349
|
-
@property
|
|
350
|
-
def profile_visibility(self) -> 'SearchCompetitionsProfileVisibility':
|
|
351
|
-
"""Competition visibility status on user profile"""
|
|
352
|
-
return self._profile_visibility
|
|
353
|
-
|
|
354
|
-
@profile_visibility.setter
|
|
355
|
-
def profile_visibility(self, profile_visibility: 'SearchCompetitionsProfileVisibility'):
|
|
356
|
-
if profile_visibility is None:
|
|
357
|
-
del self.profile_visibility
|
|
358
|
-
return
|
|
359
|
-
if not isinstance(profile_visibility, SearchCompetitionsProfileVisibility):
|
|
360
|
-
raise TypeError('profile_visibility must be of type SearchCompetitionsProfileVisibility')
|
|
361
|
-
self._profile_visibility = profile_visibility
|
|
362
|
-
|
|
363
|
-
@property
|
|
364
|
-
def earned_medal(self) -> bool:
|
|
365
|
-
"""Whether to return documents that the owner_user_id earned a medal for."""
|
|
366
|
-
return self._earned_medal or False
|
|
367
|
-
|
|
368
|
-
@earned_medal.setter
|
|
369
|
-
def earned_medal(self, earned_medal: Optional[bool]):
|
|
370
|
-
if earned_medal is None:
|
|
371
|
-
del self.earned_medal
|
|
372
|
-
return
|
|
373
|
-
if not isinstance(earned_medal, bool):
|
|
374
|
-
raise TypeError('earned_medal must be of type bool')
|
|
375
|
-
self._earned_medal = earned_medal
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
class ApiSearchDatasetsDocument(KaggleObject):
|
|
379
|
-
r"""
|
|
380
|
-
Based on kaggle.datasets.SearchDatasetsDocument
|
|
381
|
-
|
|
382
|
-
Attributes:
|
|
383
|
-
usability_rating (float)
|
|
384
|
-
The usability rating of the Dataset
|
|
385
|
-
file_count (int)
|
|
386
|
-
How many files the Dataset has
|
|
387
|
-
file_types (DatasetFileType)
|
|
388
|
-
The file types of all the files in the Dataset
|
|
389
|
-
size (int)
|
|
390
|
-
The size of the Dataset
|
|
391
|
-
"""
|
|
392
|
-
|
|
393
|
-
def __init__(self):
|
|
394
|
-
self._usability_rating = 0.0
|
|
395
|
-
self._file_count = 0
|
|
396
|
-
self._file_types = []
|
|
397
|
-
self._size = 0
|
|
398
|
-
self._freeze()
|
|
399
|
-
|
|
400
|
-
@property
|
|
401
|
-
def usability_rating(self) -> float:
|
|
402
|
-
"""The usability rating of the Dataset"""
|
|
403
|
-
return self._usability_rating
|
|
404
|
-
|
|
405
|
-
@usability_rating.setter
|
|
406
|
-
def usability_rating(self, usability_rating: float):
|
|
407
|
-
if usability_rating is None:
|
|
408
|
-
del self.usability_rating
|
|
409
|
-
return
|
|
410
|
-
if not isinstance(usability_rating, float):
|
|
411
|
-
raise TypeError('usability_rating must be of type float')
|
|
412
|
-
self._usability_rating = usability_rating
|
|
413
|
-
|
|
414
|
-
@property
|
|
415
|
-
def file_count(self) -> int:
|
|
416
|
-
"""How many files the Dataset has"""
|
|
417
|
-
return self._file_count
|
|
418
|
-
|
|
419
|
-
@file_count.setter
|
|
420
|
-
def file_count(self, file_count: int):
|
|
421
|
-
if file_count is None:
|
|
422
|
-
del self.file_count
|
|
423
|
-
return
|
|
424
|
-
if not isinstance(file_count, int):
|
|
425
|
-
raise TypeError('file_count must be of type int')
|
|
426
|
-
self._file_count = file_count
|
|
427
|
-
|
|
428
|
-
@property
|
|
429
|
-
def file_types(self) -> Optional[List['DatasetFileType']]:
|
|
430
|
-
"""The file types of all the files in the Dataset"""
|
|
431
|
-
return self._file_types
|
|
432
|
-
|
|
433
|
-
@file_types.setter
|
|
434
|
-
def file_types(self, file_types: Optional[List['DatasetFileType']]):
|
|
435
|
-
if file_types is None:
|
|
436
|
-
del self.file_types
|
|
437
|
-
return
|
|
438
|
-
if not isinstance(file_types, list):
|
|
439
|
-
raise TypeError('file_types must be of type list')
|
|
440
|
-
if not all([isinstance(t, DatasetFileType) for t in file_types]):
|
|
441
|
-
raise TypeError('file_types must contain only items of type DatasetFileType')
|
|
442
|
-
self._file_types = file_types
|
|
443
|
-
|
|
444
|
-
@property
|
|
445
|
-
def size(self) -> int:
|
|
446
|
-
"""The size of the Dataset"""
|
|
447
|
-
return self._size
|
|
448
|
-
|
|
449
|
-
@size.setter
|
|
450
|
-
def size(self, size: int):
|
|
451
|
-
if size is None:
|
|
452
|
-
del self.size
|
|
453
|
-
return
|
|
454
|
-
if not isinstance(size, int):
|
|
455
|
-
raise TypeError('size must be of type int')
|
|
456
|
-
self._size = size
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
class ApiSearchDatasetsFilters(KaggleObject):
|
|
460
|
-
r"""
|
|
461
|
-
Based on kaggle.datasets.SearchDiscussionsFilters
|
|
462
|
-
|
|
463
|
-
Attributes:
|
|
464
|
-
file_type (DatasetFileTypeGroup)
|
|
465
|
-
The file types used to filter the documents
|
|
466
|
-
license_group (DatasetLicenseGroup)
|
|
467
|
-
The license groups used to filter the documents
|
|
468
|
-
size (DatasetSizeGroup)
|
|
469
|
-
The dataset size range used to filter the documents
|
|
470
|
-
earned_medal (bool)
|
|
471
|
-
Whether to return documents that the owner_user_id earned a medal for.
|
|
472
|
-
"""
|
|
473
|
-
|
|
474
|
-
def __init__(self):
|
|
475
|
-
self._file_type = DatasetFileTypeGroup.DATASET_FILE_TYPE_GROUP_ALL
|
|
476
|
-
self._license_group = None
|
|
477
|
-
self._size = None
|
|
478
|
-
self._earned_medal = None
|
|
479
|
-
self._freeze()
|
|
480
|
-
|
|
481
|
-
@property
|
|
482
|
-
def file_type(self) -> 'DatasetFileTypeGroup':
|
|
483
|
-
"""The file types used to filter the documents"""
|
|
484
|
-
return self._file_type
|
|
485
|
-
|
|
486
|
-
@file_type.setter
|
|
487
|
-
def file_type(self, file_type: 'DatasetFileTypeGroup'):
|
|
488
|
-
if file_type is None:
|
|
489
|
-
del self.file_type
|
|
490
|
-
return
|
|
491
|
-
if not isinstance(file_type, DatasetFileTypeGroup):
|
|
492
|
-
raise TypeError('file_type must be of type DatasetFileTypeGroup')
|
|
493
|
-
self._file_type = file_type
|
|
494
|
-
|
|
495
|
-
@property
|
|
496
|
-
def license_group(self) -> 'DatasetLicenseGroup':
|
|
497
|
-
"""The license groups used to filter the documents"""
|
|
498
|
-
return self._license_group or DatasetLicenseGroup.DATASET_LICENSE_GROUP_ALL
|
|
499
|
-
|
|
500
|
-
@license_group.setter
|
|
501
|
-
def license_group(self, license_group: Optional['DatasetLicenseGroup']):
|
|
502
|
-
if license_group is None:
|
|
503
|
-
del self.license_group
|
|
504
|
-
return
|
|
505
|
-
if not isinstance(license_group, DatasetLicenseGroup):
|
|
506
|
-
raise TypeError('license_group must be of type DatasetLicenseGroup')
|
|
507
|
-
self._license_group = license_group
|
|
508
|
-
|
|
509
|
-
@property
|
|
510
|
-
def size(self) -> 'DatasetSizeGroup':
|
|
511
|
-
"""The dataset size range used to filter the documents"""
|
|
512
|
-
return self._size or DatasetSizeGroup.DATASET_SIZE_GROUP_ALL
|
|
513
|
-
|
|
514
|
-
@size.setter
|
|
515
|
-
def size(self, size: Optional['DatasetSizeGroup']):
|
|
516
|
-
if size is None:
|
|
517
|
-
del self.size
|
|
518
|
-
return
|
|
519
|
-
if not isinstance(size, DatasetSizeGroup):
|
|
520
|
-
raise TypeError('size must be of type DatasetSizeGroup')
|
|
521
|
-
self._size = size
|
|
522
|
-
|
|
523
|
-
@property
|
|
524
|
-
def earned_medal(self) -> bool:
|
|
525
|
-
"""Whether to return documents that the owner_user_id earned a medal for."""
|
|
526
|
-
return self._earned_medal or False
|
|
527
|
-
|
|
528
|
-
@earned_medal.setter
|
|
529
|
-
def earned_medal(self, earned_medal: Optional[bool]):
|
|
530
|
-
if earned_medal is None:
|
|
531
|
-
del self.earned_medal
|
|
532
|
-
return
|
|
533
|
-
if not isinstance(earned_medal, bool):
|
|
534
|
-
raise TypeError('earned_medal must be of type bool')
|
|
535
|
-
self._earned_medal = earned_medal
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
class ApiSearchDiscussionsDocument(KaggleObject):
|
|
539
|
-
r"""
|
|
540
|
-
Based on kaggle.discussions.SearchDiscussionsDocument
|
|
541
|
-
|
|
542
|
-
Attributes:
|
|
543
|
-
new_comment_url (str)
|
|
544
|
-
message_stripped (str)
|
|
545
|
-
The message of the topic/comment, stripped of HTML (at time of index)
|
|
546
|
-
message_markdown (str)
|
|
547
|
-
The markdown for the message of the topic/comment
|
|
548
|
-
forum_name (str)
|
|
549
|
-
The name of the parent forum
|
|
550
|
-
forum_url (str)
|
|
551
|
-
The URL for the parent forum
|
|
552
|
-
source_type (SearchDiscussionsSourceType)
|
|
553
|
-
The source type of the comment
|
|
554
|
-
topic_type (SearchDiscussionsTopicType)
|
|
555
|
-
The type of topic returned
|
|
556
|
-
type (SearchDiscussionsDocumentType)
|
|
557
|
-
The type of document returned
|
|
558
|
-
write_up_metadata (WriteUpItemInfo)
|
|
559
|
-
If the document is a WriteUp, extra WriteUp-specific data
|
|
560
|
-
is provided
|
|
561
|
-
"""
|
|
562
|
-
|
|
563
|
-
def __init__(self):
|
|
564
|
-
self._new_comment_url = None
|
|
565
|
-
self._message_stripped = ""
|
|
566
|
-
self._message_markdown = None
|
|
567
|
-
self._forum_name = ""
|
|
568
|
-
self._forum_url = None
|
|
569
|
-
self._source_type = SearchDiscussionsSourceType.SEARCH_DISCUSSIONS_SOURCE_TYPE_UNSPECIFIED
|
|
570
|
-
self._topic_type = SearchDiscussionsTopicType.SEARCH_DISCUSSIONS_TOPIC_TYPE_UNSPECIFIED
|
|
571
|
-
self._type = SearchDiscussionsDocumentType.SEARCH_DISCUSSIONS_DOCUMENT_TYPE_UNSPECIFIED
|
|
572
|
-
self._write_up_metadata = None
|
|
573
|
-
self._freeze()
|
|
574
|
-
|
|
575
|
-
@property
|
|
576
|
-
def new_comment_url(self) -> str:
|
|
577
|
-
return self._new_comment_url or ""
|
|
578
|
-
|
|
579
|
-
@new_comment_url.setter
|
|
580
|
-
def new_comment_url(self, new_comment_url: Optional[str]):
|
|
581
|
-
if new_comment_url is None:
|
|
582
|
-
del self.new_comment_url
|
|
583
|
-
return
|
|
584
|
-
if not isinstance(new_comment_url, str):
|
|
585
|
-
raise TypeError('new_comment_url must be of type str')
|
|
586
|
-
self._new_comment_url = new_comment_url
|
|
587
|
-
|
|
588
|
-
@property
|
|
589
|
-
def message_stripped(self) -> str:
|
|
590
|
-
"""The message of the topic/comment, stripped of HTML (at time of index)"""
|
|
591
|
-
return self._message_stripped
|
|
592
|
-
|
|
593
|
-
@message_stripped.setter
|
|
594
|
-
def message_stripped(self, message_stripped: str):
|
|
595
|
-
if message_stripped is None:
|
|
596
|
-
del self.message_stripped
|
|
597
|
-
return
|
|
598
|
-
if not isinstance(message_stripped, str):
|
|
599
|
-
raise TypeError('message_stripped must be of type str')
|
|
600
|
-
self._message_stripped = message_stripped
|
|
601
|
-
|
|
602
|
-
@property
|
|
603
|
-
def message_markdown(self) -> str:
|
|
604
|
-
"""The markdown for the message of the topic/comment"""
|
|
605
|
-
return self._message_markdown or ""
|
|
606
|
-
|
|
607
|
-
@message_markdown.setter
|
|
608
|
-
def message_markdown(self, message_markdown: Optional[str]):
|
|
609
|
-
if message_markdown is None:
|
|
610
|
-
del self.message_markdown
|
|
611
|
-
return
|
|
612
|
-
if not isinstance(message_markdown, str):
|
|
613
|
-
raise TypeError('message_markdown must be of type str')
|
|
614
|
-
self._message_markdown = message_markdown
|
|
615
|
-
|
|
616
|
-
@property
|
|
617
|
-
def forum_name(self) -> str:
|
|
618
|
-
"""The name of the parent forum"""
|
|
619
|
-
return self._forum_name
|
|
620
|
-
|
|
621
|
-
@forum_name.setter
|
|
622
|
-
def forum_name(self, forum_name: str):
|
|
623
|
-
if forum_name is None:
|
|
624
|
-
del self.forum_name
|
|
625
|
-
return
|
|
626
|
-
if not isinstance(forum_name, str):
|
|
627
|
-
raise TypeError('forum_name must be of type str')
|
|
628
|
-
self._forum_name = forum_name
|
|
629
|
-
|
|
630
|
-
@property
|
|
631
|
-
def forum_url(self) -> str:
|
|
632
|
-
"""The URL for the parent forum"""
|
|
633
|
-
return self._forum_url or ""
|
|
634
|
-
|
|
635
|
-
@forum_url.setter
|
|
636
|
-
def forum_url(self, forum_url: Optional[str]):
|
|
637
|
-
if forum_url is None:
|
|
638
|
-
del self.forum_url
|
|
639
|
-
return
|
|
640
|
-
if not isinstance(forum_url, str):
|
|
641
|
-
raise TypeError('forum_url must be of type str')
|
|
642
|
-
self._forum_url = forum_url
|
|
643
|
-
|
|
644
|
-
@property
|
|
645
|
-
def source_type(self) -> 'SearchDiscussionsSourceType':
|
|
646
|
-
"""The source type of the comment"""
|
|
647
|
-
return self._source_type
|
|
648
|
-
|
|
649
|
-
@source_type.setter
|
|
650
|
-
def source_type(self, source_type: 'SearchDiscussionsSourceType'):
|
|
651
|
-
if source_type is None:
|
|
652
|
-
del self.source_type
|
|
653
|
-
return
|
|
654
|
-
if not isinstance(source_type, SearchDiscussionsSourceType):
|
|
655
|
-
raise TypeError('source_type must be of type SearchDiscussionsSourceType')
|
|
656
|
-
self._source_type = source_type
|
|
657
|
-
|
|
658
|
-
@property
|
|
659
|
-
def topic_type(self) -> 'SearchDiscussionsTopicType':
|
|
660
|
-
"""The type of topic returned"""
|
|
661
|
-
return self._topic_type
|
|
662
|
-
|
|
663
|
-
@topic_type.setter
|
|
664
|
-
def topic_type(self, topic_type: 'SearchDiscussionsTopicType'):
|
|
665
|
-
if topic_type is None:
|
|
666
|
-
del self.topic_type
|
|
667
|
-
return
|
|
668
|
-
if not isinstance(topic_type, SearchDiscussionsTopicType):
|
|
669
|
-
raise TypeError('topic_type must be of type SearchDiscussionsTopicType')
|
|
670
|
-
self._topic_type = topic_type
|
|
671
|
-
|
|
672
|
-
@property
|
|
673
|
-
def type(self) -> 'SearchDiscussionsDocumentType':
|
|
674
|
-
"""The type of document returned"""
|
|
675
|
-
return self._type
|
|
676
|
-
|
|
677
|
-
@type.setter
|
|
678
|
-
def type(self, type: 'SearchDiscussionsDocumentType'):
|
|
679
|
-
if type is None:
|
|
680
|
-
del self.type
|
|
681
|
-
return
|
|
682
|
-
if not isinstance(type, SearchDiscussionsDocumentType):
|
|
683
|
-
raise TypeError('type must be of type SearchDiscussionsDocumentType')
|
|
684
|
-
self._type = type
|
|
685
|
-
|
|
686
|
-
@property
|
|
687
|
-
def write_up_metadata(self) -> Optional['WriteUpItemInfo']:
|
|
688
|
-
r"""
|
|
689
|
-
If the document is a WriteUp, extra WriteUp-specific data
|
|
690
|
-
is provided
|
|
691
|
-
"""
|
|
692
|
-
return self._write_up_metadata or None
|
|
693
|
-
|
|
694
|
-
@write_up_metadata.setter
|
|
695
|
-
def write_up_metadata(self, write_up_metadata: Optional[Optional['WriteUpItemInfo']]):
|
|
696
|
-
if write_up_metadata is None:
|
|
697
|
-
del self.write_up_metadata
|
|
698
|
-
return
|
|
699
|
-
if not isinstance(write_up_metadata, WriteUpItemInfo):
|
|
700
|
-
raise TypeError('write_up_metadata must be of type WriteUpItemInfo')
|
|
701
|
-
self._write_up_metadata = write_up_metadata
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
class ApiSearchDiscussionsFilters(KaggleObject):
|
|
705
|
-
r"""
|
|
706
|
-
Based on kaggle.discussions.SearchDiscussionsFilters
|
|
707
|
-
|
|
708
|
-
Attributes:
|
|
709
|
-
source_type (SearchDiscussionsSourceType)
|
|
710
|
-
The discussion source type used to filter the documents
|
|
711
|
-
only_new_comments (bool)
|
|
712
|
-
Show only topics with new comments
|
|
713
|
-
write_up_inclusion_type (WriteUpInclusionType)
|
|
714
|
-
Determines whether or not WriteUps should be included
|
|
715
|
-
write_up_types (WriteUpType)
|
|
716
|
-
Filters on WriteUp type
|
|
717
|
-
"""
|
|
718
|
-
|
|
719
|
-
def __init__(self):
|
|
720
|
-
self._source_type = SearchDiscussionsSourceType.SEARCH_DISCUSSIONS_SOURCE_TYPE_UNSPECIFIED
|
|
721
|
-
self._only_new_comments = False
|
|
722
|
-
self._write_up_inclusion_type = WriteUpInclusionType.WRITE_UP_INCLUSION_TYPE_UNSPECIFIED
|
|
723
|
-
self._write_up_types = []
|
|
724
|
-
self._freeze()
|
|
725
|
-
|
|
726
|
-
@property
|
|
727
|
-
def source_type(self) -> 'SearchDiscussionsSourceType':
|
|
728
|
-
"""The discussion source type used to filter the documents"""
|
|
729
|
-
return self._source_type
|
|
730
|
-
|
|
731
|
-
@source_type.setter
|
|
732
|
-
def source_type(self, source_type: 'SearchDiscussionsSourceType'):
|
|
733
|
-
if source_type is None:
|
|
734
|
-
del self.source_type
|
|
735
|
-
return
|
|
736
|
-
if not isinstance(source_type, SearchDiscussionsSourceType):
|
|
737
|
-
raise TypeError('source_type must be of type SearchDiscussionsSourceType')
|
|
738
|
-
self._source_type = source_type
|
|
739
|
-
|
|
740
|
-
@property
|
|
741
|
-
def only_new_comments(self) -> bool:
|
|
742
|
-
"""Show only topics with new comments"""
|
|
743
|
-
return self._only_new_comments
|
|
744
|
-
|
|
745
|
-
@only_new_comments.setter
|
|
746
|
-
def only_new_comments(self, only_new_comments: bool):
|
|
747
|
-
if only_new_comments is None:
|
|
748
|
-
del self.only_new_comments
|
|
749
|
-
return
|
|
750
|
-
if not isinstance(only_new_comments, bool):
|
|
751
|
-
raise TypeError('only_new_comments must be of type bool')
|
|
752
|
-
self._only_new_comments = only_new_comments
|
|
753
|
-
|
|
754
|
-
@property
|
|
755
|
-
def write_up_inclusion_type(self) -> 'WriteUpInclusionType':
|
|
756
|
-
"""Determines whether or not WriteUps should be included"""
|
|
757
|
-
return self._write_up_inclusion_type
|
|
758
|
-
|
|
759
|
-
@write_up_inclusion_type.setter
|
|
760
|
-
def write_up_inclusion_type(self, write_up_inclusion_type: 'WriteUpInclusionType'):
|
|
761
|
-
if write_up_inclusion_type is None:
|
|
762
|
-
del self.write_up_inclusion_type
|
|
763
|
-
return
|
|
764
|
-
if not isinstance(write_up_inclusion_type, WriteUpInclusionType):
|
|
765
|
-
raise TypeError('write_up_inclusion_type must be of type WriteUpInclusionType')
|
|
766
|
-
self._write_up_inclusion_type = write_up_inclusion_type
|
|
767
|
-
|
|
768
|
-
@property
|
|
769
|
-
def write_up_types(self) -> Optional[List['WriteUpType']]:
|
|
770
|
-
"""Filters on WriteUp type"""
|
|
771
|
-
return self._write_up_types
|
|
772
|
-
|
|
773
|
-
@write_up_types.setter
|
|
774
|
-
def write_up_types(self, write_up_types: Optional[List['WriteUpType']]):
|
|
775
|
-
if write_up_types is None:
|
|
776
|
-
del self.write_up_types
|
|
777
|
-
return
|
|
778
|
-
if not isinstance(write_up_types, list):
|
|
779
|
-
raise TypeError('write_up_types must be of type list')
|
|
780
|
-
if not all([isinstance(t, WriteUpType) for t in write_up_types]):
|
|
781
|
-
raise TypeError('write_up_types must contain only items of type WriteUpType')
|
|
782
|
-
self._write_up_types = write_up_types
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
class ApiSearchKernelsDocument(KaggleObject):
|
|
786
|
-
r"""
|
|
787
|
-
Based on kaggle.kernels.SearchKernelsDocument
|
|
788
|
-
|
|
789
|
-
Attributes:
|
|
790
|
-
session_id (int)
|
|
791
|
-
The session ID of the Kernel
|
|
792
|
-
has_linked_submission (bool)
|
|
793
|
-
Whether the Kernel has a linked submission
|
|
794
|
-
datasource_is_private (bool)
|
|
795
|
-
Whether the datasource is private
|
|
796
|
-
best_public_score (float)
|
|
797
|
-
The best public score of the Kernel's submission
|
|
798
|
-
is_draft (bool)
|
|
799
|
-
Whether the Kernel is a draft
|
|
800
|
-
"""
|
|
801
|
-
|
|
802
|
-
def __init__(self):
|
|
803
|
-
self._session_id = None
|
|
804
|
-
self._has_linked_submission = False
|
|
805
|
-
self._datasource_is_private = False
|
|
806
|
-
self._best_public_score = 0.0
|
|
807
|
-
self._is_draft = False
|
|
808
|
-
self._freeze()
|
|
809
|
-
|
|
810
|
-
@property
|
|
811
|
-
def session_id(self) -> int:
|
|
812
|
-
"""The session ID of the Kernel"""
|
|
813
|
-
return self._session_id or 0
|
|
814
|
-
|
|
815
|
-
@session_id.setter
|
|
816
|
-
def session_id(self, session_id: Optional[int]):
|
|
817
|
-
if session_id is None:
|
|
818
|
-
del self.session_id
|
|
819
|
-
return
|
|
820
|
-
if not isinstance(session_id, int):
|
|
821
|
-
raise TypeError('session_id must be of type int')
|
|
822
|
-
self._session_id = session_id
|
|
823
|
-
|
|
824
|
-
@property
|
|
825
|
-
def has_linked_submission(self) -> bool:
|
|
826
|
-
"""Whether the Kernel has a linked submission"""
|
|
827
|
-
return self._has_linked_submission
|
|
828
|
-
|
|
829
|
-
@has_linked_submission.setter
|
|
830
|
-
def has_linked_submission(self, has_linked_submission: bool):
|
|
831
|
-
if has_linked_submission is None:
|
|
832
|
-
del self.has_linked_submission
|
|
833
|
-
return
|
|
834
|
-
if not isinstance(has_linked_submission, bool):
|
|
835
|
-
raise TypeError('has_linked_submission must be of type bool')
|
|
836
|
-
self._has_linked_submission = has_linked_submission
|
|
837
|
-
|
|
838
|
-
@property
|
|
839
|
-
def datasource_is_private(self) -> bool:
|
|
840
|
-
"""Whether the datasource is private"""
|
|
841
|
-
return self._datasource_is_private
|
|
842
|
-
|
|
843
|
-
@datasource_is_private.setter
|
|
844
|
-
def datasource_is_private(self, datasource_is_private: bool):
|
|
845
|
-
if datasource_is_private is None:
|
|
846
|
-
del self.datasource_is_private
|
|
847
|
-
return
|
|
848
|
-
if not isinstance(datasource_is_private, bool):
|
|
849
|
-
raise TypeError('datasource_is_private must be of type bool')
|
|
850
|
-
self._datasource_is_private = datasource_is_private
|
|
851
|
-
|
|
852
|
-
@property
|
|
853
|
-
def best_public_score(self) -> float:
|
|
854
|
-
"""The best public score of the Kernel's submission"""
|
|
855
|
-
return self._best_public_score
|
|
856
|
-
|
|
857
|
-
@best_public_score.setter
|
|
858
|
-
def best_public_score(self, best_public_score: float):
|
|
859
|
-
if best_public_score is None:
|
|
860
|
-
del self.best_public_score
|
|
861
|
-
return
|
|
862
|
-
if not isinstance(best_public_score, float):
|
|
863
|
-
raise TypeError('best_public_score must be of type float')
|
|
864
|
-
self._best_public_score = best_public_score
|
|
865
|
-
|
|
866
|
-
@property
|
|
867
|
-
def is_draft(self) -> bool:
|
|
868
|
-
"""Whether the Kernel is a draft"""
|
|
869
|
-
return self._is_draft
|
|
870
|
-
|
|
871
|
-
@is_draft.setter
|
|
872
|
-
def is_draft(self, is_draft: bool):
|
|
873
|
-
if is_draft is None:
|
|
874
|
-
del self.is_draft
|
|
875
|
-
return
|
|
876
|
-
if not isinstance(is_draft, bool):
|
|
877
|
-
raise TypeError('is_draft must be of type bool')
|
|
878
|
-
self._is_draft = is_draft
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
class ApiSearchKernelsFilters(KaggleObject):
|
|
882
|
-
r"""
|
|
883
|
-
Based on kaggle.kernels.SearchKernelsFilters
|
|
884
|
-
|
|
885
|
-
Attributes:
|
|
886
|
-
language (str)
|
|
887
|
-
The Kernel language used to filter documents
|
|
888
|
-
earned_medal (bool)
|
|
889
|
-
Whether to return documents that the owner_user_id earned a medal for.
|
|
890
|
-
"""
|
|
891
|
-
|
|
892
|
-
def __init__(self):
|
|
893
|
-
self._language = None
|
|
894
|
-
self._earned_medal = None
|
|
895
|
-
self._freeze()
|
|
896
|
-
|
|
897
|
-
@property
|
|
898
|
-
def language(self) -> str:
|
|
899
|
-
"""The Kernel language used to filter documents"""
|
|
900
|
-
return self._language or ""
|
|
901
|
-
|
|
902
|
-
@language.setter
|
|
903
|
-
def language(self, language: Optional[str]):
|
|
904
|
-
if language is None:
|
|
905
|
-
del self.language
|
|
906
|
-
return
|
|
907
|
-
if not isinstance(language, str):
|
|
908
|
-
raise TypeError('language must be of type str')
|
|
909
|
-
self._language = language
|
|
910
|
-
|
|
911
|
-
@property
|
|
912
|
-
def earned_medal(self) -> bool:
|
|
913
|
-
"""Whether to return documents that the owner_user_id earned a medal for."""
|
|
914
|
-
return self._earned_medal or False
|
|
915
|
-
|
|
916
|
-
@earned_medal.setter
|
|
917
|
-
def earned_medal(self, earned_medal: Optional[bool]):
|
|
918
|
-
if earned_medal is None:
|
|
919
|
-
del self.earned_medal
|
|
920
|
-
return
|
|
921
|
-
if not isinstance(earned_medal, bool):
|
|
922
|
-
raise TypeError('earned_medal must be of type bool')
|
|
923
|
-
self._earned_medal = earned_medal
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
class ApiSearchModelsDocument(KaggleObject):
|
|
927
|
-
r"""
|
|
928
|
-
Based on kaggle.models.SearchModelsDocument
|
|
929
|
-
|
|
930
|
-
Attributes:
|
|
931
|
-
instance_count (int)
|
|
932
|
-
The total number of instances in the Model
|
|
933
|
-
notebook_count (int)
|
|
934
|
-
The total number of notebooks in the Model
|
|
935
|
-
"""
|
|
936
|
-
|
|
937
|
-
def __init__(self):
|
|
938
|
-
self._instance_count = 0
|
|
939
|
-
self._notebook_count = 0
|
|
940
|
-
self._freeze()
|
|
941
|
-
|
|
942
|
-
@property
|
|
943
|
-
def instance_count(self) -> int:
|
|
944
|
-
"""The total number of instances in the Model"""
|
|
945
|
-
return self._instance_count
|
|
946
|
-
|
|
947
|
-
@instance_count.setter
|
|
948
|
-
def instance_count(self, instance_count: int):
|
|
949
|
-
if instance_count is None:
|
|
950
|
-
del self.instance_count
|
|
951
|
-
return
|
|
952
|
-
if not isinstance(instance_count, int):
|
|
953
|
-
raise TypeError('instance_count must be of type int')
|
|
954
|
-
self._instance_count = instance_count
|
|
955
|
-
|
|
956
|
-
@property
|
|
957
|
-
def notebook_count(self) -> int:
|
|
958
|
-
"""The total number of notebooks in the Model"""
|
|
959
|
-
return self._notebook_count
|
|
960
|
-
|
|
961
|
-
@notebook_count.setter
|
|
962
|
-
def notebook_count(self, notebook_count: int):
|
|
963
|
-
if notebook_count is None:
|
|
964
|
-
del self.notebook_count
|
|
965
|
-
return
|
|
966
|
-
if not isinstance(notebook_count, int):
|
|
967
|
-
raise TypeError('notebook_count must be of type int')
|
|
968
|
-
self._notebook_count = notebook_count
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
class ApiSearchModelsFilters(KaggleObject):
|
|
972
|
-
r"""
|
|
973
|
-
Based on kaggle.models.SearchModelsFilters
|
|
974
|
-
|
|
975
|
-
Attributes:
|
|
976
|
-
size (ListSearchContentRangeFilter)
|
|
977
|
-
The size of the Model used to filter the documents
|
|
978
|
-
"""
|
|
979
|
-
|
|
980
|
-
def __init__(self):
|
|
981
|
-
self._size = None
|
|
982
|
-
self._freeze()
|
|
983
|
-
|
|
984
|
-
@property
|
|
985
|
-
def size(self) -> Optional['ListSearchContentRangeFilter']:
|
|
986
|
-
"""The size of the Model used to filter the documents"""
|
|
987
|
-
return self._size
|
|
988
|
-
|
|
989
|
-
@size.setter
|
|
990
|
-
def size(self, size: Optional['ListSearchContentRangeFilter']):
|
|
991
|
-
if size is None:
|
|
992
|
-
del self.size
|
|
993
|
-
return
|
|
994
|
-
if not isinstance(size, ListSearchContentRangeFilter):
|
|
995
|
-
raise TypeError('size must be of type ListSearchContentRangeFilter')
|
|
996
|
-
self._size = size
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
class ApiSearchUsersDocument(KaggleObject):
|
|
1000
|
-
r"""
|
|
1001
|
-
Based on kaggle.users.SearchUsersDocument
|
|
1002
|
-
|
|
1003
|
-
Attributes:
|
|
1004
|
-
grandmaster_tier_level (int)
|
|
1005
|
-
User's GM tier level. Tier levels are awarded starting at GM. All
|
|
1006
|
-
users who are not GM will have a tier level of 0.
|
|
1007
|
-
user_location (str)
|
|
1008
|
-
User location string, if location sharing is opted-in. In the format:
|
|
1009
|
-
'city, region, country'.
|
|
1010
|
-
occupation_organization_name (str)
|
|
1011
|
-
Occupation organization name as indicated on the user's profile.
|
|
1012
|
-
competition_ranking (int)
|
|
1013
|
-
Current ranking for the user in the competition achievement type.
|
|
1014
|
-
competition_points (int)
|
|
1015
|
-
Current points for the user in the competition achievement type.
|
|
1016
|
-
kernel_ranking (int)
|
|
1017
|
-
Current ranking for the user in the kernel achievement type.
|
|
1018
|
-
kernel_points (int)
|
|
1019
|
-
Current points for the user in the kernel achievement type.
|
|
1020
|
-
dataset_ranking (int)
|
|
1021
|
-
Current ranking for the user in dataset achievement type.
|
|
1022
|
-
dataset_points (int)
|
|
1023
|
-
Current points for the user in the dataset achievement type.
|
|
1024
|
-
"""
|
|
1025
|
-
|
|
1026
|
-
def __init__(self):
|
|
1027
|
-
self._grandmaster_tier_level = 0
|
|
1028
|
-
self._user_location = None
|
|
1029
|
-
self._occupation_organization_name = None
|
|
1030
|
-
self._competition_ranking = None
|
|
1031
|
-
self._competition_points = None
|
|
1032
|
-
self._kernel_ranking = None
|
|
1033
|
-
self._kernel_points = None
|
|
1034
|
-
self._dataset_ranking = None
|
|
1035
|
-
self._dataset_points = None
|
|
1036
|
-
self._freeze()
|
|
1037
|
-
|
|
1038
|
-
@property
|
|
1039
|
-
def grandmaster_tier_level(self) -> int:
|
|
1040
|
-
r"""
|
|
1041
|
-
User's GM tier level. Tier levels are awarded starting at GM. All
|
|
1042
|
-
users who are not GM will have a tier level of 0.
|
|
1043
|
-
"""
|
|
1044
|
-
return self._grandmaster_tier_level
|
|
1045
|
-
|
|
1046
|
-
@grandmaster_tier_level.setter
|
|
1047
|
-
def grandmaster_tier_level(self, grandmaster_tier_level: int):
|
|
1048
|
-
if grandmaster_tier_level is None:
|
|
1049
|
-
del self.grandmaster_tier_level
|
|
1050
|
-
return
|
|
1051
|
-
if not isinstance(grandmaster_tier_level, int):
|
|
1052
|
-
raise TypeError('grandmaster_tier_level must be of type int')
|
|
1053
|
-
self._grandmaster_tier_level = grandmaster_tier_level
|
|
1054
|
-
|
|
1055
|
-
@property
|
|
1056
|
-
def user_location(self) -> str:
|
|
1057
|
-
r"""
|
|
1058
|
-
User location string, if location sharing is opted-in. In the format:
|
|
1059
|
-
'city, region, country'.
|
|
1060
|
-
"""
|
|
1061
|
-
return self._user_location or ""
|
|
1062
|
-
|
|
1063
|
-
@user_location.setter
|
|
1064
|
-
def user_location(self, user_location: Optional[str]):
|
|
1065
|
-
if user_location is None:
|
|
1066
|
-
del self.user_location
|
|
1067
|
-
return
|
|
1068
|
-
if not isinstance(user_location, str):
|
|
1069
|
-
raise TypeError('user_location must be of type str')
|
|
1070
|
-
self._user_location = user_location
|
|
1071
|
-
|
|
1072
|
-
@property
|
|
1073
|
-
def occupation_organization_name(self) -> str:
|
|
1074
|
-
"""Occupation organization name as indicated on the user's profile."""
|
|
1075
|
-
return self._occupation_organization_name or ""
|
|
1076
|
-
|
|
1077
|
-
@occupation_organization_name.setter
|
|
1078
|
-
def occupation_organization_name(self, occupation_organization_name: Optional[str]):
|
|
1079
|
-
if occupation_organization_name is None:
|
|
1080
|
-
del self.occupation_organization_name
|
|
1081
|
-
return
|
|
1082
|
-
if not isinstance(occupation_organization_name, str):
|
|
1083
|
-
raise TypeError('occupation_organization_name must be of type str')
|
|
1084
|
-
self._occupation_organization_name = occupation_organization_name
|
|
1085
|
-
|
|
1086
|
-
@property
|
|
1087
|
-
def competition_ranking(self) -> int:
|
|
1088
|
-
"""Current ranking for the user in the competition achievement type."""
|
|
1089
|
-
return self._competition_ranking or 0
|
|
1090
|
-
|
|
1091
|
-
@competition_ranking.setter
|
|
1092
|
-
def competition_ranking(self, competition_ranking: Optional[int]):
|
|
1093
|
-
if competition_ranking is None:
|
|
1094
|
-
del self.competition_ranking
|
|
1095
|
-
return
|
|
1096
|
-
if not isinstance(competition_ranking, int):
|
|
1097
|
-
raise TypeError('competition_ranking must be of type int')
|
|
1098
|
-
self._competition_ranking = competition_ranking
|
|
1099
|
-
|
|
1100
|
-
@property
|
|
1101
|
-
def competition_points(self) -> int:
|
|
1102
|
-
"""Current points for the user in the competition achievement type."""
|
|
1103
|
-
return self._competition_points or 0
|
|
1104
|
-
|
|
1105
|
-
@competition_points.setter
|
|
1106
|
-
def competition_points(self, competition_points: Optional[int]):
|
|
1107
|
-
if competition_points is None:
|
|
1108
|
-
del self.competition_points
|
|
1109
|
-
return
|
|
1110
|
-
if not isinstance(competition_points, int):
|
|
1111
|
-
raise TypeError('competition_points must be of type int')
|
|
1112
|
-
self._competition_points = competition_points
|
|
1113
|
-
|
|
1114
|
-
@property
|
|
1115
|
-
def kernel_ranking(self) -> int:
|
|
1116
|
-
"""Current ranking for the user in the kernel achievement type."""
|
|
1117
|
-
return self._kernel_ranking or 0
|
|
1118
|
-
|
|
1119
|
-
@kernel_ranking.setter
|
|
1120
|
-
def kernel_ranking(self, kernel_ranking: Optional[int]):
|
|
1121
|
-
if kernel_ranking is None:
|
|
1122
|
-
del self.kernel_ranking
|
|
1123
|
-
return
|
|
1124
|
-
if not isinstance(kernel_ranking, int):
|
|
1125
|
-
raise TypeError('kernel_ranking must be of type int')
|
|
1126
|
-
self._kernel_ranking = kernel_ranking
|
|
1127
|
-
|
|
1128
|
-
@property
|
|
1129
|
-
def kernel_points(self) -> int:
|
|
1130
|
-
"""Current points for the user in the kernel achievement type."""
|
|
1131
|
-
return self._kernel_points or 0
|
|
1132
|
-
|
|
1133
|
-
@kernel_points.setter
|
|
1134
|
-
def kernel_points(self, kernel_points: Optional[int]):
|
|
1135
|
-
if kernel_points is None:
|
|
1136
|
-
del self.kernel_points
|
|
1137
|
-
return
|
|
1138
|
-
if not isinstance(kernel_points, int):
|
|
1139
|
-
raise TypeError('kernel_points must be of type int')
|
|
1140
|
-
self._kernel_points = kernel_points
|
|
1141
|
-
|
|
1142
|
-
@property
|
|
1143
|
-
def dataset_ranking(self) -> int:
|
|
1144
|
-
"""Current ranking for the user in dataset achievement type."""
|
|
1145
|
-
return self._dataset_ranking or 0
|
|
1146
|
-
|
|
1147
|
-
@dataset_ranking.setter
|
|
1148
|
-
def dataset_ranking(self, dataset_ranking: Optional[int]):
|
|
1149
|
-
if dataset_ranking is None:
|
|
1150
|
-
del self.dataset_ranking
|
|
1151
|
-
return
|
|
1152
|
-
if not isinstance(dataset_ranking, int):
|
|
1153
|
-
raise TypeError('dataset_ranking must be of type int')
|
|
1154
|
-
self._dataset_ranking = dataset_ranking
|
|
1155
|
-
|
|
1156
|
-
@property
|
|
1157
|
-
def dataset_points(self) -> int:
|
|
1158
|
-
"""Current points for the user in the dataset achievement type."""
|
|
1159
|
-
return self._dataset_points or 0
|
|
1160
|
-
|
|
1161
|
-
@dataset_points.setter
|
|
1162
|
-
def dataset_points(self, dataset_points: Optional[int]):
|
|
1163
|
-
if dataset_points is None:
|
|
1164
|
-
del self.dataset_points
|
|
1165
|
-
return
|
|
1166
|
-
if not isinstance(dataset_points, int):
|
|
1167
|
-
raise TypeError('dataset_points must be of type int')
|
|
1168
|
-
self._dataset_points = dataset_points
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
class ApiSearchUsersFilters(KaggleObject):
|
|
1172
|
-
r"""
|
|
1173
|
-
Based on kaggle.users.SearchUsersFilters
|
|
1174
|
-
|
|
1175
|
-
Attributes:
|
|
1176
|
-
user_locations (str)
|
|
1177
|
-
Filter to users that have one of the the specified locations. Expects the
|
|
1178
|
-
format: 'city, region, country' for each.
|
|
1179
|
-
tier (UserAchievementTier)
|
|
1180
|
-
Filter to users that have the specified performance tier.
|
|
1181
|
-
user_ids (int)
|
|
1182
|
-
Filter to users based on the provided user ids.
|
|
1183
|
-
require_ranking_for_type (UserAchievementType)
|
|
1184
|
-
Filter to users that have points for the specified type.
|
|
1185
|
-
occupation_organization_names (str)
|
|
1186
|
-
Filter to users that have one of the provided occupation organization names
|
|
1187
|
-
indicated on their user profile, i.e. http://screen/3N68JKC4hocxWmn. Note:
|
|
1188
|
-
This is *not* the same thing as a Kaggle Organization, such as
|
|
1189
|
-
kaggle.com/organizations/google.
|
|
1190
|
-
grandmaster_level (ListSearchContentRangeFilter)
|
|
1191
|
-
Filter to users that have the specified range of Grandmaster tier level.
|
|
1192
|
-
"""
|
|
1193
|
-
|
|
1194
|
-
def __init__(self):
|
|
1195
|
-
self._user_locations = []
|
|
1196
|
-
self._tier = None
|
|
1197
|
-
self._user_ids = []
|
|
1198
|
-
self._require_ranking_for_type = None
|
|
1199
|
-
self._occupation_organization_names = []
|
|
1200
|
-
self._grandmaster_level = None
|
|
1201
|
-
self._freeze()
|
|
1202
|
-
|
|
1203
|
-
@property
|
|
1204
|
-
def user_locations(self) -> Optional[List[str]]:
|
|
1205
|
-
r"""
|
|
1206
|
-
Filter to users that have one of the the specified locations. Expects the
|
|
1207
|
-
format: 'city, region, country' for each.
|
|
1208
|
-
"""
|
|
1209
|
-
return self._user_locations
|
|
1210
|
-
|
|
1211
|
-
@user_locations.setter
|
|
1212
|
-
def user_locations(self, user_locations: Optional[List[str]]):
|
|
1213
|
-
if user_locations is None:
|
|
1214
|
-
del self.user_locations
|
|
1215
|
-
return
|
|
1216
|
-
if not isinstance(user_locations, list):
|
|
1217
|
-
raise TypeError('user_locations must be of type list')
|
|
1218
|
-
if not all([isinstance(t, str) for t in user_locations]):
|
|
1219
|
-
raise TypeError('user_locations must contain only items of type str')
|
|
1220
|
-
self._user_locations = user_locations
|
|
1221
|
-
|
|
1222
|
-
@property
|
|
1223
|
-
def tier(self) -> 'UserAchievementTier':
|
|
1224
|
-
"""Filter to users that have the specified performance tier."""
|
|
1225
|
-
return self._tier or UserAchievementTier.NOVICE
|
|
1226
|
-
|
|
1227
|
-
@tier.setter
|
|
1228
|
-
def tier(self, tier: Optional['UserAchievementTier']):
|
|
1229
|
-
if tier is None:
|
|
1230
|
-
del self.tier
|
|
1231
|
-
return
|
|
1232
|
-
if not isinstance(tier, UserAchievementTier):
|
|
1233
|
-
raise TypeError('tier must be of type UserAchievementTier')
|
|
1234
|
-
self._tier = tier
|
|
1235
|
-
|
|
1236
|
-
@property
|
|
1237
|
-
def user_ids(self) -> Optional[List[int]]:
|
|
1238
|
-
"""Filter to users based on the provided user ids."""
|
|
1239
|
-
return self._user_ids
|
|
1240
|
-
|
|
1241
|
-
@user_ids.setter
|
|
1242
|
-
def user_ids(self, user_ids: Optional[List[int]]):
|
|
1243
|
-
if user_ids is None:
|
|
1244
|
-
del self.user_ids
|
|
1245
|
-
return
|
|
1246
|
-
if not isinstance(user_ids, list):
|
|
1247
|
-
raise TypeError('user_ids must be of type list')
|
|
1248
|
-
if not all([isinstance(t, int) for t in user_ids]):
|
|
1249
|
-
raise TypeError('user_ids must contain only items of type int')
|
|
1250
|
-
self._user_ids = user_ids
|
|
1251
|
-
|
|
1252
|
-
@property
|
|
1253
|
-
def require_ranking_for_type(self) -> 'UserAchievementType':
|
|
1254
|
-
"""Filter to users that have points for the specified type."""
|
|
1255
|
-
return self._require_ranking_for_type or UserAchievementType.USER_ACHIEVEMENT_TYPE_UNSPECIFIED
|
|
1256
|
-
|
|
1257
|
-
@require_ranking_for_type.setter
|
|
1258
|
-
def require_ranking_for_type(self, require_ranking_for_type: Optional['UserAchievementType']):
|
|
1259
|
-
if require_ranking_for_type is None:
|
|
1260
|
-
del self.require_ranking_for_type
|
|
1261
|
-
return
|
|
1262
|
-
if not isinstance(require_ranking_for_type, UserAchievementType):
|
|
1263
|
-
raise TypeError('require_ranking_for_type must be of type UserAchievementType')
|
|
1264
|
-
self._require_ranking_for_type = require_ranking_for_type
|
|
1265
|
-
|
|
1266
|
-
@property
|
|
1267
|
-
def occupation_organization_names(self) -> Optional[List[str]]:
|
|
1268
|
-
r"""
|
|
1269
|
-
Filter to users that have one of the provided occupation organization names
|
|
1270
|
-
indicated on their user profile, i.e. http://screen/3N68JKC4hocxWmn. Note:
|
|
1271
|
-
This is *not* the same thing as a Kaggle Organization, such as
|
|
1272
|
-
kaggle.com/organizations/google.
|
|
1273
|
-
"""
|
|
1274
|
-
return self._occupation_organization_names
|
|
1275
|
-
|
|
1276
|
-
@occupation_organization_names.setter
|
|
1277
|
-
def occupation_organization_names(self, occupation_organization_names: Optional[List[str]]):
|
|
1278
|
-
if occupation_organization_names is None:
|
|
1279
|
-
del self.occupation_organization_names
|
|
1280
|
-
return
|
|
1281
|
-
if not isinstance(occupation_organization_names, list):
|
|
1282
|
-
raise TypeError('occupation_organization_names must be of type list')
|
|
1283
|
-
if not all([isinstance(t, str) for t in occupation_organization_names]):
|
|
1284
|
-
raise TypeError('occupation_organization_names must contain only items of type str')
|
|
1285
|
-
self._occupation_organization_names = occupation_organization_names
|
|
1286
|
-
|
|
1287
|
-
@property
|
|
1288
|
-
def grandmaster_level(self) -> Optional['ListSearchContentRangeFilter']:
|
|
1289
|
-
"""Filter to users that have the specified range of Grandmaster tier level."""
|
|
1290
|
-
return self._grandmaster_level
|
|
1291
|
-
|
|
1292
|
-
@grandmaster_level.setter
|
|
1293
|
-
def grandmaster_level(self, grandmaster_level: Optional['ListSearchContentRangeFilter']):
|
|
1294
|
-
if grandmaster_level is None:
|
|
1295
|
-
del self.grandmaster_level
|
|
1296
|
-
return
|
|
1297
|
-
if not isinstance(grandmaster_level, ListSearchContentRangeFilter):
|
|
1298
|
-
raise TypeError('grandmaster_level must be of type ListSearchContentRangeFilter')
|
|
1299
|
-
self._grandmaster_level = grandmaster_level
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
class ApiUserAvatar(KaggleObject):
|
|
1303
|
-
r"""
|
|
1304
|
-
Based on kaggle.users.UserAvatar
|
|
1305
|
-
|
|
1306
|
-
Attributes:
|
|
1307
|
-
id (int)
|
|
1308
|
-
ID for the given user
|
|
1309
|
-
display_name (str)
|
|
1310
|
-
Display name for the given user
|
|
1311
|
-
thumbnail_url (str)
|
|
1312
|
-
Thumbnail URL for the given user
|
|
1313
|
-
url (str)
|
|
1314
|
-
Profile URL for the given user
|
|
1315
|
-
user_name (str)
|
|
1316
|
-
User name for the given user
|
|
1317
|
-
progression_opt_out (bool)
|
|
1318
|
-
True if the user is opted out of the progression system.
|
|
1319
|
-
tier (UserAchievementTier)
|
|
1320
|
-
Tier for the given user
|
|
1321
|
-
"""
|
|
1322
|
-
|
|
1323
|
-
def __init__(self):
|
|
1324
|
-
self._id = 0
|
|
1325
|
-
self._display_name = None
|
|
1326
|
-
self._thumbnail_url = None
|
|
1327
|
-
self._url = None
|
|
1328
|
-
self._user_name = None
|
|
1329
|
-
self._progression_opt_out = None
|
|
1330
|
-
self._tier = UserAchievementTier.NOVICE
|
|
1331
|
-
self._freeze()
|
|
1332
|
-
|
|
1333
|
-
@property
|
|
1334
|
-
def id(self) -> int:
|
|
1335
|
-
"""ID for the given user"""
|
|
1336
|
-
return self._id
|
|
1337
|
-
|
|
1338
|
-
@id.setter
|
|
1339
|
-
def id(self, id: int):
|
|
1340
|
-
if id is None:
|
|
1341
|
-
del self.id
|
|
1342
|
-
return
|
|
1343
|
-
if not isinstance(id, int):
|
|
1344
|
-
raise TypeError('id must be of type int')
|
|
1345
|
-
self._id = id
|
|
1346
|
-
|
|
1347
|
-
@property
|
|
1348
|
-
def display_name(self) -> str:
|
|
1349
|
-
"""Display name for the given user"""
|
|
1350
|
-
return self._display_name or ""
|
|
1351
|
-
|
|
1352
|
-
@display_name.setter
|
|
1353
|
-
def display_name(self, display_name: Optional[str]):
|
|
1354
|
-
if display_name is None:
|
|
1355
|
-
del self.display_name
|
|
1356
|
-
return
|
|
1357
|
-
if not isinstance(display_name, str):
|
|
1358
|
-
raise TypeError('display_name must be of type str')
|
|
1359
|
-
self._display_name = display_name
|
|
1360
|
-
|
|
1361
|
-
@property
|
|
1362
|
-
def thumbnail_url(self) -> str:
|
|
1363
|
-
"""Thumbnail URL for the given user"""
|
|
1364
|
-
return self._thumbnail_url or ""
|
|
1365
|
-
|
|
1366
|
-
@thumbnail_url.setter
|
|
1367
|
-
def thumbnail_url(self, thumbnail_url: Optional[str]):
|
|
1368
|
-
if thumbnail_url is None:
|
|
1369
|
-
del self.thumbnail_url
|
|
1370
|
-
return
|
|
1371
|
-
if not isinstance(thumbnail_url, str):
|
|
1372
|
-
raise TypeError('thumbnail_url must be of type str')
|
|
1373
|
-
self._thumbnail_url = thumbnail_url
|
|
1374
|
-
|
|
1375
|
-
@property
|
|
1376
|
-
def url(self) -> str:
|
|
1377
|
-
"""Profile URL for the given user"""
|
|
1378
|
-
return self._url or ""
|
|
1379
|
-
|
|
1380
|
-
@url.setter
|
|
1381
|
-
def url(self, url: Optional[str]):
|
|
1382
|
-
if url is None:
|
|
1383
|
-
del self.url
|
|
1384
|
-
return
|
|
1385
|
-
if not isinstance(url, str):
|
|
1386
|
-
raise TypeError('url must be of type str')
|
|
1387
|
-
self._url = url
|
|
1388
|
-
|
|
1389
|
-
@property
|
|
1390
|
-
def user_name(self) -> str:
|
|
1391
|
-
"""User name for the given user"""
|
|
1392
|
-
return self._user_name or ""
|
|
1393
|
-
|
|
1394
|
-
@user_name.setter
|
|
1395
|
-
def user_name(self, user_name: Optional[str]):
|
|
1396
|
-
if user_name is None:
|
|
1397
|
-
del self.user_name
|
|
1398
|
-
return
|
|
1399
|
-
if not isinstance(user_name, str):
|
|
1400
|
-
raise TypeError('user_name must be of type str')
|
|
1401
|
-
self._user_name = user_name
|
|
1402
|
-
|
|
1403
|
-
@property
|
|
1404
|
-
def progression_opt_out(self) -> bool:
|
|
1405
|
-
"""True if the user is opted out of the progression system."""
|
|
1406
|
-
return self._progression_opt_out or False
|
|
1407
|
-
|
|
1408
|
-
@progression_opt_out.setter
|
|
1409
|
-
def progression_opt_out(self, progression_opt_out: Optional[bool]):
|
|
1410
|
-
if progression_opt_out is None:
|
|
1411
|
-
del self.progression_opt_out
|
|
1412
|
-
return
|
|
1413
|
-
if not isinstance(progression_opt_out, bool):
|
|
1414
|
-
raise TypeError('progression_opt_out must be of type bool')
|
|
1415
|
-
self._progression_opt_out = progression_opt_out
|
|
1416
|
-
|
|
1417
|
-
@property
|
|
1418
|
-
def tier(self) -> 'UserAchievementTier':
|
|
1419
|
-
"""Tier for the given user"""
|
|
1420
|
-
return self._tier
|
|
1421
|
-
|
|
1422
|
-
@tier.setter
|
|
1423
|
-
def tier(self, tier: 'UserAchievementTier'):
|
|
1424
|
-
if tier is None:
|
|
1425
|
-
del self.tier
|
|
1426
|
-
return
|
|
1427
|
-
if not isinstance(tier, UserAchievementTier):
|
|
1428
|
-
raise TypeError('tier must be of type UserAchievementTier')
|
|
1429
|
-
self._tier = tier
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
class ListEntitiesDocument(KaggleObject):
|
|
1433
|
-
r"""
|
|
1434
|
-
Based on kaggle.search.ListSearchContentDocument
|
|
1435
|
-
|
|
1436
|
-
Attributes:
|
|
1437
|
-
id (int)
|
|
1438
|
-
The DB ID (i.e. the PK from the table) of the document
|
|
1439
|
-
document_type (DocumentType)
|
|
1440
|
-
The type of content of the document
|
|
1441
|
-
title (str)
|
|
1442
|
-
The canonical title of the document
|
|
1443
|
-
image_url (str)
|
|
1444
|
-
The thumbnail URL of the document
|
|
1445
|
-
create_time (datetime)
|
|
1446
|
-
The canonical creation time of the document; May mean different things
|
|
1447
|
-
between content types
|
|
1448
|
-
update_time (datetime)
|
|
1449
|
-
The canonical update time of the document; May be different between content
|
|
1450
|
-
types
|
|
1451
|
-
is_private (bool)
|
|
1452
|
-
Whether the content is marked as private
|
|
1453
|
-
votes (int)
|
|
1454
|
-
The total votes (or score, if downvotes are supported) for the document
|
|
1455
|
-
owner_user (ApiUserAvatar)
|
|
1456
|
-
owner_organization (ApiOrganizationCard)
|
|
1457
|
-
competition_document (ApiSearchCompetitionsDocument)
|
|
1458
|
-
dataset_document (ApiSearchDatasetsDocument)
|
|
1459
|
-
kernel_document (ApiSearchKernelsDocument)
|
|
1460
|
-
model_document (ApiSearchModelsDocument)
|
|
1461
|
-
discussion_document (ApiSearchDiscussionsDocument)
|
|
1462
|
-
user_document (ApiSearchUsersDocument)
|
|
1463
|
-
slug (str)
|
|
1464
|
-
The slug of the document (which may be close to the url)
|
|
1465
|
-
"""
|
|
1466
|
-
|
|
1467
|
-
def __init__(self):
|
|
1468
|
-
self._id = 0
|
|
1469
|
-
self._document_type = DocumentType.DOCUMENT_TYPE_UNSPECIFIED
|
|
1470
|
-
self._title = ""
|
|
1471
|
-
self._image_url = ""
|
|
1472
|
-
self._create_time = None
|
|
1473
|
-
self._update_time = None
|
|
1474
|
-
self._is_private = None
|
|
1475
|
-
self._votes = None
|
|
1476
|
-
self._owner_user = None
|
|
1477
|
-
self._owner_organization = None
|
|
1478
|
-
self._competition_document = None
|
|
1479
|
-
self._dataset_document = None
|
|
1480
|
-
self._kernel_document = None
|
|
1481
|
-
self._model_document = None
|
|
1482
|
-
self._discussion_document = None
|
|
1483
|
-
self._user_document = None
|
|
1484
|
-
self._slug = None
|
|
1485
|
-
self._freeze()
|
|
1486
|
-
|
|
1487
|
-
@property
|
|
1488
|
-
def id(self) -> int:
|
|
1489
|
-
"""The DB ID (i.e. the PK from the table) of the document"""
|
|
1490
|
-
return self._id
|
|
1491
|
-
|
|
1492
|
-
@id.setter
|
|
1493
|
-
def id(self, id: int):
|
|
1494
|
-
if id is None:
|
|
1495
|
-
del self.id
|
|
1496
|
-
return
|
|
1497
|
-
if not isinstance(id, int):
|
|
1498
|
-
raise TypeError('id must be of type int')
|
|
1499
|
-
self._id = id
|
|
1500
|
-
|
|
1501
|
-
@property
|
|
1502
|
-
def document_type(self) -> 'DocumentType':
|
|
1503
|
-
"""The type of content of the document"""
|
|
1504
|
-
return self._document_type
|
|
1505
|
-
|
|
1506
|
-
@document_type.setter
|
|
1507
|
-
def document_type(self, document_type: 'DocumentType'):
|
|
1508
|
-
if document_type is None:
|
|
1509
|
-
del self.document_type
|
|
1510
|
-
return
|
|
1511
|
-
if not isinstance(document_type, DocumentType):
|
|
1512
|
-
raise TypeError('document_type must be of type DocumentType')
|
|
1513
|
-
self._document_type = document_type
|
|
1514
|
-
|
|
1515
|
-
@property
|
|
1516
|
-
def title(self) -> str:
|
|
1517
|
-
"""The canonical title of the document"""
|
|
1518
|
-
return self._title
|
|
1519
|
-
|
|
1520
|
-
@title.setter
|
|
1521
|
-
def title(self, title: str):
|
|
1522
|
-
if title is None:
|
|
1523
|
-
del self.title
|
|
1524
|
-
return
|
|
1525
|
-
if not isinstance(title, str):
|
|
1526
|
-
raise TypeError('title must be of type str')
|
|
1527
|
-
self._title = title
|
|
1528
|
-
|
|
1529
|
-
@property
|
|
1530
|
-
def image_url(self) -> str:
|
|
1531
|
-
"""The thumbnail URL of the document"""
|
|
1532
|
-
return self._image_url
|
|
1533
|
-
|
|
1534
|
-
@image_url.setter
|
|
1535
|
-
def image_url(self, image_url: str):
|
|
1536
|
-
if image_url is None:
|
|
1537
|
-
del self.image_url
|
|
1538
|
-
return
|
|
1539
|
-
if not isinstance(image_url, str):
|
|
1540
|
-
raise TypeError('image_url must be of type str')
|
|
1541
|
-
self._image_url = image_url
|
|
1542
|
-
|
|
1543
|
-
@property
|
|
1544
|
-
def create_time(self) -> datetime:
|
|
1545
|
-
r"""
|
|
1546
|
-
The canonical creation time of the document; May mean different things
|
|
1547
|
-
between content types
|
|
1548
|
-
"""
|
|
1549
|
-
return self._create_time
|
|
1550
|
-
|
|
1551
|
-
@create_time.setter
|
|
1552
|
-
def create_time(self, create_time: datetime):
|
|
1553
|
-
if create_time is None:
|
|
1554
|
-
del self.create_time
|
|
1555
|
-
return
|
|
1556
|
-
if not isinstance(create_time, datetime):
|
|
1557
|
-
raise TypeError('create_time must be of type datetime')
|
|
1558
|
-
self._create_time = create_time
|
|
1559
|
-
|
|
1560
|
-
@property
|
|
1561
|
-
def update_time(self) -> datetime:
|
|
1562
|
-
r"""
|
|
1563
|
-
The canonical update time of the document; May be different between content
|
|
1564
|
-
types
|
|
1565
|
-
"""
|
|
1566
|
-
return self._update_time or None
|
|
1567
|
-
|
|
1568
|
-
@update_time.setter
|
|
1569
|
-
def update_time(self, update_time: Optional[datetime]):
|
|
1570
|
-
if update_time is None:
|
|
1571
|
-
del self.update_time
|
|
1572
|
-
return
|
|
1573
|
-
if not isinstance(update_time, datetime):
|
|
1574
|
-
raise TypeError('update_time must be of type datetime')
|
|
1575
|
-
self._update_time = update_time
|
|
1576
|
-
|
|
1577
|
-
@property
|
|
1578
|
-
def is_private(self) -> bool:
|
|
1579
|
-
"""Whether the content is marked as private"""
|
|
1580
|
-
return self._is_private or False
|
|
1581
|
-
|
|
1582
|
-
@is_private.setter
|
|
1583
|
-
def is_private(self, is_private: Optional[bool]):
|
|
1584
|
-
if is_private is None:
|
|
1585
|
-
del self.is_private
|
|
1586
|
-
return
|
|
1587
|
-
if not isinstance(is_private, bool):
|
|
1588
|
-
raise TypeError('is_private must be of type bool')
|
|
1589
|
-
self._is_private = is_private
|
|
1590
|
-
|
|
1591
|
-
@property
|
|
1592
|
-
def votes(self) -> int:
|
|
1593
|
-
"""The total votes (or score, if downvotes are supported) for the document"""
|
|
1594
|
-
return self._votes or 0
|
|
1595
|
-
|
|
1596
|
-
@votes.setter
|
|
1597
|
-
def votes(self, votes: Optional[int]):
|
|
1598
|
-
if votes is None:
|
|
1599
|
-
del self.votes
|
|
1600
|
-
return
|
|
1601
|
-
if not isinstance(votes, int):
|
|
1602
|
-
raise TypeError('votes must be of type int')
|
|
1603
|
-
self._votes = votes
|
|
1604
|
-
|
|
1605
|
-
@property
|
|
1606
|
-
def owner_user(self) -> Optional['ApiUserAvatar']:
|
|
1607
|
-
return self._owner_user or None
|
|
1608
|
-
|
|
1609
|
-
@owner_user.setter
|
|
1610
|
-
def owner_user(self, owner_user: Optional['ApiUserAvatar']):
|
|
1611
|
-
if owner_user is None:
|
|
1612
|
-
del self.owner_user
|
|
1613
|
-
return
|
|
1614
|
-
if not isinstance(owner_user, ApiUserAvatar):
|
|
1615
|
-
raise TypeError('owner_user must be of type ApiUserAvatar')
|
|
1616
|
-
del self.owner_organization
|
|
1617
|
-
self._owner_user = owner_user
|
|
1618
|
-
|
|
1619
|
-
@property
|
|
1620
|
-
def owner_organization(self) -> Optional['ApiOrganizationCard']:
|
|
1621
|
-
return self._owner_organization or None
|
|
1622
|
-
|
|
1623
|
-
@owner_organization.setter
|
|
1624
|
-
def owner_organization(self, owner_organization: Optional['ApiOrganizationCard']):
|
|
1625
|
-
if owner_organization is None:
|
|
1626
|
-
del self.owner_organization
|
|
1627
|
-
return
|
|
1628
|
-
if not isinstance(owner_organization, ApiOrganizationCard):
|
|
1629
|
-
raise TypeError('owner_organization must be of type ApiOrganizationCard')
|
|
1630
|
-
del self.owner_user
|
|
1631
|
-
self._owner_organization = owner_organization
|
|
1632
|
-
|
|
1633
|
-
@property
|
|
1634
|
-
def competition_document(self) -> Optional['ApiSearchCompetitionsDocument']:
|
|
1635
|
-
return self._competition_document or None
|
|
1636
|
-
|
|
1637
|
-
@competition_document.setter
|
|
1638
|
-
def competition_document(self, competition_document: Optional['ApiSearchCompetitionsDocument']):
|
|
1639
|
-
if competition_document is None:
|
|
1640
|
-
del self.competition_document
|
|
1641
|
-
return
|
|
1642
|
-
if not isinstance(competition_document, ApiSearchCompetitionsDocument):
|
|
1643
|
-
raise TypeError('competition_document must be of type ApiSearchCompetitionsDocument')
|
|
1644
|
-
del self.dataset_document
|
|
1645
|
-
del self.kernel_document
|
|
1646
|
-
del self.model_document
|
|
1647
|
-
del self.discussion_document
|
|
1648
|
-
del self.user_document
|
|
1649
|
-
self._competition_document = competition_document
|
|
1650
|
-
|
|
1651
|
-
@property
|
|
1652
|
-
def dataset_document(self) -> Optional['ApiSearchDatasetsDocument']:
|
|
1653
|
-
return self._dataset_document or None
|
|
1654
|
-
|
|
1655
|
-
@dataset_document.setter
|
|
1656
|
-
def dataset_document(self, dataset_document: Optional['ApiSearchDatasetsDocument']):
|
|
1657
|
-
if dataset_document is None:
|
|
1658
|
-
del self.dataset_document
|
|
1659
|
-
return
|
|
1660
|
-
if not isinstance(dataset_document, ApiSearchDatasetsDocument):
|
|
1661
|
-
raise TypeError('dataset_document must be of type ApiSearchDatasetsDocument')
|
|
1662
|
-
del self.competition_document
|
|
1663
|
-
del self.kernel_document
|
|
1664
|
-
del self.model_document
|
|
1665
|
-
del self.discussion_document
|
|
1666
|
-
del self.user_document
|
|
1667
|
-
self._dataset_document = dataset_document
|
|
1668
|
-
|
|
1669
|
-
@property
|
|
1670
|
-
def kernel_document(self) -> Optional['ApiSearchKernelsDocument']:
|
|
1671
|
-
return self._kernel_document or None
|
|
1672
|
-
|
|
1673
|
-
@kernel_document.setter
|
|
1674
|
-
def kernel_document(self, kernel_document: Optional['ApiSearchKernelsDocument']):
|
|
1675
|
-
if kernel_document is None:
|
|
1676
|
-
del self.kernel_document
|
|
1677
|
-
return
|
|
1678
|
-
if not isinstance(kernel_document, ApiSearchKernelsDocument):
|
|
1679
|
-
raise TypeError('kernel_document must be of type ApiSearchKernelsDocument')
|
|
1680
|
-
del self.competition_document
|
|
1681
|
-
del self.dataset_document
|
|
1682
|
-
del self.model_document
|
|
1683
|
-
del self.discussion_document
|
|
1684
|
-
del self.user_document
|
|
1685
|
-
self._kernel_document = kernel_document
|
|
1686
|
-
|
|
1687
|
-
@property
|
|
1688
|
-
def model_document(self) -> Optional['ApiSearchModelsDocument']:
|
|
1689
|
-
return self._model_document or None
|
|
1690
|
-
|
|
1691
|
-
@model_document.setter
|
|
1692
|
-
def model_document(self, model_document: Optional['ApiSearchModelsDocument']):
|
|
1693
|
-
if model_document is None:
|
|
1694
|
-
del self.model_document
|
|
1695
|
-
return
|
|
1696
|
-
if not isinstance(model_document, ApiSearchModelsDocument):
|
|
1697
|
-
raise TypeError('model_document must be of type ApiSearchModelsDocument')
|
|
1698
|
-
del self.competition_document
|
|
1699
|
-
del self.dataset_document
|
|
1700
|
-
del self.kernel_document
|
|
1701
|
-
del self.discussion_document
|
|
1702
|
-
del self.user_document
|
|
1703
|
-
self._model_document = model_document
|
|
1704
|
-
|
|
1705
|
-
@property
|
|
1706
|
-
def discussion_document(self) -> Optional['ApiSearchDiscussionsDocument']:
|
|
1707
|
-
return self._discussion_document or None
|
|
1708
|
-
|
|
1709
|
-
@discussion_document.setter
|
|
1710
|
-
def discussion_document(self, discussion_document: Optional['ApiSearchDiscussionsDocument']):
|
|
1711
|
-
if discussion_document is None:
|
|
1712
|
-
del self.discussion_document
|
|
1713
|
-
return
|
|
1714
|
-
if not isinstance(discussion_document, ApiSearchDiscussionsDocument):
|
|
1715
|
-
raise TypeError('discussion_document must be of type ApiSearchDiscussionsDocument')
|
|
1716
|
-
del self.competition_document
|
|
1717
|
-
del self.dataset_document
|
|
1718
|
-
del self.kernel_document
|
|
1719
|
-
del self.model_document
|
|
1720
|
-
del self.user_document
|
|
1721
|
-
self._discussion_document = discussion_document
|
|
1722
|
-
|
|
1723
|
-
@property
|
|
1724
|
-
def user_document(self) -> Optional['ApiSearchUsersDocument']:
|
|
1725
|
-
return self._user_document or None
|
|
1726
|
-
|
|
1727
|
-
@user_document.setter
|
|
1728
|
-
def user_document(self, user_document: Optional['ApiSearchUsersDocument']):
|
|
1729
|
-
if user_document is None:
|
|
1730
|
-
del self.user_document
|
|
1731
|
-
return
|
|
1732
|
-
if not isinstance(user_document, ApiSearchUsersDocument):
|
|
1733
|
-
raise TypeError('user_document must be of type ApiSearchUsersDocument')
|
|
1734
|
-
del self.competition_document
|
|
1735
|
-
del self.dataset_document
|
|
1736
|
-
del self.kernel_document
|
|
1737
|
-
del self.model_document
|
|
1738
|
-
del self.discussion_document
|
|
1739
|
-
self._user_document = user_document
|
|
1740
|
-
|
|
1741
|
-
@property
|
|
1742
|
-
def slug(self) -> str:
|
|
1743
|
-
"""The slug of the document (which may be close to the url)"""
|
|
1744
|
-
return self._slug or ""
|
|
1745
|
-
|
|
1746
|
-
@slug.setter
|
|
1747
|
-
def slug(self, slug: Optional[str]):
|
|
1748
|
-
if slug is None:
|
|
1749
|
-
del self.slug
|
|
1750
|
-
return
|
|
1751
|
-
if not isinstance(slug, str):
|
|
1752
|
-
raise TypeError('slug must be of type str')
|
|
1753
|
-
self._slug = slug
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
class ListEntitiesFilters(KaggleObject):
|
|
1757
|
-
r"""
|
|
1758
|
-
Based on kaggle.search.ListSearchContentFilters
|
|
1759
|
-
|
|
1760
|
-
Attributes:
|
|
1761
|
-
query (str)
|
|
1762
|
-
The free-text query the user entered to filter results
|
|
1763
|
-
list_type (ApiListType)
|
|
1764
|
-
The type of list being requested
|
|
1765
|
-
privacy (PrivacyFilter)
|
|
1766
|
-
The privacy filter to apply
|
|
1767
|
-
owner_type (OwnerType)
|
|
1768
|
-
The owner type filter to apply
|
|
1769
|
-
document_types (DocumentType)
|
|
1770
|
-
The document type filter to apply
|
|
1771
|
-
competition_filters (ApiSearchCompetitionsFilters)
|
|
1772
|
-
The set of Competition filters to filter the documents
|
|
1773
|
-
dataset_filters (ApiSearchDatasetsFilters)
|
|
1774
|
-
The set of Dataset filters to filter the documents
|
|
1775
|
-
discussion_filters (ApiSearchDiscussionsFilters)
|
|
1776
|
-
The set of Discussion filters to filter the documents
|
|
1777
|
-
kernel_filters (ApiSearchKernelsFilters)
|
|
1778
|
-
The set of Kernel filters to filter the documents
|
|
1779
|
-
model_filters (ApiSearchModelsFilters)
|
|
1780
|
-
The set of Model filters to filter the documents
|
|
1781
|
-
user_filters (ApiSearchUsersFilters)
|
|
1782
|
-
The set of User filters to filter the documents
|
|
1783
|
-
"""
|
|
1784
|
-
|
|
1785
|
-
def __init__(self):
|
|
1786
|
-
self._query = ""
|
|
1787
|
-
self._list_type = ApiListType.API_LIST_TYPE_UNSPECIFIED
|
|
1788
|
-
self._privacy = PrivacyFilter.ALL
|
|
1789
|
-
self._owner_type = OwnerType.OWNER_TYPE_UNSPECIFIED
|
|
1790
|
-
self._document_types = []
|
|
1791
|
-
self._competition_filters = None
|
|
1792
|
-
self._dataset_filters = None
|
|
1793
|
-
self._discussion_filters = None
|
|
1794
|
-
self._kernel_filters = None
|
|
1795
|
-
self._model_filters = None
|
|
1796
|
-
self._user_filters = None
|
|
1797
|
-
self._freeze()
|
|
1798
|
-
|
|
1799
|
-
@property
|
|
1800
|
-
def query(self) -> str:
|
|
1801
|
-
"""The free-text query the user entered to filter results"""
|
|
1802
|
-
return self._query
|
|
1803
|
-
|
|
1804
|
-
@query.setter
|
|
1805
|
-
def query(self, query: str):
|
|
1806
|
-
if query is None:
|
|
1807
|
-
del self.query
|
|
1808
|
-
return
|
|
1809
|
-
if not isinstance(query, str):
|
|
1810
|
-
raise TypeError('query must be of type str')
|
|
1811
|
-
self._query = query
|
|
1812
|
-
|
|
1813
|
-
@property
|
|
1814
|
-
def list_type(self) -> 'ApiListType':
|
|
1815
|
-
"""The type of list being requested"""
|
|
1816
|
-
return self._list_type
|
|
1817
|
-
|
|
1818
|
-
@list_type.setter
|
|
1819
|
-
def list_type(self, list_type: 'ApiListType'):
|
|
1820
|
-
if list_type is None:
|
|
1821
|
-
del self.list_type
|
|
1822
|
-
return
|
|
1823
|
-
if not isinstance(list_type, ApiListType):
|
|
1824
|
-
raise TypeError('list_type must be of type ApiListType')
|
|
1825
|
-
self._list_type = list_type
|
|
1826
|
-
|
|
1827
|
-
@property
|
|
1828
|
-
def privacy(self) -> 'PrivacyFilter':
|
|
1829
|
-
"""The privacy filter to apply"""
|
|
1830
|
-
return self._privacy
|
|
1831
|
-
|
|
1832
|
-
@privacy.setter
|
|
1833
|
-
def privacy(self, privacy: 'PrivacyFilter'):
|
|
1834
|
-
if privacy is None:
|
|
1835
|
-
del self.privacy
|
|
1836
|
-
return
|
|
1837
|
-
if not isinstance(privacy, PrivacyFilter):
|
|
1838
|
-
raise TypeError('privacy must be of type PrivacyFilter')
|
|
1839
|
-
self._privacy = privacy
|
|
1840
|
-
|
|
1841
|
-
@property
|
|
1842
|
-
def owner_type(self) -> 'OwnerType':
|
|
1843
|
-
"""The owner type filter to apply"""
|
|
1844
|
-
return self._owner_type
|
|
1845
|
-
|
|
1846
|
-
@owner_type.setter
|
|
1847
|
-
def owner_type(self, owner_type: 'OwnerType'):
|
|
1848
|
-
if owner_type is None:
|
|
1849
|
-
del self.owner_type
|
|
1850
|
-
return
|
|
1851
|
-
if not isinstance(owner_type, OwnerType):
|
|
1852
|
-
raise TypeError('owner_type must be of type OwnerType')
|
|
1853
|
-
self._owner_type = owner_type
|
|
1854
|
-
|
|
1855
|
-
@property
|
|
1856
|
-
def document_types(self) -> Optional[List['DocumentType']]:
|
|
1857
|
-
"""The document type filter to apply"""
|
|
1858
|
-
return self._document_types
|
|
1859
|
-
|
|
1860
|
-
@document_types.setter
|
|
1861
|
-
def document_types(self, document_types: Optional[List['DocumentType']]):
|
|
1862
|
-
if document_types is None:
|
|
1863
|
-
del self.document_types
|
|
1864
|
-
return
|
|
1865
|
-
if not isinstance(document_types, list):
|
|
1866
|
-
raise TypeError('document_types must be of type list')
|
|
1867
|
-
if not all([isinstance(t, DocumentType) for t in document_types]):
|
|
1868
|
-
raise TypeError('document_types must contain only items of type DocumentType')
|
|
1869
|
-
self._document_types = document_types
|
|
1870
|
-
|
|
1871
|
-
@property
|
|
1872
|
-
def competition_filters(self) -> Optional['ApiSearchCompetitionsFilters']:
|
|
1873
|
-
"""The set of Competition filters to filter the documents"""
|
|
1874
|
-
return self._competition_filters
|
|
1875
|
-
|
|
1876
|
-
@competition_filters.setter
|
|
1877
|
-
def competition_filters(self, competition_filters: Optional['ApiSearchCompetitionsFilters']):
|
|
1878
|
-
if competition_filters is None:
|
|
1879
|
-
del self.competition_filters
|
|
1880
|
-
return
|
|
1881
|
-
if not isinstance(competition_filters, ApiSearchCompetitionsFilters):
|
|
1882
|
-
raise TypeError('competition_filters must be of type ApiSearchCompetitionsFilters')
|
|
1883
|
-
self._competition_filters = competition_filters
|
|
1884
|
-
|
|
1885
|
-
@property
|
|
1886
|
-
def dataset_filters(self) -> Optional['ApiSearchDatasetsFilters']:
|
|
1887
|
-
"""The set of Dataset filters to filter the documents"""
|
|
1888
|
-
return self._dataset_filters
|
|
1889
|
-
|
|
1890
|
-
@dataset_filters.setter
|
|
1891
|
-
def dataset_filters(self, dataset_filters: Optional['ApiSearchDatasetsFilters']):
|
|
1892
|
-
if dataset_filters is None:
|
|
1893
|
-
del self.dataset_filters
|
|
1894
|
-
return
|
|
1895
|
-
if not isinstance(dataset_filters, ApiSearchDatasetsFilters):
|
|
1896
|
-
raise TypeError('dataset_filters must be of type ApiSearchDatasetsFilters')
|
|
1897
|
-
self._dataset_filters = dataset_filters
|
|
1898
|
-
|
|
1899
|
-
@property
|
|
1900
|
-
def discussion_filters(self) -> Optional['ApiSearchDiscussionsFilters']:
|
|
1901
|
-
"""The set of Discussion filters to filter the documents"""
|
|
1902
|
-
return self._discussion_filters
|
|
1903
|
-
|
|
1904
|
-
@discussion_filters.setter
|
|
1905
|
-
def discussion_filters(self, discussion_filters: Optional['ApiSearchDiscussionsFilters']):
|
|
1906
|
-
if discussion_filters is None:
|
|
1907
|
-
del self.discussion_filters
|
|
1908
|
-
return
|
|
1909
|
-
if not isinstance(discussion_filters, ApiSearchDiscussionsFilters):
|
|
1910
|
-
raise TypeError('discussion_filters must be of type ApiSearchDiscussionsFilters')
|
|
1911
|
-
self._discussion_filters = discussion_filters
|
|
1912
|
-
|
|
1913
|
-
@property
|
|
1914
|
-
def kernel_filters(self) -> Optional['ApiSearchKernelsFilters']:
|
|
1915
|
-
"""The set of Kernel filters to filter the documents"""
|
|
1916
|
-
return self._kernel_filters
|
|
1917
|
-
|
|
1918
|
-
@kernel_filters.setter
|
|
1919
|
-
def kernel_filters(self, kernel_filters: Optional['ApiSearchKernelsFilters']):
|
|
1920
|
-
if kernel_filters is None:
|
|
1921
|
-
del self.kernel_filters
|
|
1922
|
-
return
|
|
1923
|
-
if not isinstance(kernel_filters, ApiSearchKernelsFilters):
|
|
1924
|
-
raise TypeError('kernel_filters must be of type ApiSearchKernelsFilters')
|
|
1925
|
-
self._kernel_filters = kernel_filters
|
|
1926
|
-
|
|
1927
|
-
@property
|
|
1928
|
-
def model_filters(self) -> Optional['ApiSearchModelsFilters']:
|
|
1929
|
-
"""The set of Model filters to filter the documents"""
|
|
1930
|
-
return self._model_filters
|
|
1931
|
-
|
|
1932
|
-
@model_filters.setter
|
|
1933
|
-
def model_filters(self, model_filters: Optional['ApiSearchModelsFilters']):
|
|
1934
|
-
if model_filters is None:
|
|
1935
|
-
del self.model_filters
|
|
1936
|
-
return
|
|
1937
|
-
if not isinstance(model_filters, ApiSearchModelsFilters):
|
|
1938
|
-
raise TypeError('model_filters must be of type ApiSearchModelsFilters')
|
|
1939
|
-
self._model_filters = model_filters
|
|
1940
|
-
|
|
1941
|
-
@property
|
|
1942
|
-
def user_filters(self) -> Optional['ApiSearchUsersFilters']:
|
|
1943
|
-
"""The set of User filters to filter the documents"""
|
|
1944
|
-
return self._user_filters
|
|
1945
|
-
|
|
1946
|
-
@user_filters.setter
|
|
1947
|
-
def user_filters(self, user_filters: Optional['ApiSearchUsersFilters']):
|
|
1948
|
-
if user_filters is None:
|
|
1949
|
-
del self.user_filters
|
|
1950
|
-
return
|
|
1951
|
-
if not isinstance(user_filters, ApiSearchUsersFilters):
|
|
1952
|
-
raise TypeError('user_filters must be of type ApiSearchUsersFilters')
|
|
1953
|
-
self._user_filters = user_filters
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
class ListEntitiesRequest(KaggleObject):
|
|
1957
|
-
r"""
|
|
1958
|
-
Attributes:
|
|
1959
|
-
filters (ListEntitiesFilters)
|
|
1960
|
-
Canonical filters to apply to the search
|
|
1961
|
-
canonical_order_by (ListSearchContentOrderBy)
|
|
1962
|
-
Canonical order to apply to the results
|
|
1963
|
-
competitions_order_by (SearchCompetitionsOrderBy)
|
|
1964
|
-
Competitions order to apply to the results
|
|
1965
|
-
datasets_order_by (SearchDatasetsOrderBy)
|
|
1966
|
-
Datasets order to apply to the results
|
|
1967
|
-
kernels_order_by (SearchKernelsOrderBy)
|
|
1968
|
-
Kernels order to apply to the results
|
|
1969
|
-
models_order_by (SearchModelsOrderBy)
|
|
1970
|
-
Models order to apply to the results
|
|
1971
|
-
discussions_order_by (SearchDiscussionsOrderBy)
|
|
1972
|
-
Discussions order to apply to the results
|
|
1973
|
-
users_order_by (SearchUsersOrderBy)
|
|
1974
|
-
Users order to apply to the results
|
|
1975
|
-
page_token (str)
|
|
1976
|
-
Page token for paging (see aip.dev/158)
|
|
1977
|
-
page_size (int)
|
|
1978
|
-
Number of documents per page to return
|
|
1979
|
-
skip (int)
|
|
1980
|
-
How many results to skip
|
|
1981
|
-
"""
|
|
1982
|
-
|
|
1983
|
-
def __init__(self):
|
|
1984
|
-
self._filters = None
|
|
1985
|
-
self._canonical_order_by = None
|
|
1986
|
-
self._competitions_order_by = None
|
|
1987
|
-
self._datasets_order_by = None
|
|
1988
|
-
self._kernels_order_by = None
|
|
1989
|
-
self._models_order_by = None
|
|
1990
|
-
self._discussions_order_by = None
|
|
1991
|
-
self._users_order_by = None
|
|
1992
|
-
self._page_token = ""
|
|
1993
|
-
self._page_size = 0
|
|
1994
|
-
self._skip = 0
|
|
1995
|
-
self._freeze()
|
|
1996
|
-
|
|
1997
|
-
@property
|
|
1998
|
-
def filters(self) -> Optional['ListEntitiesFilters']:
|
|
1999
|
-
"""Canonical filters to apply to the search"""
|
|
2000
|
-
return self._filters
|
|
2001
|
-
|
|
2002
|
-
@filters.setter
|
|
2003
|
-
def filters(self, filters: Optional['ListEntitiesFilters']):
|
|
2004
|
-
if filters is None:
|
|
2005
|
-
del self.filters
|
|
2006
|
-
return
|
|
2007
|
-
if not isinstance(filters, ListEntitiesFilters):
|
|
2008
|
-
raise TypeError('filters must be of type ListEntitiesFilters')
|
|
2009
|
-
self._filters = filters
|
|
2010
|
-
|
|
2011
|
-
@property
|
|
2012
|
-
def canonical_order_by(self) -> 'ListSearchContentOrderBy':
|
|
2013
|
-
"""Canonical order to apply to the results"""
|
|
2014
|
-
return self._canonical_order_by or ListSearchContentOrderBy.LIST_SEARCH_CONTENT_ORDER_BY_UNSPECIFIED
|
|
2015
|
-
|
|
2016
|
-
@canonical_order_by.setter
|
|
2017
|
-
def canonical_order_by(self, canonical_order_by: 'ListSearchContentOrderBy'):
|
|
2018
|
-
if canonical_order_by is None:
|
|
2019
|
-
del self.canonical_order_by
|
|
2020
|
-
return
|
|
2021
|
-
if not isinstance(canonical_order_by, ListSearchContentOrderBy):
|
|
2022
|
-
raise TypeError('canonical_order_by must be of type ListSearchContentOrderBy')
|
|
2023
|
-
del self.competitions_order_by
|
|
2024
|
-
del self.datasets_order_by
|
|
2025
|
-
del self.kernels_order_by
|
|
2026
|
-
del self.models_order_by
|
|
2027
|
-
del self.discussions_order_by
|
|
2028
|
-
del self.users_order_by
|
|
2029
|
-
self._canonical_order_by = canonical_order_by
|
|
2030
|
-
|
|
2031
|
-
@property
|
|
2032
|
-
def competitions_order_by(self) -> 'SearchCompetitionsOrderBy':
|
|
2033
|
-
"""Competitions order to apply to the results"""
|
|
2034
|
-
return self._competitions_order_by or SearchCompetitionsOrderBy.SEARCH_COMPETITIONS_ORDER_BY_UNSPECIFIED
|
|
2035
|
-
|
|
2036
|
-
@competitions_order_by.setter
|
|
2037
|
-
def competitions_order_by(self, competitions_order_by: 'SearchCompetitionsOrderBy'):
|
|
2038
|
-
if competitions_order_by is None:
|
|
2039
|
-
del self.competitions_order_by
|
|
2040
|
-
return
|
|
2041
|
-
if not isinstance(competitions_order_by, SearchCompetitionsOrderBy):
|
|
2042
|
-
raise TypeError('competitions_order_by must be of type SearchCompetitionsOrderBy')
|
|
2043
|
-
del self.canonical_order_by
|
|
2044
|
-
del self.datasets_order_by
|
|
2045
|
-
del self.kernels_order_by
|
|
2046
|
-
del self.models_order_by
|
|
2047
|
-
del self.discussions_order_by
|
|
2048
|
-
del self.users_order_by
|
|
2049
|
-
self._competitions_order_by = competitions_order_by
|
|
2050
|
-
|
|
2051
|
-
@property
|
|
2052
|
-
def datasets_order_by(self) -> 'SearchDatasetsOrderBy':
|
|
2053
|
-
"""Datasets order to apply to the results"""
|
|
2054
|
-
return self._datasets_order_by or SearchDatasetsOrderBy.SEARCH_DATASETS_ORDER_BY_UNSPECIFIED
|
|
2055
|
-
|
|
2056
|
-
@datasets_order_by.setter
|
|
2057
|
-
def datasets_order_by(self, datasets_order_by: 'SearchDatasetsOrderBy'):
|
|
2058
|
-
if datasets_order_by is None:
|
|
2059
|
-
del self.datasets_order_by
|
|
2060
|
-
return
|
|
2061
|
-
if not isinstance(datasets_order_by, SearchDatasetsOrderBy):
|
|
2062
|
-
raise TypeError('datasets_order_by must be of type SearchDatasetsOrderBy')
|
|
2063
|
-
del self.canonical_order_by
|
|
2064
|
-
del self.competitions_order_by
|
|
2065
|
-
del self.kernels_order_by
|
|
2066
|
-
del self.models_order_by
|
|
2067
|
-
del self.discussions_order_by
|
|
2068
|
-
del self.users_order_by
|
|
2069
|
-
self._datasets_order_by = datasets_order_by
|
|
2070
|
-
|
|
2071
|
-
@property
|
|
2072
|
-
def kernels_order_by(self) -> 'SearchKernelsOrderBy':
|
|
2073
|
-
"""Kernels order to apply to the results"""
|
|
2074
|
-
return self._kernels_order_by or SearchKernelsOrderBy.SEARCH_KERNELS_ORDER_BY_UNSPECIFIED
|
|
2075
|
-
|
|
2076
|
-
@kernels_order_by.setter
|
|
2077
|
-
def kernels_order_by(self, kernels_order_by: 'SearchKernelsOrderBy'):
|
|
2078
|
-
if kernels_order_by is None:
|
|
2079
|
-
del self.kernels_order_by
|
|
2080
|
-
return
|
|
2081
|
-
if not isinstance(kernels_order_by, SearchKernelsOrderBy):
|
|
2082
|
-
raise TypeError('kernels_order_by must be of type SearchKernelsOrderBy')
|
|
2083
|
-
del self.canonical_order_by
|
|
2084
|
-
del self.competitions_order_by
|
|
2085
|
-
del self.datasets_order_by
|
|
2086
|
-
del self.models_order_by
|
|
2087
|
-
del self.discussions_order_by
|
|
2088
|
-
del self.users_order_by
|
|
2089
|
-
self._kernels_order_by = kernels_order_by
|
|
2090
|
-
|
|
2091
|
-
@property
|
|
2092
|
-
def models_order_by(self) -> 'SearchModelsOrderBy':
|
|
2093
|
-
"""Models order to apply to the results"""
|
|
2094
|
-
return self._models_order_by or SearchModelsOrderBy.MODELS_SEARCH_ORDER_BY_UNSPECIFIED
|
|
2095
|
-
|
|
2096
|
-
@models_order_by.setter
|
|
2097
|
-
def models_order_by(self, models_order_by: 'SearchModelsOrderBy'):
|
|
2098
|
-
if models_order_by is None:
|
|
2099
|
-
del self.models_order_by
|
|
2100
|
-
return
|
|
2101
|
-
if not isinstance(models_order_by, SearchModelsOrderBy):
|
|
2102
|
-
raise TypeError('models_order_by must be of type SearchModelsOrderBy')
|
|
2103
|
-
del self.canonical_order_by
|
|
2104
|
-
del self.competitions_order_by
|
|
2105
|
-
del self.datasets_order_by
|
|
2106
|
-
del self.kernels_order_by
|
|
2107
|
-
del self.discussions_order_by
|
|
2108
|
-
del self.users_order_by
|
|
2109
|
-
self._models_order_by = models_order_by
|
|
2110
|
-
|
|
2111
|
-
@property
|
|
2112
|
-
def discussions_order_by(self) -> 'SearchDiscussionsOrderBy':
|
|
2113
|
-
"""Discussions order to apply to the results"""
|
|
2114
|
-
return self._discussions_order_by or SearchDiscussionsOrderBy.SEARCH_DISCUSSIONS_ORDER_BY_UNSPECIFIED
|
|
2115
|
-
|
|
2116
|
-
@discussions_order_by.setter
|
|
2117
|
-
def discussions_order_by(self, discussions_order_by: 'SearchDiscussionsOrderBy'):
|
|
2118
|
-
if discussions_order_by is None:
|
|
2119
|
-
del self.discussions_order_by
|
|
2120
|
-
return
|
|
2121
|
-
if not isinstance(discussions_order_by, SearchDiscussionsOrderBy):
|
|
2122
|
-
raise TypeError('discussions_order_by must be of type SearchDiscussionsOrderBy')
|
|
2123
|
-
del self.canonical_order_by
|
|
2124
|
-
del self.competitions_order_by
|
|
2125
|
-
del self.datasets_order_by
|
|
2126
|
-
del self.kernels_order_by
|
|
2127
|
-
del self.models_order_by
|
|
2128
|
-
del self.users_order_by
|
|
2129
|
-
self._discussions_order_by = discussions_order_by
|
|
2130
|
-
|
|
2131
|
-
@property
|
|
2132
|
-
def users_order_by(self) -> 'SearchUsersOrderBy':
|
|
2133
|
-
"""Users order to apply to the results"""
|
|
2134
|
-
return self._users_order_by or SearchUsersOrderBy.SEARCH_USERS_ORDER_BY_UNSPECIFIED
|
|
2135
|
-
|
|
2136
|
-
@users_order_by.setter
|
|
2137
|
-
def users_order_by(self, users_order_by: 'SearchUsersOrderBy'):
|
|
2138
|
-
if users_order_by is None:
|
|
2139
|
-
del self.users_order_by
|
|
2140
|
-
return
|
|
2141
|
-
if not isinstance(users_order_by, SearchUsersOrderBy):
|
|
2142
|
-
raise TypeError('users_order_by must be of type SearchUsersOrderBy')
|
|
2143
|
-
del self.canonical_order_by
|
|
2144
|
-
del self.competitions_order_by
|
|
2145
|
-
del self.datasets_order_by
|
|
2146
|
-
del self.kernels_order_by
|
|
2147
|
-
del self.models_order_by
|
|
2148
|
-
del self.discussions_order_by
|
|
2149
|
-
self._users_order_by = users_order_by
|
|
2150
|
-
|
|
2151
|
-
@property
|
|
2152
|
-
def page_token(self) -> str:
|
|
2153
|
-
"""Page token for paging (see aip.dev/158)"""
|
|
2154
|
-
return self._page_token
|
|
2155
|
-
|
|
2156
|
-
@page_token.setter
|
|
2157
|
-
def page_token(self, page_token: str):
|
|
2158
|
-
if page_token is None:
|
|
2159
|
-
del self.page_token
|
|
2160
|
-
return
|
|
2161
|
-
if not isinstance(page_token, str):
|
|
2162
|
-
raise TypeError('page_token must be of type str')
|
|
2163
|
-
self._page_token = page_token
|
|
2164
|
-
|
|
2165
|
-
@property
|
|
2166
|
-
def page_size(self) -> int:
|
|
2167
|
-
"""Number of documents per page to return"""
|
|
2168
|
-
return self._page_size
|
|
2169
|
-
|
|
2170
|
-
@page_size.setter
|
|
2171
|
-
def page_size(self, page_size: int):
|
|
2172
|
-
if page_size is None:
|
|
2173
|
-
del self.page_size
|
|
2174
|
-
return
|
|
2175
|
-
if not isinstance(page_size, int):
|
|
2176
|
-
raise TypeError('page_size must be of type int')
|
|
2177
|
-
self._page_size = page_size
|
|
2178
|
-
|
|
2179
|
-
@property
|
|
2180
|
-
def skip(self) -> int:
|
|
2181
|
-
"""How many results to skip"""
|
|
2182
|
-
return self._skip
|
|
2183
|
-
|
|
2184
|
-
@skip.setter
|
|
2185
|
-
def skip(self, skip: int):
|
|
2186
|
-
if skip is None:
|
|
2187
|
-
del self.skip
|
|
2188
|
-
return
|
|
2189
|
-
if not isinstance(skip, int):
|
|
2190
|
-
raise TypeError('skip must be of type int')
|
|
2191
|
-
self._skip = skip
|
|
2192
|
-
|
|
2193
|
-
def endpoint(self):
|
|
2194
|
-
path = '/api/v1/search/list-entities'
|
|
2195
|
-
return path.format_map(self.to_field_map(self))
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
class ListEntitiesResponse(KaggleObject):
|
|
2199
|
-
r"""
|
|
2200
|
-
Attributes:
|
|
2201
|
-
documents (ListEntitiesDocument)
|
|
2202
|
-
The list of documents returned after filtering
|
|
2203
|
-
total_documents (int)
|
|
2204
|
-
The total number of documents matching any filters
|
|
2205
|
-
next_page_token (str)
|
|
2206
|
-
The token to request the next page
|
|
2207
|
-
"""
|
|
2208
|
-
|
|
2209
|
-
def __init__(self):
|
|
2210
|
-
self._documents = []
|
|
2211
|
-
self._total_documents = 0
|
|
2212
|
-
self._next_page_token = ""
|
|
2213
|
-
self._freeze()
|
|
2214
|
-
|
|
2215
|
-
@property
|
|
2216
|
-
def documents(self) -> Optional[List[Optional['ListEntitiesDocument']]]:
|
|
2217
|
-
"""The list of documents returned after filtering"""
|
|
2218
|
-
return self._documents
|
|
2219
|
-
|
|
2220
|
-
@documents.setter
|
|
2221
|
-
def documents(self, documents: Optional[List[Optional['ListEntitiesDocument']]]):
|
|
2222
|
-
if documents is None:
|
|
2223
|
-
del self.documents
|
|
2224
|
-
return
|
|
2225
|
-
if not isinstance(documents, list):
|
|
2226
|
-
raise TypeError('documents must be of type list')
|
|
2227
|
-
if not all([isinstance(t, ListEntitiesDocument) for t in documents]):
|
|
2228
|
-
raise TypeError('documents must contain only items of type ListEntitiesDocument')
|
|
2229
|
-
self._documents = documents
|
|
2230
|
-
|
|
2231
|
-
@property
|
|
2232
|
-
def total_documents(self) -> int:
|
|
2233
|
-
"""The total number of documents matching any filters"""
|
|
2234
|
-
return self._total_documents
|
|
2235
|
-
|
|
2236
|
-
@total_documents.setter
|
|
2237
|
-
def total_documents(self, total_documents: int):
|
|
2238
|
-
if total_documents is None:
|
|
2239
|
-
del self.total_documents
|
|
2240
|
-
return
|
|
2241
|
-
if not isinstance(total_documents, int):
|
|
2242
|
-
raise TypeError('total_documents must be of type int')
|
|
2243
|
-
self._total_documents = total_documents
|
|
2244
|
-
|
|
2245
|
-
@property
|
|
2246
|
-
def next_page_token(self) -> str:
|
|
2247
|
-
"""The token to request the next page"""
|
|
2248
|
-
return self._next_page_token
|
|
2249
|
-
|
|
2250
|
-
@next_page_token.setter
|
|
2251
|
-
def next_page_token(self, next_page_token: str):
|
|
2252
|
-
if next_page_token is None:
|
|
2253
|
-
del self.next_page_token
|
|
2254
|
-
return
|
|
2255
|
-
if not isinstance(next_page_token, str):
|
|
2256
|
-
raise TypeError('next_page_token must be of type str')
|
|
2257
|
-
self._next_page_token = next_page_token
|
|
2258
|
-
|
|
2259
|
-
@property
|
|
2260
|
-
def totalDocuments(self):
|
|
2261
|
-
return self.total_documents
|
|
2262
|
-
|
|
2263
|
-
@property
|
|
2264
|
-
def nextPageToken(self):
|
|
2265
|
-
return self.next_page_token
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
ApiOrganizationCard._fields = [
|
|
2269
|
-
FieldMetadata("name", "name", "_name", str, "", PredefinedSerializer()),
|
|
2270
|
-
FieldMetadata("id", "id", "_id", int, 0, PredefinedSerializer()),
|
|
2271
|
-
FieldMetadata("thumbnailImageUrl", "thumbnail_image_url", "_thumbnail_image_url", str, "", PredefinedSerializer()),
|
|
2272
|
-
FieldMetadata("slug", "slug", "_slug", str, "", PredefinedSerializer()),
|
|
2273
|
-
]
|
|
2274
|
-
|
|
2275
|
-
ApiSearchCompetitionsDocument._fields = [
|
|
2276
|
-
FieldMetadata("hostSegment", "host_segment", "_host_segment", HostSegment, HostSegment.HOST_SEGMENT_UNSPECIFIED, EnumSerializer()),
|
|
2277
|
-
FieldMetadata("deadline", "deadline", "_deadline", datetime, None, DateTimeSerializer()),
|
|
2278
|
-
FieldMetadata("teamCount", "team_count", "_team_count", int, 0, PredefinedSerializer()),
|
|
2279
|
-
FieldMetadata("teamRank", "team_rank", "_team_rank", int, None, PredefinedSerializer(), optional=True),
|
|
2280
|
-
FieldMetadata("isEnvironmentEvaluation", "is_environment_evaluation", "_is_environment_evaluation", bool, False, PredefinedSerializer()),
|
|
2281
|
-
FieldMetadata("prizeType", "prize_type", "_prize_type", RewardTypeId, RewardTypeId.REWARD_TYPE_ID_UNSPECIFIED, EnumSerializer()),
|
|
2282
|
-
FieldMetadata("prizeValue", "prize_value", "_prize_value", float, None, PredefinedSerializer(), optional=True),
|
|
2283
|
-
FieldMetadata("isLaunched", "is_launched", "_is_launched", bool, False, PredefinedSerializer()),
|
|
2284
|
-
FieldMetadata("ownerUserHasJoined", "owner_user_has_joined", "_owner_user_has_joined", bool, False, PredefinedSerializer()),
|
|
2285
|
-
FieldMetadata("isLimitedParticipation", "is_limited_participation", "_is_limited_participation", bool, False, PredefinedSerializer()),
|
|
2286
|
-
FieldMetadata("onlyAllowKernelSubmissions", "only_allow_kernel_submissions", "_only_allow_kernel_submissions", bool, False, PredefinedSerializer()),
|
|
2287
|
-
]
|
|
2288
|
-
|
|
2289
|
-
ApiSearchCompetitionsFilters._fields = [
|
|
2290
|
-
FieldMetadata("role", "role", "_role", SearchCompetitionsRole, SearchCompetitionsRole.SEARCH_COMPETITIONS_ROLE_ANY, EnumSerializer()),
|
|
2291
|
-
FieldMetadata("status", "status", "_status", SearchCompetitionsStatus, SearchCompetitionsStatus.SEARCH_COMPETITIONS_STATUS_ANY, EnumSerializer()),
|
|
2292
|
-
FieldMetadata("profileVisibility", "profile_visibility", "_profile_visibility", SearchCompetitionsProfileVisibility, SearchCompetitionsProfileVisibility.SEARCH_COMPETITIONS_PROFILE_VISIBILITY_ANY, EnumSerializer()),
|
|
2293
|
-
FieldMetadata("earnedMedal", "earned_medal", "_earned_medal", bool, None, PredefinedSerializer(), optional=True),
|
|
2294
|
-
]
|
|
2295
|
-
|
|
2296
|
-
ApiSearchDatasetsDocument._fields = [
|
|
2297
|
-
FieldMetadata("usabilityRating", "usability_rating", "_usability_rating", float, 0.0, PredefinedSerializer()),
|
|
2298
|
-
FieldMetadata("fileCount", "file_count", "_file_count", int, 0, PredefinedSerializer()),
|
|
2299
|
-
FieldMetadata("fileTypes", "file_types", "_file_types", DatasetFileType, [], ListSerializer(EnumSerializer())),
|
|
2300
|
-
FieldMetadata("size", "size", "_size", int, 0, PredefinedSerializer()),
|
|
2301
|
-
]
|
|
2302
|
-
|
|
2303
|
-
ApiSearchDatasetsFilters._fields = [
|
|
2304
|
-
FieldMetadata("fileType", "file_type", "_file_type", DatasetFileTypeGroup, DatasetFileTypeGroup.DATASET_FILE_TYPE_GROUP_ALL, EnumSerializer()),
|
|
2305
|
-
FieldMetadata("licenseGroup", "license_group", "_license_group", DatasetLicenseGroup, None, EnumSerializer(), optional=True),
|
|
2306
|
-
FieldMetadata("size", "size", "_size", DatasetSizeGroup, None, EnumSerializer(), optional=True),
|
|
2307
|
-
FieldMetadata("earnedMedal", "earned_medal", "_earned_medal", bool, None, PredefinedSerializer(), optional=True),
|
|
2308
|
-
]
|
|
2309
|
-
|
|
2310
|
-
ApiSearchDiscussionsDocument._fields = [
|
|
2311
|
-
FieldMetadata("newCommentUrl", "new_comment_url", "_new_comment_url", str, None, PredefinedSerializer(), optional=True),
|
|
2312
|
-
FieldMetadata("messageStripped", "message_stripped", "_message_stripped", str, "", PredefinedSerializer()),
|
|
2313
|
-
FieldMetadata("messageMarkdown", "message_markdown", "_message_markdown", str, None, PredefinedSerializer(), optional=True),
|
|
2314
|
-
FieldMetadata("forumName", "forum_name", "_forum_name", str, "", PredefinedSerializer()),
|
|
2315
|
-
FieldMetadata("forumUrl", "forum_url", "_forum_url", str, None, PredefinedSerializer(), optional=True),
|
|
2316
|
-
FieldMetadata("sourceType", "source_type", "_source_type", SearchDiscussionsSourceType, SearchDiscussionsSourceType.SEARCH_DISCUSSIONS_SOURCE_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2317
|
-
FieldMetadata("topicType", "topic_type", "_topic_type", SearchDiscussionsTopicType, SearchDiscussionsTopicType.SEARCH_DISCUSSIONS_TOPIC_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2318
|
-
FieldMetadata("type", "type", "_type", SearchDiscussionsDocumentType, SearchDiscussionsDocumentType.SEARCH_DISCUSSIONS_DOCUMENT_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2319
|
-
FieldMetadata("writeUpMetadata", "write_up_metadata", "_write_up_metadata", WriteUpItemInfo, None, KaggleObjectSerializer(), optional=True),
|
|
2320
|
-
]
|
|
2321
|
-
|
|
2322
|
-
ApiSearchDiscussionsFilters._fields = [
|
|
2323
|
-
FieldMetadata("sourceType", "source_type", "_source_type", SearchDiscussionsSourceType, SearchDiscussionsSourceType.SEARCH_DISCUSSIONS_SOURCE_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2324
|
-
FieldMetadata("onlyNewComments", "only_new_comments", "_only_new_comments", bool, False, PredefinedSerializer()),
|
|
2325
|
-
FieldMetadata("writeUpInclusionType", "write_up_inclusion_type", "_write_up_inclusion_type", WriteUpInclusionType, WriteUpInclusionType.WRITE_UP_INCLUSION_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2326
|
-
FieldMetadata("writeUpTypes", "write_up_types", "_write_up_types", WriteUpType, [], ListSerializer(EnumSerializer())),
|
|
2327
|
-
]
|
|
2328
|
-
|
|
2329
|
-
ApiSearchKernelsDocument._fields = [
|
|
2330
|
-
FieldMetadata("sessionId", "session_id", "_session_id", int, None, PredefinedSerializer(), optional=True),
|
|
2331
|
-
FieldMetadata("hasLinkedSubmission", "has_linked_submission", "_has_linked_submission", bool, False, PredefinedSerializer()),
|
|
2332
|
-
FieldMetadata("datasourceIsPrivate", "datasource_is_private", "_datasource_is_private", bool, False, PredefinedSerializer()),
|
|
2333
|
-
FieldMetadata("bestPublicScore", "best_public_score", "_best_public_score", float, 0.0, PredefinedSerializer()),
|
|
2334
|
-
FieldMetadata("isDraft", "is_draft", "_is_draft", bool, False, PredefinedSerializer()),
|
|
2335
|
-
]
|
|
2336
|
-
|
|
2337
|
-
ApiSearchKernelsFilters._fields = [
|
|
2338
|
-
FieldMetadata("language", "language", "_language", str, None, PredefinedSerializer(), optional=True),
|
|
2339
|
-
FieldMetadata("earnedMedal", "earned_medal", "_earned_medal", bool, None, PredefinedSerializer(), optional=True),
|
|
2340
|
-
]
|
|
2341
|
-
|
|
2342
|
-
ApiSearchModelsDocument._fields = [
|
|
2343
|
-
FieldMetadata("instanceCount", "instance_count", "_instance_count", int, 0, PredefinedSerializer()),
|
|
2344
|
-
FieldMetadata("notebookCount", "notebook_count", "_notebook_count", int, 0, PredefinedSerializer()),
|
|
2345
|
-
]
|
|
2346
|
-
|
|
2347
|
-
ApiSearchModelsFilters._fields = [
|
|
2348
|
-
FieldMetadata("size", "size", "_size", ListSearchContentRangeFilter, None, KaggleObjectSerializer()),
|
|
2349
|
-
]
|
|
2350
|
-
|
|
2351
|
-
ApiSearchUsersDocument._fields = [
|
|
2352
|
-
FieldMetadata("grandmasterTierLevel", "grandmaster_tier_level", "_grandmaster_tier_level", int, 0, PredefinedSerializer()),
|
|
2353
|
-
FieldMetadata("userLocation", "user_location", "_user_location", str, None, PredefinedSerializer(), optional=True),
|
|
2354
|
-
FieldMetadata("occupationOrganizationName", "occupation_organization_name", "_occupation_organization_name", str, None, PredefinedSerializer(), optional=True),
|
|
2355
|
-
FieldMetadata("competitionRanking", "competition_ranking", "_competition_ranking", int, None, PredefinedSerializer(), optional=True),
|
|
2356
|
-
FieldMetadata("competitionPoints", "competition_points", "_competition_points", int, None, PredefinedSerializer(), optional=True),
|
|
2357
|
-
FieldMetadata("kernelRanking", "kernel_ranking", "_kernel_ranking", int, None, PredefinedSerializer(), optional=True),
|
|
2358
|
-
FieldMetadata("kernelPoints", "kernel_points", "_kernel_points", int, None, PredefinedSerializer(), optional=True),
|
|
2359
|
-
FieldMetadata("datasetRanking", "dataset_ranking", "_dataset_ranking", int, None, PredefinedSerializer(), optional=True),
|
|
2360
|
-
FieldMetadata("datasetPoints", "dataset_points", "_dataset_points", int, None, PredefinedSerializer(), optional=True),
|
|
2361
|
-
]
|
|
2362
|
-
|
|
2363
|
-
ApiSearchUsersFilters._fields = [
|
|
2364
|
-
FieldMetadata("userLocations", "user_locations", "_user_locations", str, [], ListSerializer(PredefinedSerializer())),
|
|
2365
|
-
FieldMetadata("tier", "tier", "_tier", UserAchievementTier, None, EnumSerializer(), optional=True),
|
|
2366
|
-
FieldMetadata("userIds", "user_ids", "_user_ids", int, [], ListSerializer(PredefinedSerializer())),
|
|
2367
|
-
FieldMetadata("requireRankingForType", "require_ranking_for_type", "_require_ranking_for_type", UserAchievementType, None, EnumSerializer(), optional=True),
|
|
2368
|
-
FieldMetadata("occupationOrganizationNames", "occupation_organization_names", "_occupation_organization_names", str, [], ListSerializer(PredefinedSerializer())),
|
|
2369
|
-
FieldMetadata("grandmasterLevel", "grandmaster_level", "_grandmaster_level", ListSearchContentRangeFilter, None, KaggleObjectSerializer()),
|
|
2370
|
-
]
|
|
2371
|
-
|
|
2372
|
-
ApiUserAvatar._fields = [
|
|
2373
|
-
FieldMetadata("id", "id", "_id", int, 0, PredefinedSerializer()),
|
|
2374
|
-
FieldMetadata("displayName", "display_name", "_display_name", str, None, PredefinedSerializer(), optional=True),
|
|
2375
|
-
FieldMetadata("thumbnailUrl", "thumbnail_url", "_thumbnail_url", str, None, PredefinedSerializer(), optional=True),
|
|
2376
|
-
FieldMetadata("url", "url", "_url", str, None, PredefinedSerializer(), optional=True),
|
|
2377
|
-
FieldMetadata("userName", "user_name", "_user_name", str, None, PredefinedSerializer(), optional=True),
|
|
2378
|
-
FieldMetadata("progressionOptOut", "progression_opt_out", "_progression_opt_out", bool, None, PredefinedSerializer(), optional=True),
|
|
2379
|
-
FieldMetadata("tier", "tier", "_tier", UserAchievementTier, UserAchievementTier.NOVICE, EnumSerializer()),
|
|
2380
|
-
]
|
|
2381
|
-
|
|
2382
|
-
ListEntitiesDocument._fields = [
|
|
2383
|
-
FieldMetadata("id", "id", "_id", int, 0, PredefinedSerializer()),
|
|
2384
|
-
FieldMetadata("documentType", "document_type", "_document_type", DocumentType, DocumentType.DOCUMENT_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2385
|
-
FieldMetadata("title", "title", "_title", str, "", PredefinedSerializer()),
|
|
2386
|
-
FieldMetadata("imageUrl", "image_url", "_image_url", str, "", PredefinedSerializer()),
|
|
2387
|
-
FieldMetadata("createTime", "create_time", "_create_time", datetime, None, DateTimeSerializer()),
|
|
2388
|
-
FieldMetadata("updateTime", "update_time", "_update_time", datetime, None, DateTimeSerializer(), optional=True),
|
|
2389
|
-
FieldMetadata("isPrivate", "is_private", "_is_private", bool, None, PredefinedSerializer(), optional=True),
|
|
2390
|
-
FieldMetadata("votes", "votes", "_votes", int, None, PredefinedSerializer(), optional=True),
|
|
2391
|
-
FieldMetadata("ownerUser", "owner_user", "_owner_user", ApiUserAvatar, None, KaggleObjectSerializer(), optional=True),
|
|
2392
|
-
FieldMetadata("ownerOrganization", "owner_organization", "_owner_organization", ApiOrganizationCard, None, KaggleObjectSerializer(), optional=True),
|
|
2393
|
-
FieldMetadata("competitionDocument", "competition_document", "_competition_document", ApiSearchCompetitionsDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2394
|
-
FieldMetadata("datasetDocument", "dataset_document", "_dataset_document", ApiSearchDatasetsDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2395
|
-
FieldMetadata("kernelDocument", "kernel_document", "_kernel_document", ApiSearchKernelsDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2396
|
-
FieldMetadata("modelDocument", "model_document", "_model_document", ApiSearchModelsDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2397
|
-
FieldMetadata("discussionDocument", "discussion_document", "_discussion_document", ApiSearchDiscussionsDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2398
|
-
FieldMetadata("userDocument", "user_document", "_user_document", ApiSearchUsersDocument, None, KaggleObjectSerializer(), optional=True),
|
|
2399
|
-
FieldMetadata("slug", "slug", "_slug", str, None, PredefinedSerializer(), optional=True),
|
|
2400
|
-
]
|
|
2401
|
-
|
|
2402
|
-
ListEntitiesFilters._fields = [
|
|
2403
|
-
FieldMetadata("query", "query", "_query", str, "", PredefinedSerializer()),
|
|
2404
|
-
FieldMetadata("listType", "list_type", "_list_type", ApiListType, ApiListType.API_LIST_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2405
|
-
FieldMetadata("privacy", "privacy", "_privacy", PrivacyFilter, PrivacyFilter.ALL, EnumSerializer()),
|
|
2406
|
-
FieldMetadata("ownerType", "owner_type", "_owner_type", OwnerType, OwnerType.OWNER_TYPE_UNSPECIFIED, EnumSerializer()),
|
|
2407
|
-
FieldMetadata("documentTypes", "document_types", "_document_types", DocumentType, [], ListSerializer(EnumSerializer())),
|
|
2408
|
-
FieldMetadata("competitionFilters", "competition_filters", "_competition_filters", ApiSearchCompetitionsFilters, None, KaggleObjectSerializer()),
|
|
2409
|
-
FieldMetadata("datasetFilters", "dataset_filters", "_dataset_filters", ApiSearchDatasetsFilters, None, KaggleObjectSerializer()),
|
|
2410
|
-
FieldMetadata("discussionFilters", "discussion_filters", "_discussion_filters", ApiSearchDiscussionsFilters, None, KaggleObjectSerializer()),
|
|
2411
|
-
FieldMetadata("kernelFilters", "kernel_filters", "_kernel_filters", ApiSearchKernelsFilters, None, KaggleObjectSerializer()),
|
|
2412
|
-
FieldMetadata("modelFilters", "model_filters", "_model_filters", ApiSearchModelsFilters, None, KaggleObjectSerializer()),
|
|
2413
|
-
FieldMetadata("userFilters", "user_filters", "_user_filters", ApiSearchUsersFilters, None, KaggleObjectSerializer()),
|
|
2414
|
-
]
|
|
2415
|
-
|
|
2416
|
-
ListEntitiesRequest._fields = [
|
|
2417
|
-
FieldMetadata("filters", "filters", "_filters", ListEntitiesFilters, None, KaggleObjectSerializer()),
|
|
2418
|
-
FieldMetadata("canonicalOrderBy", "canonical_order_by", "_canonical_order_by", ListSearchContentOrderBy, None, EnumSerializer(), optional=True),
|
|
2419
|
-
FieldMetadata("competitionsOrderBy", "competitions_order_by", "_competitions_order_by", SearchCompetitionsOrderBy, None, EnumSerializer(), optional=True),
|
|
2420
|
-
FieldMetadata("datasetsOrderBy", "datasets_order_by", "_datasets_order_by", SearchDatasetsOrderBy, None, EnumSerializer(), optional=True),
|
|
2421
|
-
FieldMetadata("kernelsOrderBy", "kernels_order_by", "_kernels_order_by", SearchKernelsOrderBy, None, EnumSerializer(), optional=True),
|
|
2422
|
-
FieldMetadata("modelsOrderBy", "models_order_by", "_models_order_by", SearchModelsOrderBy, None, EnumSerializer(), optional=True),
|
|
2423
|
-
FieldMetadata("discussionsOrderBy", "discussions_order_by", "_discussions_order_by", SearchDiscussionsOrderBy, None, EnumSerializer(), optional=True),
|
|
2424
|
-
FieldMetadata("usersOrderBy", "users_order_by", "_users_order_by", SearchUsersOrderBy, None, EnumSerializer(), optional=True),
|
|
2425
|
-
FieldMetadata("pageToken", "page_token", "_page_token", str, "", PredefinedSerializer()),
|
|
2426
|
-
FieldMetadata("pageSize", "page_size", "_page_size", int, 0, PredefinedSerializer()),
|
|
2427
|
-
FieldMetadata("skip", "skip", "_skip", int, 0, PredefinedSerializer()),
|
|
2428
|
-
]
|
|
2429
|
-
|
|
2430
|
-
ListEntitiesResponse._fields = [
|
|
2431
|
-
FieldMetadata("documents", "documents", "_documents", ListEntitiesDocument, [], ListSerializer(KaggleObjectSerializer())),
|
|
2432
|
-
FieldMetadata("totalDocuments", "total_documents", "_total_documents", int, 0, PredefinedSerializer()),
|
|
2433
|
-
FieldMetadata("nextPageToken", "next_page_token", "_next_page_token", str, "", PredefinedSerializer()),
|
|
2434
|
-
]
|
|
2435
|
-
|