kaggle 1.8.2__py3-none-any.whl → 1.8.4__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 +206 -75
- kaggle/cli.py +36 -28
- kaggle/models/upload_file.py +4 -4
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/METADATA +66 -75
- kaggle-1.8.4.dist-info/RECORD +15 -0
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/WHEEL +1 -1
- kaggle/models/api_blob_type.py +0 -4
- kaggle/models/dataset_column.py +0 -228
- kaggle/models/dataset_new_request.py +0 -443
- kaggle/models/dataset_new_version_request.py +0 -319
- kaggle/models/dataset_update_settings_request.py +0 -344
- kaggle/models/kernel_push_request.py +0 -608
- kaggle/models/model_instance_new_version_request.py +0 -145
- kaggle/models/model_instance_update_request.py +0 -451
- kaggle/models/model_new_instance_request.py +0 -552
- kaggle/models/model_new_request.py +0 -329
- kaggle/models/model_update_request.py +0 -300
- kaggle/models/start_blob_upload_request.py +0 -240
- kaggle/models/start_blob_upload_response.py +0 -142
- kaggle-1.8.2.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 -269
- 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.2.dist-info → kaggle-1.8.4.dist-info}/entry_points.txt +0 -0
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2024 Kaggle Inc
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
# coding: utf-8
|
|
18
|
-
|
|
19
|
-
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
import six
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class ModelNewRequest(object):
|
|
26
|
-
"""
|
|
27
|
-
Attributes:
|
|
28
|
-
project_types (dict): The key is attribute name
|
|
29
|
-
and the value is attribute type.
|
|
30
|
-
attribute_map (dict): The key is attribute name
|
|
31
|
-
and the value is json key in definition.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
project_types = {
|
|
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",
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
attribute_map = {
|
|
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",
|
|
54
|
-
}
|
|
55
|
-
|
|
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
|
|
67
|
-
|
|
68
|
-
self._owner_slug = None
|
|
69
|
-
self._slug = None
|
|
70
|
-
self._title = None
|
|
71
|
-
self._subtitle = None
|
|
72
|
-
self._is_private = None
|
|
73
|
-
self._description = None
|
|
74
|
-
self._publish_time = None
|
|
75
|
-
self._provenance_sources = None
|
|
76
|
-
self.discriminator = None
|
|
77
|
-
|
|
78
|
-
self.owner_slug = owner_slug
|
|
79
|
-
self.slug = slug
|
|
80
|
-
self.title = title
|
|
81
|
-
if subtitle is not None:
|
|
82
|
-
self.subtitle = subtitle
|
|
83
|
-
self.is_private = is_private
|
|
84
|
-
if description is not None:
|
|
85
|
-
self.description = description
|
|
86
|
-
if publish_time is not None:
|
|
87
|
-
self.publish_time = publish_time
|
|
88
|
-
if provenance_sources is not None:
|
|
89
|
-
self.provenance_sources = provenance_sources
|
|
90
|
-
|
|
91
|
-
@property
|
|
92
|
-
def owner_slug(self):
|
|
93
|
-
"""Gets the owner_slug of this ModelNewRequest. # noqa: E501.
|
|
94
|
-
|
|
95
|
-
The owner's slug # noqa: E501
|
|
96
|
-
|
|
97
|
-
:return: The owner_slug of this ModelNewRequest. # noqa: E501
|
|
98
|
-
:rtype: str
|
|
99
|
-
"""
|
|
100
|
-
return self._owner_slug
|
|
101
|
-
|
|
102
|
-
@owner_slug.setter
|
|
103
|
-
def owner_slug(self, owner_slug):
|
|
104
|
-
"""Sets the owner_slug of this ModelNewRequest.
|
|
105
|
-
|
|
106
|
-
The owner's slug # noqa: E501
|
|
107
|
-
|
|
108
|
-
:param owner_slug: The owner_slug of this ModelNewRequest. #
|
|
109
|
-
noqa: E501
|
|
110
|
-
:type: str
|
|
111
|
-
"""
|
|
112
|
-
if owner_slug is None:
|
|
113
|
-
raise ValueError("Invalid value for `owner_slug`, must not be `None`") # noqa: E501
|
|
114
|
-
|
|
115
|
-
self._owner_slug = owner_slug
|
|
116
|
-
|
|
117
|
-
@property
|
|
118
|
-
def slug(self):
|
|
119
|
-
"""Gets the slug of this ModelNewRequest. # noqa: E501.
|
|
120
|
-
|
|
121
|
-
The slug that the model should be created with # noqa: E501
|
|
122
|
-
|
|
123
|
-
:return: The slug of this ModelNewRequest. # noqa: E501
|
|
124
|
-
:rtype: str
|
|
125
|
-
"""
|
|
126
|
-
return self._slug
|
|
127
|
-
|
|
128
|
-
@slug.setter
|
|
129
|
-
def slug(self, slug):
|
|
130
|
-
"""Sets the slug of this ModelNewRequest.
|
|
131
|
-
|
|
132
|
-
The slug that the model should be created with # noqa: E501
|
|
133
|
-
|
|
134
|
-
:param slug: The slug of this ModelNewRequest. # noqa: E501
|
|
135
|
-
:type: str
|
|
136
|
-
"""
|
|
137
|
-
if slug is None:
|
|
138
|
-
raise ValueError("Invalid value for `slug`, must not be `None`") # noqa: E501
|
|
139
|
-
|
|
140
|
-
self._slug = slug
|
|
141
|
-
|
|
142
|
-
@property
|
|
143
|
-
def title(self):
|
|
144
|
-
"""Gets the title of this ModelNewRequest. # noqa: E501.
|
|
145
|
-
|
|
146
|
-
The title of the new model # noqa: E501
|
|
147
|
-
|
|
148
|
-
:return: The title of this ModelNewRequest. # noqa: E501
|
|
149
|
-
:rtype: str
|
|
150
|
-
"""
|
|
151
|
-
return self._title
|
|
152
|
-
|
|
153
|
-
@title.setter
|
|
154
|
-
def title(self, title):
|
|
155
|
-
"""Sets the title of this ModelNewRequest.
|
|
156
|
-
|
|
157
|
-
The title of the new model # noqa: E501
|
|
158
|
-
|
|
159
|
-
:param title: The title of this ModelNewRequest. # noqa: E501
|
|
160
|
-
:type: str
|
|
161
|
-
"""
|
|
162
|
-
if title is None:
|
|
163
|
-
raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501
|
|
164
|
-
|
|
165
|
-
self._title = title
|
|
166
|
-
|
|
167
|
-
@property
|
|
168
|
-
def subtitle(self):
|
|
169
|
-
"""Gets the subtitle of this ModelNewRequest. # noqa: E501.
|
|
170
|
-
|
|
171
|
-
The subtitle of the new model # noqa: E501
|
|
172
|
-
|
|
173
|
-
:return: The subtitle of this ModelNewRequest. # noqa: E501
|
|
174
|
-
:rtype: str
|
|
175
|
-
"""
|
|
176
|
-
return self._subtitle
|
|
177
|
-
|
|
178
|
-
@subtitle.setter
|
|
179
|
-
def subtitle(self, subtitle):
|
|
180
|
-
"""Sets the subtitle of this ModelNewRequest.
|
|
181
|
-
|
|
182
|
-
The subtitle of the new model # noqa: E501
|
|
183
|
-
|
|
184
|
-
:param subtitle: The subtitle of this ModelNewRequest. # noqa:
|
|
185
|
-
E501
|
|
186
|
-
:type: str
|
|
187
|
-
"""
|
|
188
|
-
|
|
189
|
-
self._subtitle = subtitle
|
|
190
|
-
|
|
191
|
-
@property
|
|
192
|
-
def is_private(self):
|
|
193
|
-
"""Gets the is_private of this ModelNewRequest. # noqa: E501.
|
|
194
|
-
|
|
195
|
-
Whether or not the model should be private # noqa: E501
|
|
196
|
-
|
|
197
|
-
:return: The is_private of this ModelNewRequest. # noqa: E501
|
|
198
|
-
:rtype: bool
|
|
199
|
-
"""
|
|
200
|
-
return self._is_private
|
|
201
|
-
|
|
202
|
-
@is_private.setter
|
|
203
|
-
def is_private(self, is_private):
|
|
204
|
-
"""Sets the is_private of this ModelNewRequest.
|
|
205
|
-
|
|
206
|
-
Whether or not the model should be private # noqa: E501
|
|
207
|
-
|
|
208
|
-
:param is_private: The is_private of this ModelNewRequest. #
|
|
209
|
-
noqa: E501
|
|
210
|
-
:type: bool
|
|
211
|
-
"""
|
|
212
|
-
if is_private is None:
|
|
213
|
-
raise ValueError("Invalid value for `is_private`, must not be `None`") # noqa: E501
|
|
214
|
-
|
|
215
|
-
self._is_private = is_private
|
|
216
|
-
|
|
217
|
-
@property
|
|
218
|
-
def description(self):
|
|
219
|
-
"""Gets the description of this ModelNewRequest. # noqa: E501.
|
|
220
|
-
|
|
221
|
-
The description to be set on the model # noqa: E501
|
|
222
|
-
|
|
223
|
-
:return: The description of this ModelNewRequest. # noqa: E501
|
|
224
|
-
:rtype: str
|
|
225
|
-
"""
|
|
226
|
-
return self._description
|
|
227
|
-
|
|
228
|
-
@description.setter
|
|
229
|
-
def description(self, description):
|
|
230
|
-
"""Sets the description of this ModelNewRequest.
|
|
231
|
-
|
|
232
|
-
The description to be set on the model # noqa: E501
|
|
233
|
-
|
|
234
|
-
:param description: The description of this ModelNewRequest. #
|
|
235
|
-
noqa: E501
|
|
236
|
-
:type: str
|
|
237
|
-
"""
|
|
238
|
-
|
|
239
|
-
self._description = description
|
|
240
|
-
|
|
241
|
-
@property
|
|
242
|
-
def publish_time(self):
|
|
243
|
-
"""Gets the publish_time of this ModelNewRequest. # noqa: E501.
|
|
244
|
-
|
|
245
|
-
When the model was initially published # noqa: E501
|
|
246
|
-
|
|
247
|
-
:return: The publish_time of this ModelNewRequest. # noqa: E501
|
|
248
|
-
:rtype: date
|
|
249
|
-
"""
|
|
250
|
-
return self._publish_time
|
|
251
|
-
|
|
252
|
-
@publish_time.setter
|
|
253
|
-
def publish_time(self, publish_time):
|
|
254
|
-
"""Sets the publish_time of this ModelNewRequest.
|
|
255
|
-
|
|
256
|
-
When the model was initially published # noqa: E501
|
|
257
|
-
|
|
258
|
-
:param publish_time: The publish_time of this ModelNewRequest. #
|
|
259
|
-
noqa: E501
|
|
260
|
-
:type: date
|
|
261
|
-
"""
|
|
262
|
-
|
|
263
|
-
self._publish_time = publish_time
|
|
264
|
-
|
|
265
|
-
@property
|
|
266
|
-
def provenance_sources(self):
|
|
267
|
-
"""Gets the provenance_sources of this ModelNewRequest. # noqa: E501.
|
|
268
|
-
|
|
269
|
-
The provenance sources to be set on the model # noqa: E501
|
|
270
|
-
|
|
271
|
-
:return: The provenance_sources of this ModelNewRequest. #
|
|
272
|
-
noqa: E501
|
|
273
|
-
:rtype: str
|
|
274
|
-
"""
|
|
275
|
-
return self._provenance_sources
|
|
276
|
-
|
|
277
|
-
@provenance_sources.setter
|
|
278
|
-
def provenance_sources(self, provenance_sources):
|
|
279
|
-
"""Sets the provenance_sources of this ModelNewRequest.
|
|
280
|
-
|
|
281
|
-
The provenance sources to be set on the model # noqa: E501
|
|
282
|
-
|
|
283
|
-
:param provenance_sources: The provenance_sources of this
|
|
284
|
-
ModelNewRequest. # noqa: E501
|
|
285
|
-
:type: str
|
|
286
|
-
"""
|
|
287
|
-
|
|
288
|
-
self._provenance_sources = provenance_sources
|
|
289
|
-
|
|
290
|
-
def to_dict(self):
|
|
291
|
-
"""Returns the model properties as a dict."""
|
|
292
|
-
result = {}
|
|
293
|
-
|
|
294
|
-
for attr, _ in six.iteritems(self.project_types):
|
|
295
|
-
value = getattr(self, attr)
|
|
296
|
-
if isinstance(value, list):
|
|
297
|
-
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
298
|
-
elif hasattr(value, "to_dict"):
|
|
299
|
-
result[attr] = value.to_dict()
|
|
300
|
-
elif isinstance(value, dict):
|
|
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
|
-
)
|
|
307
|
-
else:
|
|
308
|
-
result[attr] = value
|
|
309
|
-
|
|
310
|
-
return result
|
|
311
|
-
|
|
312
|
-
def to_str(self):
|
|
313
|
-
"""Returns the string representation of the model."""
|
|
314
|
-
return pprint.pformat(self.to_dict())
|
|
315
|
-
|
|
316
|
-
def __repr__(self):
|
|
317
|
-
"""For `print` and `pprint`"""
|
|
318
|
-
return self.to_str()
|
|
319
|
-
|
|
320
|
-
def __eq__(self, other):
|
|
321
|
-
"""Returns true if both objects are equal."""
|
|
322
|
-
if not isinstance(other, ModelNewRequest):
|
|
323
|
-
return False
|
|
324
|
-
|
|
325
|
-
return self.__dict__ == other.__dict__
|
|
326
|
-
|
|
327
|
-
def __ne__(self, other):
|
|
328
|
-
"""Returns true if both objects are not equal."""
|
|
329
|
-
return not self == other
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2024 Kaggle Inc
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
# coding: utf-8
|
|
18
|
-
|
|
19
|
-
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
import six
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class ModelUpdateRequest(object):
|
|
26
|
-
"""
|
|
27
|
-
Attributes:
|
|
28
|
-
project_types (dict): The key is attribute name
|
|
29
|
-
and the value is attribute type.
|
|
30
|
-
attribute_map (dict): The key is attribute name
|
|
31
|
-
and the value is json key in definition.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
project_types = {
|
|
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",
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
attribute_map = {
|
|
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",
|
|
52
|
-
}
|
|
53
|
-
|
|
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
|
|
64
|
-
|
|
65
|
-
self._title = None
|
|
66
|
-
self._subtitle = None
|
|
67
|
-
self._is_private = None
|
|
68
|
-
self._description = None
|
|
69
|
-
self._publish_time = None
|
|
70
|
-
self._provenance_sources = None
|
|
71
|
-
self._update_mask = None
|
|
72
|
-
self.discriminator = None
|
|
73
|
-
|
|
74
|
-
if title is not None:
|
|
75
|
-
self.title = title
|
|
76
|
-
if subtitle is not None:
|
|
77
|
-
self.subtitle = subtitle
|
|
78
|
-
if is_private is not None:
|
|
79
|
-
self.is_private = is_private
|
|
80
|
-
if description is not None:
|
|
81
|
-
self.description = description
|
|
82
|
-
if publish_time is not None:
|
|
83
|
-
self.publish_time = publish_time
|
|
84
|
-
if provenance_sources is not None:
|
|
85
|
-
self.provenance_sources = provenance_sources
|
|
86
|
-
if update_mask is not None:
|
|
87
|
-
self.update_mask = update_mask
|
|
88
|
-
|
|
89
|
-
@property
|
|
90
|
-
def title(self):
|
|
91
|
-
"""Gets the title of this ModelUpdateRequest. # noqa: E501.
|
|
92
|
-
|
|
93
|
-
The title of the new model # noqa: E501
|
|
94
|
-
|
|
95
|
-
:return: The title of this ModelUpdateRequest. # noqa: E501
|
|
96
|
-
:rtype: str
|
|
97
|
-
"""
|
|
98
|
-
return self._title
|
|
99
|
-
|
|
100
|
-
@title.setter
|
|
101
|
-
def title(self, title):
|
|
102
|
-
"""Sets the title of this ModelUpdateRequest.
|
|
103
|
-
|
|
104
|
-
The title of the new model # noqa: E501
|
|
105
|
-
|
|
106
|
-
:param title: The title of this ModelUpdateRequest. # noqa: E501
|
|
107
|
-
:type: str
|
|
108
|
-
"""
|
|
109
|
-
|
|
110
|
-
self._title = title
|
|
111
|
-
|
|
112
|
-
@property
|
|
113
|
-
def subtitle(self):
|
|
114
|
-
"""Gets the subtitle of this ModelUpdateRequest. # noqa: E501.
|
|
115
|
-
|
|
116
|
-
The subtitle of the new model # noqa: E501
|
|
117
|
-
|
|
118
|
-
:return: The subtitle of this ModelUpdateRequest. # noqa: E501
|
|
119
|
-
:rtype: str
|
|
120
|
-
"""
|
|
121
|
-
return self._subtitle
|
|
122
|
-
|
|
123
|
-
@subtitle.setter
|
|
124
|
-
def subtitle(self, subtitle):
|
|
125
|
-
"""Sets the subtitle of this ModelUpdateRequest.
|
|
126
|
-
|
|
127
|
-
The subtitle of the new model # noqa: E501
|
|
128
|
-
|
|
129
|
-
:param subtitle: The subtitle of this ModelUpdateRequest. #
|
|
130
|
-
noqa: E501
|
|
131
|
-
:type: str
|
|
132
|
-
"""
|
|
133
|
-
|
|
134
|
-
self._subtitle = subtitle
|
|
135
|
-
|
|
136
|
-
@property
|
|
137
|
-
def is_private(self):
|
|
138
|
-
"""Gets the is_private of this ModelUpdateRequest. # noqa: E501.
|
|
139
|
-
|
|
140
|
-
Whether or not the model should be private # noqa: E501
|
|
141
|
-
|
|
142
|
-
:return: The is_private of this ModelUpdateRequest. # noqa: E501
|
|
143
|
-
:rtype: bool
|
|
144
|
-
"""
|
|
145
|
-
return self._is_private
|
|
146
|
-
|
|
147
|
-
@is_private.setter
|
|
148
|
-
def is_private(self, is_private):
|
|
149
|
-
"""Sets the is_private of this ModelUpdateRequest.
|
|
150
|
-
|
|
151
|
-
Whether or not the model should be private # noqa: E501
|
|
152
|
-
|
|
153
|
-
:param is_private: The is_private of this ModelUpdateRequest. #
|
|
154
|
-
noqa: E501
|
|
155
|
-
:type: bool
|
|
156
|
-
"""
|
|
157
|
-
|
|
158
|
-
self._is_private = is_private
|
|
159
|
-
|
|
160
|
-
@property
|
|
161
|
-
def description(self):
|
|
162
|
-
"""Gets the description of this ModelUpdateRequest. # noqa: E501.
|
|
163
|
-
|
|
164
|
-
The description to be set on the model # noqa: E501
|
|
165
|
-
|
|
166
|
-
:return: The description of this ModelUpdateRequest. # noqa:
|
|
167
|
-
E501
|
|
168
|
-
:rtype: str
|
|
169
|
-
"""
|
|
170
|
-
return self._description
|
|
171
|
-
|
|
172
|
-
@description.setter
|
|
173
|
-
def description(self, description):
|
|
174
|
-
"""Sets the description of this ModelUpdateRequest.
|
|
175
|
-
|
|
176
|
-
The description to be set on the model # noqa: E501
|
|
177
|
-
|
|
178
|
-
:param description: The description of this ModelUpdateRequest.
|
|
179
|
-
# noqa: E501
|
|
180
|
-
:type: str
|
|
181
|
-
"""
|
|
182
|
-
|
|
183
|
-
self._description = description
|
|
184
|
-
|
|
185
|
-
@property
|
|
186
|
-
def publish_time(self):
|
|
187
|
-
"""Gets the publish_time of this ModelUpdateRequest. # noqa: E501.
|
|
188
|
-
|
|
189
|
-
When the model was initially published # noqa: E501
|
|
190
|
-
|
|
191
|
-
:return: The publish_time of this ModelUpdateRequest. # noqa:
|
|
192
|
-
E501
|
|
193
|
-
:rtype: date
|
|
194
|
-
"""
|
|
195
|
-
return self._publish_time
|
|
196
|
-
|
|
197
|
-
@publish_time.setter
|
|
198
|
-
def publish_time(self, publish_time):
|
|
199
|
-
"""Sets the publish_time of this ModelUpdateRequest.
|
|
200
|
-
|
|
201
|
-
When the model was initially published # noqa: E501
|
|
202
|
-
|
|
203
|
-
:param publish_time: The publish_time of this
|
|
204
|
-
ModelUpdateRequest. # noqa: E501
|
|
205
|
-
:type: date
|
|
206
|
-
"""
|
|
207
|
-
|
|
208
|
-
self._publish_time = publish_time
|
|
209
|
-
|
|
210
|
-
@property
|
|
211
|
-
def provenance_sources(self):
|
|
212
|
-
"""Gets the provenance_sources of this ModelUpdateRequest. # noqa:
|
|
213
|
-
E501.
|
|
214
|
-
|
|
215
|
-
The provenance sources to be set on the model # noqa: E501
|
|
216
|
-
|
|
217
|
-
:return: The provenance_sources of this ModelUpdateRequest. #
|
|
218
|
-
noqa: E501
|
|
219
|
-
:rtype: str
|
|
220
|
-
"""
|
|
221
|
-
return self._provenance_sources
|
|
222
|
-
|
|
223
|
-
@provenance_sources.setter
|
|
224
|
-
def provenance_sources(self, provenance_sources):
|
|
225
|
-
"""Sets the provenance_sources of this ModelUpdateRequest.
|
|
226
|
-
|
|
227
|
-
The provenance sources to be set on the model # noqa: E501
|
|
228
|
-
|
|
229
|
-
:param provenance_sources: The provenance_sources of this
|
|
230
|
-
ModelUpdateRequest. # noqa: E501
|
|
231
|
-
:type: str
|
|
232
|
-
"""
|
|
233
|
-
|
|
234
|
-
self._provenance_sources = provenance_sources
|
|
235
|
-
|
|
236
|
-
@property
|
|
237
|
-
def update_mask(self):
|
|
238
|
-
"""Gets the update_mask of this ModelUpdateRequest. # noqa: E501.
|
|
239
|
-
|
|
240
|
-
Describes which fields to update # noqa: E501
|
|
241
|
-
|
|
242
|
-
:return: The update_mask of this ModelUpdateRequest. # noqa:
|
|
243
|
-
E501
|
|
244
|
-
:rtype: str
|
|
245
|
-
"""
|
|
246
|
-
return self._update_mask
|
|
247
|
-
|
|
248
|
-
@update_mask.setter
|
|
249
|
-
def update_mask(self, update_mask):
|
|
250
|
-
"""Sets the update_mask of this ModelUpdateRequest.
|
|
251
|
-
|
|
252
|
-
Describes which fields to update # noqa: E501
|
|
253
|
-
|
|
254
|
-
:param update_mask: The update_mask of this ModelUpdateRequest.
|
|
255
|
-
# noqa: E501
|
|
256
|
-
:type: str
|
|
257
|
-
"""
|
|
258
|
-
|
|
259
|
-
self._update_mask = update_mask
|
|
260
|
-
|
|
261
|
-
def to_dict(self):
|
|
262
|
-
"""Returns the model properties as a dict."""
|
|
263
|
-
result = {}
|
|
264
|
-
|
|
265
|
-
for attr, _ in six.iteritems(self.project_types):
|
|
266
|
-
value = getattr(self, attr)
|
|
267
|
-
if isinstance(value, list):
|
|
268
|
-
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
269
|
-
elif hasattr(value, "to_dict"):
|
|
270
|
-
result[attr] = value.to_dict()
|
|
271
|
-
elif isinstance(value, dict):
|
|
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
|
-
)
|
|
278
|
-
else:
|
|
279
|
-
result[attr] = value
|
|
280
|
-
|
|
281
|
-
return result
|
|
282
|
-
|
|
283
|
-
def to_str(self):
|
|
284
|
-
"""Returns the string representation of the model."""
|
|
285
|
-
return pprint.pformat(self.to_dict())
|
|
286
|
-
|
|
287
|
-
def __repr__(self):
|
|
288
|
-
"""For `print` and `pprint`"""
|
|
289
|
-
return self.to_str()
|
|
290
|
-
|
|
291
|
-
def __eq__(self, other):
|
|
292
|
-
"""Returns true if both objects are equal."""
|
|
293
|
-
if not isinstance(other, ModelUpdateRequest):
|
|
294
|
-
return False
|
|
295
|
-
|
|
296
|
-
return self.__dict__ == other.__dict__
|
|
297
|
-
|
|
298
|
-
def __ne__(self, other):
|
|
299
|
-
"""Returns true if both objects are not equal."""
|
|
300
|
-
return not self == other
|