kaggle 1.7.4.2__py3-none-any.whl → 1.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kaggle/__init__.py +10 -6
- kaggle/api/kaggle_api.py +574 -585
- kaggle/api/kaggle_api_extended.py +5251 -4738
- kaggle/cli.py +1335 -1585
- kaggle/models/api_blob_type.py +3 -3
- kaggle/models/dataset_column.py +129 -129
- kaggle/models/dataset_new_request.py +130 -72
- kaggle/models/dataset_new_version_request.py +88 -56
- kaggle/models/dataset_update_settings_request.py +93 -59
- kaggle/models/kaggle_models_extended.py +169 -172
- kaggle/models/kernel_push_request.py +152 -100
- kaggle/models/model_instance_new_version_request.py +30 -30
- kaggle/models/model_instance_update_request.py +171 -71
- kaggle/models/model_new_instance_request.py +223 -88
- kaggle/models/model_new_request.py +61 -46
- kaggle/models/model_update_request.py +66 -48
- kaggle/models/start_blob_upload_request.py +146 -138
- kaggle/models/start_blob_upload_response.py +83 -78
- kaggle/models/upload_file.py +92 -96
- kaggle/test/test_authenticate.py +23 -23
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/METADATA +11 -15
- kaggle-1.8.0.dist-info/RECORD +148 -0
- kagglesdk/__init__.py +5 -1
- kagglesdk/benchmarks/services/__init__.py +0 -0
- kagglesdk/benchmarks/services/benchmarks_api_service.py +19 -0
- kagglesdk/benchmarks/types/__init__.py +0 -0
- kagglesdk/benchmarks/types/benchmark_types.py +307 -0
- kagglesdk/benchmarks/types/benchmarks_api_service.py +243 -0
- kagglesdk/blobs/services/blob_api_service.py +1 -1
- kagglesdk/blobs/types/blob_api_service.py +2 -2
- kagglesdk/common/services/__init__.py +0 -0
- kagglesdk/common/services/operations_service.py +46 -0
- kagglesdk/common/types/file_download.py +1 -1
- kagglesdk/common/types/http_redirect.py +1 -1
- kagglesdk/common/types/operations.py +194 -0
- kagglesdk/common/types/operations_service.py +48 -0
- kagglesdk/community/__init__.py +0 -0
- kagglesdk/community/types/__init__.py +0 -0
- kagglesdk/community/types/content_enums.py +44 -0
- kagglesdk/community/types/organization.py +410 -0
- kagglesdk/competitions/services/competition_api_service.py +49 -12
- kagglesdk/competitions/types/competition.py +14 -0
- kagglesdk/competitions/types/competition_api_service.py +1639 -1275
- kagglesdk/competitions/types/search_competitions.py +28 -0
- kagglesdk/datasets/databundles/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/databundle_api_types.py +540 -0
- kagglesdk/datasets/services/dataset_api_service.py +39 -14
- kagglesdk/datasets/types/dataset_api_service.py +567 -297
- kagglesdk/datasets/types/dataset_enums.py +21 -0
- kagglesdk/datasets/types/dataset_service.py +145 -0
- kagglesdk/datasets/types/dataset_types.py +74 -74
- kagglesdk/datasets/types/search_datasets.py +6 -0
- kagglesdk/discussions/__init__.py +0 -0
- kagglesdk/discussions/types/__init__.py +0 -0
- kagglesdk/discussions/types/search_discussions.py +43 -0
- kagglesdk/discussions/types/writeup_enums.py +11 -0
- kagglesdk/education/services/education_api_service.py +1 -1
- kagglesdk/education/types/education_api_service.py +1 -1
- kagglesdk/kaggle_client.py +55 -20
- kagglesdk/kaggle_creds.py +148 -0
- kagglesdk/kaggle_env.py +89 -27
- kagglesdk/kaggle_http_client.py +235 -290
- kagglesdk/kaggle_oauth.py +200 -0
- kagglesdk/kaggle_object.py +298 -250
- kagglesdk/kernels/services/kernels_api_service.py +46 -9
- kagglesdk/kernels/types/kernels_api_service.py +658 -158
- kagglesdk/kernels/types/kernels_enums.py +6 -0
- kagglesdk/kernels/types/search_kernels.py +6 -0
- kagglesdk/licenses/__init__.py +0 -0
- kagglesdk/licenses/types/__init__.py +0 -0
- kagglesdk/licenses/types/licenses_types.py +182 -0
- kagglesdk/models/services/model_api_service.py +46 -21
- kagglesdk/models/types/model_api_service.py +1018 -652
- kagglesdk/models/types/model_enums.py +8 -0
- kagglesdk/models/types/model_service.py +71 -71
- kagglesdk/models/types/model_types.py +1057 -5
- kagglesdk/models/types/search_models.py +8 -0
- kagglesdk/search/__init__.py +0 -0
- kagglesdk/search/services/__init__.py +0 -0
- kagglesdk/search/services/search_api_service.py +19 -0
- kagglesdk/search/types/__init__.py +0 -0
- kagglesdk/search/types/search_api_service.py +2435 -0
- kagglesdk/search/types/search_content_shared.py +50 -0
- kagglesdk/search/types/search_enums.py +45 -0
- kagglesdk/search/types/search_service.py +303 -0
- kagglesdk/security/__init__.py +0 -0
- kagglesdk/security/services/__init__.py +0 -0
- kagglesdk/security/services/iam_service.py +31 -0
- kagglesdk/security/services/oauth_service.py +58 -0
- kagglesdk/security/types/__init__.py +0 -0
- kagglesdk/security/types/authentication.py +171 -0
- kagglesdk/security/types/iam_service.py +496 -0
- kagglesdk/security/types/oauth_service.py +1181 -0
- kagglesdk/security/types/roles.py +8 -0
- kagglesdk/security/types/security_types.py +159 -0
- kagglesdk/test/__init__.py +0 -0
- kagglesdk/test/test_client.py +20 -24
- kagglesdk/users/services/__init__.py +0 -0
- kagglesdk/users/services/account_service.py +31 -0
- kagglesdk/users/services/group_api_service.py +31 -0
- kagglesdk/users/types/account_service.py +345 -0
- kagglesdk/users/types/group_api_service.py +315 -0
- kagglesdk/users/types/group_types.py +165 -0
- kagglesdk/users/types/groups_enum.py +8 -0
- kagglesdk/users/types/progression_service.py +9 -0
- kagglesdk/users/types/search_users.py +23 -0
- kagglesdk/users/types/user_avatar.py +226 -0
- kaggle/configuration.py +0 -206
- kaggle-1.7.4.2.dist-info/RECORD +0 -89
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/WHEEL +0 -0
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/entry_points.txt +0 -0
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/licenses/LICENSE.txt +0 -0
- {kaggle/test → kagglesdk/benchmarks}/__init__.py +0 -0
|
@@ -30,29 +30,40 @@ class ModelNewRequest(object):
|
|
|
30
30
|
attribute_map (dict): The key is attribute name
|
|
31
31
|
and the value is json key in definition.
|
|
32
32
|
"""
|
|
33
|
+
|
|
33
34
|
project_types = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
"owner_slug": "str",
|
|
36
|
+
"slug": "str",
|
|
37
|
+
"title": "str",
|
|
38
|
+
"subtitle": "str",
|
|
39
|
+
"is_private": "bool",
|
|
40
|
+
"description": "str",
|
|
41
|
+
"publish_time": "date",
|
|
42
|
+
"provenance_sources": "str",
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
attribute_map = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
"owner_slug": "ownerSlug",
|
|
47
|
+
"slug": "slug",
|
|
48
|
+
"title": "title",
|
|
49
|
+
"subtitle": "subtitle",
|
|
50
|
+
"is_private": "isPrivate",
|
|
51
|
+
"description": "description",
|
|
52
|
+
"publish_time": "publishTime",
|
|
53
|
+
"provenance_sources": "provenanceSources",
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
def __init__(
|
|
56
|
+
def __init__(
|
|
57
|
+
self,
|
|
58
|
+
owner_slug=None,
|
|
59
|
+
slug=None,
|
|
60
|
+
title=None,
|
|
61
|
+
subtitle=None,
|
|
62
|
+
is_private=True,
|
|
63
|
+
description="",
|
|
64
|
+
publish_time=None,
|
|
65
|
+
provenance_sources="",
|
|
66
|
+
): # noqa: E501
|
|
56
67
|
|
|
57
68
|
self._owner_slug = None
|
|
58
69
|
self._slug = None
|
|
@@ -79,7 +90,7 @@ class ModelNewRequest(object):
|
|
|
79
90
|
|
|
80
91
|
@property
|
|
81
92
|
def owner_slug(self):
|
|
82
|
-
"""Gets the owner_slug of this ModelNewRequest. # noqa: E501
|
|
93
|
+
"""Gets the owner_slug of this ModelNewRequest. # noqa: E501.
|
|
83
94
|
|
|
84
95
|
The owner's slug # noqa: E501
|
|
85
96
|
|
|
@@ -94,7 +105,8 @@ class ModelNewRequest(object):
|
|
|
94
105
|
|
|
95
106
|
The owner's slug # noqa: E501
|
|
96
107
|
|
|
97
|
-
:param owner_slug: The owner_slug of this ModelNewRequest.
|
|
108
|
+
:param owner_slug: The owner_slug of this ModelNewRequest. #
|
|
109
|
+
noqa: E501
|
|
98
110
|
:type: str
|
|
99
111
|
"""
|
|
100
112
|
if owner_slug is None:
|
|
@@ -104,7 +116,7 @@ class ModelNewRequest(object):
|
|
|
104
116
|
|
|
105
117
|
@property
|
|
106
118
|
def slug(self):
|
|
107
|
-
"""Gets the slug of this ModelNewRequest. # noqa: E501
|
|
119
|
+
"""Gets the slug of this ModelNewRequest. # noqa: E501.
|
|
108
120
|
|
|
109
121
|
The slug that the model should be created with # noqa: E501
|
|
110
122
|
|
|
@@ -129,7 +141,7 @@ class ModelNewRequest(object):
|
|
|
129
141
|
|
|
130
142
|
@property
|
|
131
143
|
def title(self):
|
|
132
|
-
"""Gets the title of this ModelNewRequest. # noqa: E501
|
|
144
|
+
"""Gets the title of this ModelNewRequest. # noqa: E501.
|
|
133
145
|
|
|
134
146
|
The title of the new model # noqa: E501
|
|
135
147
|
|
|
@@ -154,7 +166,7 @@ class ModelNewRequest(object):
|
|
|
154
166
|
|
|
155
167
|
@property
|
|
156
168
|
def subtitle(self):
|
|
157
|
-
"""Gets the subtitle of this ModelNewRequest. # noqa: E501
|
|
169
|
+
"""Gets the subtitle of this ModelNewRequest. # noqa: E501.
|
|
158
170
|
|
|
159
171
|
The subtitle of the new model # noqa: E501
|
|
160
172
|
|
|
@@ -169,7 +181,8 @@ class ModelNewRequest(object):
|
|
|
169
181
|
|
|
170
182
|
The subtitle of the new model # noqa: E501
|
|
171
183
|
|
|
172
|
-
:param subtitle: The subtitle of this ModelNewRequest.
|
|
184
|
+
:param subtitle: The subtitle of this ModelNewRequest. # noqa:
|
|
185
|
+
E501
|
|
173
186
|
:type: str
|
|
174
187
|
"""
|
|
175
188
|
|
|
@@ -177,7 +190,7 @@ class ModelNewRequest(object):
|
|
|
177
190
|
|
|
178
191
|
@property
|
|
179
192
|
def is_private(self):
|
|
180
|
-
"""Gets the is_private of this ModelNewRequest. # noqa: E501
|
|
193
|
+
"""Gets the is_private of this ModelNewRequest. # noqa: E501.
|
|
181
194
|
|
|
182
195
|
Whether or not the model should be private # noqa: E501
|
|
183
196
|
|
|
@@ -192,7 +205,8 @@ class ModelNewRequest(object):
|
|
|
192
205
|
|
|
193
206
|
Whether or not the model should be private # noqa: E501
|
|
194
207
|
|
|
195
|
-
:param is_private: The is_private of this ModelNewRequest.
|
|
208
|
+
:param is_private: The is_private of this ModelNewRequest. #
|
|
209
|
+
noqa: E501
|
|
196
210
|
:type: bool
|
|
197
211
|
"""
|
|
198
212
|
if is_private is None:
|
|
@@ -202,7 +216,7 @@ class ModelNewRequest(object):
|
|
|
202
216
|
|
|
203
217
|
@property
|
|
204
218
|
def description(self):
|
|
205
|
-
"""Gets the description of this ModelNewRequest. # noqa: E501
|
|
219
|
+
"""Gets the description of this ModelNewRequest. # noqa: E501.
|
|
206
220
|
|
|
207
221
|
The description to be set on the model # noqa: E501
|
|
208
222
|
|
|
@@ -217,7 +231,8 @@ class ModelNewRequest(object):
|
|
|
217
231
|
|
|
218
232
|
The description to be set on the model # noqa: E501
|
|
219
233
|
|
|
220
|
-
:param description: The description of this ModelNewRequest.
|
|
234
|
+
:param description: The description of this ModelNewRequest. #
|
|
235
|
+
noqa: E501
|
|
221
236
|
:type: str
|
|
222
237
|
"""
|
|
223
238
|
|
|
@@ -225,7 +240,7 @@ class ModelNewRequest(object):
|
|
|
225
240
|
|
|
226
241
|
@property
|
|
227
242
|
def publish_time(self):
|
|
228
|
-
"""Gets the publish_time of this ModelNewRequest. # noqa: E501
|
|
243
|
+
"""Gets the publish_time of this ModelNewRequest. # noqa: E501.
|
|
229
244
|
|
|
230
245
|
When the model was initially published # noqa: E501
|
|
231
246
|
|
|
@@ -240,7 +255,8 @@ class ModelNewRequest(object):
|
|
|
240
255
|
|
|
241
256
|
When the model was initially published # noqa: E501
|
|
242
257
|
|
|
243
|
-
:param publish_time: The publish_time of this ModelNewRequest.
|
|
258
|
+
:param publish_time: The publish_time of this ModelNewRequest. #
|
|
259
|
+
noqa: E501
|
|
244
260
|
:type: date
|
|
245
261
|
"""
|
|
246
262
|
|
|
@@ -248,11 +264,12 @@ class ModelNewRequest(object):
|
|
|
248
264
|
|
|
249
265
|
@property
|
|
250
266
|
def provenance_sources(self):
|
|
251
|
-
"""Gets the provenance_sources of this ModelNewRequest. # noqa: E501
|
|
267
|
+
"""Gets the provenance_sources of this ModelNewRequest. # noqa: E501.
|
|
252
268
|
|
|
253
269
|
The provenance sources to be set on the model # noqa: E501
|
|
254
270
|
|
|
255
|
-
:return: The provenance_sources of this ModelNewRequest.
|
|
271
|
+
:return: The provenance_sources of this ModelNewRequest. #
|
|
272
|
+
noqa: E501
|
|
256
273
|
:rtype: str
|
|
257
274
|
"""
|
|
258
275
|
return self._provenance_sources
|
|
@@ -263,38 +280,37 @@ class ModelNewRequest(object):
|
|
|
263
280
|
|
|
264
281
|
The provenance sources to be set on the model # noqa: E501
|
|
265
282
|
|
|
266
|
-
:param provenance_sources: The provenance_sources of this
|
|
283
|
+
:param provenance_sources: The provenance_sources of this
|
|
284
|
+
ModelNewRequest. # noqa: E501
|
|
267
285
|
:type: str
|
|
268
286
|
"""
|
|
269
287
|
|
|
270
288
|
self._provenance_sources = provenance_sources
|
|
271
289
|
|
|
272
290
|
def to_dict(self):
|
|
273
|
-
"""Returns the model properties as a dict"""
|
|
291
|
+
"""Returns the model properties as a dict."""
|
|
274
292
|
result = {}
|
|
275
293
|
|
|
276
294
|
for attr, _ in six.iteritems(self.project_types):
|
|
277
295
|
value = getattr(self, attr)
|
|
278
296
|
if isinstance(value, list):
|
|
279
|
-
result[attr] = list(map(
|
|
280
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
281
|
-
value
|
|
282
|
-
))
|
|
297
|
+
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
283
298
|
elif hasattr(value, "to_dict"):
|
|
284
299
|
result[attr] = value.to_dict()
|
|
285
300
|
elif isinstance(value, dict):
|
|
286
|
-
result[attr] = dict(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
301
|
+
result[attr] = dict(
|
|
302
|
+
map(
|
|
303
|
+
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
|
|
304
|
+
value.items(),
|
|
305
|
+
)
|
|
306
|
+
)
|
|
291
307
|
else:
|
|
292
308
|
result[attr] = value
|
|
293
309
|
|
|
294
310
|
return result
|
|
295
311
|
|
|
296
312
|
def to_str(self):
|
|
297
|
-
"""Returns the string representation of the model"""
|
|
313
|
+
"""Returns the string representation of the model."""
|
|
298
314
|
return pprint.pformat(self.to_dict())
|
|
299
315
|
|
|
300
316
|
def __repr__(self):
|
|
@@ -302,13 +318,12 @@ class ModelNewRequest(object):
|
|
|
302
318
|
return self.to_str()
|
|
303
319
|
|
|
304
320
|
def __eq__(self, other):
|
|
305
|
-
"""Returns true if both objects are equal"""
|
|
321
|
+
"""Returns true if both objects are equal."""
|
|
306
322
|
if not isinstance(other, ModelNewRequest):
|
|
307
323
|
return False
|
|
308
324
|
|
|
309
325
|
return self.__dict__ == other.__dict__
|
|
310
326
|
|
|
311
327
|
def __ne__(self, other):
|
|
312
|
-
"""Returns true if both objects are not equal"""
|
|
328
|
+
"""Returns true if both objects are not equal."""
|
|
313
329
|
return not self == other
|
|
314
|
-
|
|
@@ -30,27 +30,37 @@ class ModelUpdateRequest(object):
|
|
|
30
30
|
attribute_map (dict): The key is attribute name
|
|
31
31
|
and the value is json key in definition.
|
|
32
32
|
"""
|
|
33
|
+
|
|
33
34
|
project_types = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
"title": "str",
|
|
36
|
+
"subtitle": "str",
|
|
37
|
+
"is_private": "bool",
|
|
38
|
+
"description": "str",
|
|
39
|
+
"publish_time": "date",
|
|
40
|
+
"provenance_sources": "str",
|
|
41
|
+
"update_mask": "str",
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
attribute_map = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
"title": "title",
|
|
46
|
+
"subtitle": "subtitle",
|
|
47
|
+
"is_private": "isPrivate",
|
|
48
|
+
"description": "description",
|
|
49
|
+
"publish_time": "publishTime",
|
|
50
|
+
"provenance_sources": "provenanceSources",
|
|
51
|
+
"update_mask": "updateMask",
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
def __init__(
|
|
54
|
+
def __init__(
|
|
55
|
+
self,
|
|
56
|
+
title=None,
|
|
57
|
+
subtitle=None,
|
|
58
|
+
is_private=True,
|
|
59
|
+
description="",
|
|
60
|
+
publish_time=None,
|
|
61
|
+
provenance_sources="",
|
|
62
|
+
update_mask=None,
|
|
63
|
+
): # noqa: E501
|
|
54
64
|
|
|
55
65
|
self._title = None
|
|
56
66
|
self._subtitle = None
|
|
@@ -78,7 +88,7 @@ class ModelUpdateRequest(object):
|
|
|
78
88
|
|
|
79
89
|
@property
|
|
80
90
|
def title(self):
|
|
81
|
-
"""Gets the title of this ModelUpdateRequest. # noqa: E501
|
|
91
|
+
"""Gets the title of this ModelUpdateRequest. # noqa: E501.
|
|
82
92
|
|
|
83
93
|
The title of the new model # noqa: E501
|
|
84
94
|
|
|
@@ -93,7 +103,7 @@ class ModelUpdateRequest(object):
|
|
|
93
103
|
|
|
94
104
|
The title of the new model # noqa: E501
|
|
95
105
|
|
|
96
|
-
:param title: The title of this ModelUpdateRequest.
|
|
106
|
+
:param title: The title of this ModelUpdateRequest. # noqa: E501
|
|
97
107
|
:type: str
|
|
98
108
|
"""
|
|
99
109
|
|
|
@@ -101,7 +111,7 @@ class ModelUpdateRequest(object):
|
|
|
101
111
|
|
|
102
112
|
@property
|
|
103
113
|
def subtitle(self):
|
|
104
|
-
"""Gets the subtitle of this ModelUpdateRequest. # noqa: E501
|
|
114
|
+
"""Gets the subtitle of this ModelUpdateRequest. # noqa: E501.
|
|
105
115
|
|
|
106
116
|
The subtitle of the new model # noqa: E501
|
|
107
117
|
|
|
@@ -116,7 +126,8 @@ class ModelUpdateRequest(object):
|
|
|
116
126
|
|
|
117
127
|
The subtitle of the new model # noqa: E501
|
|
118
128
|
|
|
119
|
-
:param subtitle: The subtitle of this ModelUpdateRequest.
|
|
129
|
+
:param subtitle: The subtitle of this ModelUpdateRequest. #
|
|
130
|
+
noqa: E501
|
|
120
131
|
:type: str
|
|
121
132
|
"""
|
|
122
133
|
|
|
@@ -124,11 +135,11 @@ class ModelUpdateRequest(object):
|
|
|
124
135
|
|
|
125
136
|
@property
|
|
126
137
|
def is_private(self):
|
|
127
|
-
"""Gets the is_private of this ModelUpdateRequest. # noqa: E501
|
|
138
|
+
"""Gets the is_private of this ModelUpdateRequest. # noqa: E501.
|
|
128
139
|
|
|
129
140
|
Whether or not the model should be private # noqa: E501
|
|
130
141
|
|
|
131
|
-
:return: The is_private of this ModelUpdateRequest.
|
|
142
|
+
:return: The is_private of this ModelUpdateRequest. # noqa: E501
|
|
132
143
|
:rtype: bool
|
|
133
144
|
"""
|
|
134
145
|
return self._is_private
|
|
@@ -139,7 +150,8 @@ class ModelUpdateRequest(object):
|
|
|
139
150
|
|
|
140
151
|
Whether or not the model should be private # noqa: E501
|
|
141
152
|
|
|
142
|
-
:param is_private: The is_private of this ModelUpdateRequest.
|
|
153
|
+
:param is_private: The is_private of this ModelUpdateRequest. #
|
|
154
|
+
noqa: E501
|
|
143
155
|
:type: bool
|
|
144
156
|
"""
|
|
145
157
|
|
|
@@ -147,11 +159,12 @@ class ModelUpdateRequest(object):
|
|
|
147
159
|
|
|
148
160
|
@property
|
|
149
161
|
def description(self):
|
|
150
|
-
"""Gets the description of this ModelUpdateRequest. # noqa: E501
|
|
162
|
+
"""Gets the description of this ModelUpdateRequest. # noqa: E501.
|
|
151
163
|
|
|
152
164
|
The description to be set on the model # noqa: E501
|
|
153
165
|
|
|
154
|
-
:return: The description of this ModelUpdateRequest.
|
|
166
|
+
:return: The description of this ModelUpdateRequest. # noqa:
|
|
167
|
+
E501
|
|
155
168
|
:rtype: str
|
|
156
169
|
"""
|
|
157
170
|
return self._description
|
|
@@ -162,7 +175,8 @@ class ModelUpdateRequest(object):
|
|
|
162
175
|
|
|
163
176
|
The description to be set on the model # noqa: E501
|
|
164
177
|
|
|
165
|
-
:param description: The description of this ModelUpdateRequest.
|
|
178
|
+
:param description: The description of this ModelUpdateRequest.
|
|
179
|
+
# noqa: E501
|
|
166
180
|
:type: str
|
|
167
181
|
"""
|
|
168
182
|
|
|
@@ -170,11 +184,12 @@ class ModelUpdateRequest(object):
|
|
|
170
184
|
|
|
171
185
|
@property
|
|
172
186
|
def publish_time(self):
|
|
173
|
-
"""Gets the publish_time of this ModelUpdateRequest. # noqa: E501
|
|
187
|
+
"""Gets the publish_time of this ModelUpdateRequest. # noqa: E501.
|
|
174
188
|
|
|
175
189
|
When the model was initially published # noqa: E501
|
|
176
190
|
|
|
177
|
-
:return: The publish_time of this ModelUpdateRequest.
|
|
191
|
+
:return: The publish_time of this ModelUpdateRequest. # noqa:
|
|
192
|
+
E501
|
|
178
193
|
:rtype: date
|
|
179
194
|
"""
|
|
180
195
|
return self._publish_time
|
|
@@ -185,7 +200,8 @@ class ModelUpdateRequest(object):
|
|
|
185
200
|
|
|
186
201
|
When the model was initially published # noqa: E501
|
|
187
202
|
|
|
188
|
-
:param publish_time: The publish_time of this
|
|
203
|
+
:param publish_time: The publish_time of this
|
|
204
|
+
ModelUpdateRequest. # noqa: E501
|
|
189
205
|
:type: date
|
|
190
206
|
"""
|
|
191
207
|
|
|
@@ -193,11 +209,13 @@ class ModelUpdateRequest(object):
|
|
|
193
209
|
|
|
194
210
|
@property
|
|
195
211
|
def provenance_sources(self):
|
|
196
|
-
"""Gets the provenance_sources of this ModelUpdateRequest. # noqa:
|
|
212
|
+
"""Gets the provenance_sources of this ModelUpdateRequest. # noqa:
|
|
213
|
+
E501.
|
|
197
214
|
|
|
198
215
|
The provenance sources to be set on the model # noqa: E501
|
|
199
216
|
|
|
200
|
-
:return: The provenance_sources of this ModelUpdateRequest.
|
|
217
|
+
:return: The provenance_sources of this ModelUpdateRequest. #
|
|
218
|
+
noqa: E501
|
|
201
219
|
:rtype: str
|
|
202
220
|
"""
|
|
203
221
|
return self._provenance_sources
|
|
@@ -208,7 +226,8 @@ class ModelUpdateRequest(object):
|
|
|
208
226
|
|
|
209
227
|
The provenance sources to be set on the model # noqa: E501
|
|
210
228
|
|
|
211
|
-
:param provenance_sources: The provenance_sources of this
|
|
229
|
+
:param provenance_sources: The provenance_sources of this
|
|
230
|
+
ModelUpdateRequest. # noqa: E501
|
|
212
231
|
:type: str
|
|
213
232
|
"""
|
|
214
233
|
|
|
@@ -216,11 +235,12 @@ class ModelUpdateRequest(object):
|
|
|
216
235
|
|
|
217
236
|
@property
|
|
218
237
|
def update_mask(self):
|
|
219
|
-
"""Gets the update_mask of this ModelUpdateRequest. # noqa: E501
|
|
238
|
+
"""Gets the update_mask of this ModelUpdateRequest. # noqa: E501.
|
|
220
239
|
|
|
221
240
|
Describes which fields to update # noqa: E501
|
|
222
241
|
|
|
223
|
-
:return: The update_mask of this ModelUpdateRequest.
|
|
242
|
+
:return: The update_mask of this ModelUpdateRequest. # noqa:
|
|
243
|
+
E501
|
|
224
244
|
:rtype: str
|
|
225
245
|
"""
|
|
226
246
|
return self._update_mask
|
|
@@ -231,38 +251,37 @@ class ModelUpdateRequest(object):
|
|
|
231
251
|
|
|
232
252
|
Describes which fields to update # noqa: E501
|
|
233
253
|
|
|
234
|
-
:param update_mask: The update_mask of this ModelUpdateRequest.
|
|
254
|
+
:param update_mask: The update_mask of this ModelUpdateRequest.
|
|
255
|
+
# noqa: E501
|
|
235
256
|
:type: str
|
|
236
257
|
"""
|
|
237
258
|
|
|
238
259
|
self._update_mask = update_mask
|
|
239
260
|
|
|
240
261
|
def to_dict(self):
|
|
241
|
-
"""Returns the model properties as a dict"""
|
|
262
|
+
"""Returns the model properties as a dict."""
|
|
242
263
|
result = {}
|
|
243
264
|
|
|
244
265
|
for attr, _ in six.iteritems(self.project_types):
|
|
245
266
|
value = getattr(self, attr)
|
|
246
267
|
if isinstance(value, list):
|
|
247
|
-
result[attr] = list(map(
|
|
248
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
249
|
-
value
|
|
250
|
-
))
|
|
268
|
+
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
251
269
|
elif hasattr(value, "to_dict"):
|
|
252
270
|
result[attr] = value.to_dict()
|
|
253
271
|
elif isinstance(value, dict):
|
|
254
|
-
result[attr] = dict(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
272
|
+
result[attr] = dict(
|
|
273
|
+
map(
|
|
274
|
+
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
|
|
275
|
+
value.items(),
|
|
276
|
+
)
|
|
277
|
+
)
|
|
259
278
|
else:
|
|
260
279
|
result[attr] = value
|
|
261
280
|
|
|
262
281
|
return result
|
|
263
282
|
|
|
264
283
|
def to_str(self):
|
|
265
|
-
"""Returns the string representation of the model"""
|
|
284
|
+
"""Returns the string representation of the model."""
|
|
266
285
|
return pprint.pformat(self.to_dict())
|
|
267
286
|
|
|
268
287
|
def __repr__(self):
|
|
@@ -270,13 +289,12 @@ class ModelUpdateRequest(object):
|
|
|
270
289
|
return self.to_str()
|
|
271
290
|
|
|
272
291
|
def __eq__(self, other):
|
|
273
|
-
"""Returns true if both objects are equal"""
|
|
292
|
+
"""Returns true if both objects are equal."""
|
|
274
293
|
if not isinstance(other, ModelUpdateRequest):
|
|
275
294
|
return False
|
|
276
295
|
|
|
277
296
|
return self.__dict__ == other.__dict__
|
|
278
297
|
|
|
279
298
|
def __ne__(self, other):
|
|
280
|
-
"""Returns true if both objects are not equal"""
|
|
299
|
+
"""Returns true if both objects are not equal."""
|
|
281
300
|
return not self == other
|
|
282
|
-
|