kaggle 1.7.3b1__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.
Files changed (89) hide show
  1. kaggle/LICENSE +201 -0
  2. kaggle/__init__.py +6 -0
  3. kaggle/api/__init__.py +0 -0
  4. kaggle/api/kaggle_api.py +614 -0
  5. kaggle/api/kaggle_api_extended.py +4657 -0
  6. kaggle/cli.py +1606 -0
  7. kaggle/configuration.py +206 -0
  8. kaggle/models/__init__.py +0 -0
  9. kaggle/models/api_blob_type.py +4 -0
  10. kaggle/models/dataset_column.py +228 -0
  11. kaggle/models/dataset_new_request.py +385 -0
  12. kaggle/models/dataset_new_version_request.py +287 -0
  13. kaggle/models/dataset_update_settings_request.py +310 -0
  14. kaggle/models/kaggle_models_extended.py +276 -0
  15. kaggle/models/kernel_push_request.py +556 -0
  16. kaggle/models/model_instance_new_version_request.py +145 -0
  17. kaggle/models/model_instance_update_request.py +351 -0
  18. kaggle/models/model_new_instance_request.py +417 -0
  19. kaggle/models/model_new_request.py +314 -0
  20. kaggle/models/model_update_request.py +282 -0
  21. kaggle/models/start_blob_upload_request.py +232 -0
  22. kaggle/models/start_blob_upload_response.py +137 -0
  23. kaggle/models/upload_file.py +169 -0
  24. kaggle/test/__init__.py +0 -0
  25. kaggle/test/test_authenticate.py +43 -0
  26. kaggle-1.7.3b1.dist-info/METADATA +348 -0
  27. kaggle-1.7.3b1.dist-info/RECORD +89 -0
  28. kaggle-1.7.3b1.dist-info/WHEEL +4 -0
  29. kaggle-1.7.3b1.dist-info/entry_points.txt +2 -0
  30. kaggle-1.7.3b1.dist-info/licenses/LICENSE.txt +201 -0
  31. kagglesdk/LICENSE +201 -0
  32. kagglesdk/__init__.py +2 -0
  33. kagglesdk/admin/__init__.py +0 -0
  34. kagglesdk/admin/services/__init__.py +0 -0
  35. kagglesdk/admin/services/inbox_file_service.py +22 -0
  36. kagglesdk/admin/types/__init__.py +0 -0
  37. kagglesdk/admin/types/inbox_file_service.py +74 -0
  38. kagglesdk/blobs/__init__.py +0 -0
  39. kagglesdk/blobs/services/__init__.py +0 -0
  40. kagglesdk/blobs/services/blob_api_service.py +25 -0
  41. kagglesdk/blobs/types/__init__.py +0 -0
  42. kagglesdk/blobs/types/blob_api_service.py +177 -0
  43. kagglesdk/common/__init__.py +0 -0
  44. kagglesdk/common/types/__init__.py +0 -0
  45. kagglesdk/common/types/file_download.py +102 -0
  46. kagglesdk/common/types/http_redirect.py +105 -0
  47. kagglesdk/competitions/__init__.py +0 -0
  48. kagglesdk/competitions/services/__init__.py +0 -0
  49. kagglesdk/competitions/services/competition_api_service.py +129 -0
  50. kagglesdk/competitions/types/__init__.py +0 -0
  51. kagglesdk/competitions/types/competition_api_service.py +1874 -0
  52. kagglesdk/competitions/types/competition_enums.py +53 -0
  53. kagglesdk/competitions/types/submission_status.py +9 -0
  54. kagglesdk/datasets/__init__.py +0 -0
  55. kagglesdk/datasets/services/__init__.py +0 -0
  56. kagglesdk/datasets/services/dataset_api_service.py +170 -0
  57. kagglesdk/datasets/types/__init__.py +0 -0
  58. kagglesdk/datasets/types/dataset_api_service.py +2777 -0
  59. kagglesdk/datasets/types/dataset_enums.py +82 -0
  60. kagglesdk/datasets/types/dataset_types.py +646 -0
  61. kagglesdk/education/__init__.py +0 -0
  62. kagglesdk/education/services/__init__.py +0 -0
  63. kagglesdk/education/services/education_api_service.py +19 -0
  64. kagglesdk/education/types/__init__.py +0 -0
  65. kagglesdk/education/types/education_api_service.py +248 -0
  66. kagglesdk/education/types/education_service.py +139 -0
  67. kagglesdk/kaggle_client.py +66 -0
  68. kagglesdk/kaggle_env.py +42 -0
  69. kagglesdk/kaggle_http_client.py +316 -0
  70. kagglesdk/kaggle_object.py +293 -0
  71. kagglesdk/kernels/__init__.py +0 -0
  72. kagglesdk/kernels/services/__init__.py +0 -0
  73. kagglesdk/kernels/services/kernels_api_service.py +109 -0
  74. kagglesdk/kernels/types/__init__.py +0 -0
  75. kagglesdk/kernels/types/kernels_api_service.py +1951 -0
  76. kagglesdk/kernels/types/kernels_enums.py +33 -0
  77. kagglesdk/models/__init__.py +0 -0
  78. kagglesdk/models/services/__init__.py +0 -0
  79. kagglesdk/models/services/model_api_service.py +255 -0
  80. kagglesdk/models/services/model_service.py +19 -0
  81. kagglesdk/models/types/__init__.py +0 -0
  82. kagglesdk/models/types/model_api_service.py +3719 -0
  83. kagglesdk/models/types/model_enums.py +60 -0
  84. kagglesdk/models/types/model_service.py +275 -0
  85. kagglesdk/models/types/model_types.py +286 -0
  86. kagglesdk/test/test_client.py +45 -0
  87. kagglesdk/users/__init__.py +0 -0
  88. kagglesdk/users/types/__init__.py +0 -0
  89. kagglesdk/users/types/users_enums.py +22 -0
@@ -0,0 +1,385 @@
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
+ from kaggle.models.upload_file import UploadFile # noqa: F401,E501
25
+
26
+
27
+ class DatasetNewRequest(object):
28
+ """
29
+ Attributes:
30
+ project_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ project_types = {
36
+ 'title': 'str',
37
+ 'slug': 'str',
38
+ 'owner_slug': 'str',
39
+ 'license_name': 'str',
40
+ 'subtitle': 'str',
41
+ 'description': 'str',
42
+ 'files': 'list[UploadFile]',
43
+ 'is_private': 'bool',
44
+ 'convert_to_csv': 'bool',
45
+ 'category_ids': 'list[str]'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'title': 'title',
50
+ 'slug': 'slug',
51
+ 'owner_slug': 'ownerSlug',
52
+ 'license_name': 'licenseName',
53
+ 'subtitle': 'subtitle',
54
+ 'description': 'description',
55
+ 'files': 'files',
56
+ 'is_private': 'isPrivate',
57
+ 'convert_to_csv': 'convertToCsv',
58
+ 'category_ids': 'categoryIds'
59
+ }
60
+
61
+ def __init__(self, title=None, slug=None, owner_slug=None, license_name='unknown', subtitle=None, description='', files=None, is_private=True, convert_to_csv=True, category_ids=None): # noqa: E501
62
+
63
+ self._title = None
64
+ self._slug = None
65
+ self._owner_slug = None
66
+ self._license_name = None
67
+ self._subtitle = None
68
+ self._description = None
69
+ self._files = None
70
+ self._is_private = None
71
+ self._convert_to_csv = None
72
+ self._category_ids = None
73
+ self.discriminator = None
74
+
75
+ self.title = title
76
+ if slug is not None:
77
+ self.slug = slug
78
+ if owner_slug is not None:
79
+ self.owner_slug = owner_slug
80
+ if license_name is not None:
81
+ self.license_name = license_name
82
+ if subtitle is not None:
83
+ self.subtitle = subtitle
84
+ if description is not None:
85
+ self.description = description
86
+ self.files = files
87
+ if is_private is not None:
88
+ self.is_private = is_private
89
+ if convert_to_csv is not None:
90
+ self.convert_to_csv = convert_to_csv
91
+ if category_ids is not None:
92
+ self.category_ids = category_ids
93
+
94
+ @property
95
+ def title(self):
96
+ """Gets the title of this DatasetNewRequest. # noqa: E501
97
+
98
+ The title of the new dataset # noqa: E501
99
+
100
+ :return: The title of this DatasetNewRequest. # noqa: E501
101
+ :rtype: str
102
+ """
103
+ return self._title
104
+
105
+ @title.setter
106
+ def title(self, title):
107
+ """Sets the title of this DatasetNewRequest.
108
+
109
+ The title of the new dataset # noqa: E501
110
+
111
+ :param title: The title of this DatasetNewRequest. # noqa: E501
112
+ :type: str
113
+ """
114
+ if title is None:
115
+ raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501
116
+
117
+ self._title = title
118
+
119
+ @property
120
+ def slug(self):
121
+ """Gets the slug of this DatasetNewRequest. # noqa: E501
122
+
123
+ The slug that the dataset should be created with # noqa: E501
124
+
125
+ :return: The slug of this DatasetNewRequest. # noqa: E501
126
+ :rtype: str
127
+ """
128
+ return self._slug
129
+
130
+ @slug.setter
131
+ def slug(self, slug):
132
+ """Sets the slug of this DatasetNewRequest.
133
+
134
+ The slug that the dataset should be created with # noqa: E501
135
+
136
+ :param slug: The slug of this DatasetNewRequest. # noqa: E501
137
+ :type: str
138
+ """
139
+
140
+ self._slug = slug
141
+
142
+ @property
143
+ def owner_slug(self):
144
+ """Gets the owner_slug of this DatasetNewRequest. # noqa: E501
145
+
146
+ The owner's username # noqa: E501
147
+
148
+ :return: The owner_slug of this DatasetNewRequest. # noqa: E501
149
+ :rtype: str
150
+ """
151
+ return self._owner_slug
152
+
153
+ @owner_slug.setter
154
+ def owner_slug(self, owner_slug):
155
+ """Sets the owner_slug of this DatasetNewRequest.
156
+
157
+ The owner's username # noqa: E501
158
+
159
+ :param owner_slug: The owner_slug of this DatasetNewRequest. # noqa: E501
160
+ :type: str
161
+ """
162
+
163
+ self._owner_slug = owner_slug
164
+
165
+ @property
166
+ def license_name(self):
167
+ """Gets the license_name of this DatasetNewRequest. # noqa: E501
168
+
169
+ The license that should be associated with the dataset # noqa: E501
170
+
171
+ :return: The license_name of this DatasetNewRequest. # noqa: E501
172
+ :rtype: str
173
+ """
174
+ return self._license_name
175
+
176
+ @license_name.setter
177
+ def license_name(self, license_name):
178
+ """Sets the license_name of this DatasetNewRequest.
179
+
180
+ The license that should be associated with the dataset # noqa: E501
181
+
182
+ :param license_name: The license_name of this DatasetNewRequest. # noqa: E501
183
+ :type: str
184
+ """
185
+ allowed_values = ["CC0-1.0", "CC-BY-SA-4.0", "GPL-2.0", "ODbL-1.0", "CC-BY-NC-SA-4.0", "unknown", "DbCL-1.0", "CC-BY-SA-3.0", "copyright-authors", "other", "reddit-api", "world-bank", "CC-BY-4.0", "CC-BY-NC-4.0", "PDDL", "CC-BY-3.0", "CC-BY-3.0-IGO", "US-Government-Works", "CC-BY-NC-SA-3.0-IGO", "CDLA-Permissive-1.0", "CDLA-Sharing-1.0", "CC-BY-ND-4.0", "CC-BY-NC-ND-4.0", "ODC-BY-1.0", "LGPL-3.0", "AGPL-3.0", "FDL-1.3", "EU-ODP-Legal-Notice", "apache-2.0", "GPL-3.0"] # noqa: E501
186
+ if license_name not in allowed_values:
187
+ raise ValueError(
188
+ "Invalid value for `license_name` ({0}), must be one of {1}" # noqa: E501
189
+ .format(license_name, allowed_values)
190
+ )
191
+ else:
192
+ license_name = license_name.lower()
193
+ if license_name[0-1] == 'cc':
194
+ license_name = 'cc'
195
+ elif license_name[0-3] == 'gpl':
196
+ license_name = 'gpl'
197
+ elif license_name[0-3] == 'odb':
198
+ license_name = 'odb'
199
+ else:
200
+ license_name = 'other'
201
+ self._license_name = license_name
202
+
203
+ @property
204
+ def subtitle(self):
205
+ """Gets the subtitle of this DatasetNewRequest. # noqa: E501
206
+
207
+ The subtitle to be set on the dataset # noqa: E501
208
+
209
+ :return: The subtitle of this DatasetNewRequest. # noqa: E501
210
+ :rtype: str
211
+ """
212
+ return self._subtitle
213
+
214
+ @subtitle.setter
215
+ def subtitle(self, subtitle):
216
+ """Sets the subtitle of this DatasetNewRequest.
217
+
218
+ The subtitle to be set on the dataset # noqa: E501
219
+
220
+ :param subtitle: The subtitle of this DatasetNewRequest. # noqa: E501
221
+ :type: str
222
+ """
223
+
224
+ self._subtitle = subtitle
225
+
226
+ @property
227
+ def description(self):
228
+ """Gets the description of this DatasetNewRequest. # noqa: E501
229
+
230
+ The description to be set on the dataset # noqa: E501
231
+
232
+ :return: The description of this DatasetNewRequest. # noqa: E501
233
+ :rtype: str
234
+ """
235
+ return self._description
236
+
237
+ @description.setter
238
+ def description(self, description):
239
+ """Sets the description of this DatasetNewRequest.
240
+
241
+ The description to be set on the dataset # noqa: E501
242
+
243
+ :param description: The description of this DatasetNewRequest. # noqa: E501
244
+ :type: str
245
+ """
246
+
247
+ self._description = description
248
+
249
+ @property
250
+ def files(self):
251
+ """Gets the files of this DatasetNewRequest. # noqa: E501
252
+
253
+ A list of files that should be associated with the dataset # noqa: E501
254
+
255
+ :return: The files of this DatasetNewRequest. # noqa: E501
256
+ :rtype: list[UploadFile]
257
+ """
258
+ return self._files
259
+
260
+ @files.setter
261
+ def files(self, files):
262
+ """Sets the files of this DatasetNewRequest.
263
+
264
+ A list of files that should be associated with the dataset # noqa: E501
265
+
266
+ :param files: The files of this DatasetNewRequest. # noqa: E501
267
+ :type: list[UploadFile]
268
+ """
269
+ if files is None:
270
+ raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501
271
+
272
+ self._files = files
273
+
274
+ @property
275
+ def is_private(self):
276
+ """Gets the is_private of this DatasetNewRequest. # noqa: E501
277
+
278
+ Whether or not the dataset should be private # noqa: E501
279
+
280
+ :return: The is_private of this DatasetNewRequest. # noqa: E501
281
+ :rtype: bool
282
+ """
283
+ return self._is_private
284
+
285
+ @is_private.setter
286
+ def is_private(self, is_private):
287
+ """Sets the is_private of this DatasetNewRequest.
288
+
289
+ Whether or not the dataset should be private # noqa: E501
290
+
291
+ :param is_private: The is_private of this DatasetNewRequest. # noqa: E501
292
+ :type: bool
293
+ """
294
+
295
+ self._is_private = is_private
296
+
297
+ @property
298
+ def convert_to_csv(self):
299
+ """Gets the convert_to_csv of this DatasetNewRequest. # noqa: E501
300
+
301
+ Whether or not a tabular dataset should be converted to csv # noqa: E501
302
+
303
+ :return: The convert_to_csv of this DatasetNewRequest. # noqa: E501
304
+ :rtype: bool
305
+ """
306
+ return self._convert_to_csv
307
+
308
+ @convert_to_csv.setter
309
+ def convert_to_csv(self, convert_to_csv):
310
+ """Sets the convert_to_csv of this DatasetNewRequest.
311
+
312
+ Whether or not a tabular dataset should be converted to csv # noqa: E501
313
+
314
+ :param convert_to_csv: The convert_to_csv of this DatasetNewRequest. # noqa: E501
315
+ :type: bool
316
+ """
317
+
318
+ self._convert_to_csv = convert_to_csv
319
+
320
+ @property
321
+ def category_ids(self):
322
+ """Gets the category_ids of this DatasetNewRequest. # noqa: E501
323
+
324
+ A list of tag IDs to associated with the dataset # noqa: E501
325
+
326
+ :return: The category_ids of this DatasetNewRequest. # noqa: E501
327
+ :rtype: list[str]
328
+ """
329
+ return self._category_ids
330
+
331
+ @category_ids.setter
332
+ def category_ids(self, category_ids):
333
+ """Sets the category_ids of this DatasetNewRequest.
334
+
335
+ A list of tag IDs to associated with the dataset # noqa: E501
336
+
337
+ :param category_ids: The category_ids of this DatasetNewRequest. # noqa: E501
338
+ :type: list[str]
339
+ """
340
+
341
+ self._category_ids = category_ids
342
+
343
+ def to_dict(self):
344
+ """Returns the model properties as a dict"""
345
+ result = {}
346
+
347
+ for attr, _ in six.iteritems(self.project_types):
348
+ value = getattr(self, attr)
349
+ if isinstance(value, list):
350
+ result[attr] = list(map(
351
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
352
+ value
353
+ ))
354
+ elif hasattr(value, "to_dict"):
355
+ result[attr] = value.to_dict()
356
+ elif isinstance(value, dict):
357
+ result[attr] = dict(map(
358
+ lambda item: (item[0], item[1].to_dict())
359
+ if hasattr(item[1], "to_dict") else item,
360
+ value.items()
361
+ ))
362
+ else:
363
+ result[attr] = value
364
+
365
+ return result
366
+
367
+ def to_str(self):
368
+ """Returns the string representation of the model"""
369
+ return pprint.pformat(self.to_dict())
370
+
371
+ def __repr__(self):
372
+ """For `print` and `pprint`"""
373
+ return self.to_str()
374
+
375
+ def __eq__(self, other):
376
+ """Returns true if both objects are equal"""
377
+ if not isinstance(other, DatasetNewRequest):
378
+ return False
379
+
380
+ return self.__dict__ == other.__dict__
381
+
382
+ def __ne__(self, other):
383
+ """Returns true if both objects are not equal"""
384
+ return not self == other
385
+
@@ -0,0 +1,287 @@
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
+
20
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ import six
24
+
25
+ from kaggle.models.upload_file import UploadFile # noqa: F401,E501
26
+
27
+
28
+ class DatasetNewVersionRequest(object):
29
+ """
30
+ Attributes:
31
+ project_types (dict): The key is attribute name
32
+ and the value is attribute type.
33
+ attribute_map (dict): The key is attribute name
34
+ and the value is json key in definition.
35
+ """
36
+ project_types = {
37
+ 'version_notes': 'str',
38
+ 'subtitle': 'str',
39
+ 'description': 'str',
40
+ 'files': 'list[UploadFile]',
41
+ 'convert_to_csv': 'bool',
42
+ 'category_ids': 'list[str]',
43
+ 'delete_old_versions': 'bool'
44
+ }
45
+
46
+ attribute_map = {
47
+ 'version_notes': 'versionNotes',
48
+ 'subtitle': 'subtitle',
49
+ 'description': 'description',
50
+ 'files': 'files',
51
+ 'convert_to_csv': 'convertToCsv',
52
+ 'category_ids': 'categoryIds',
53
+ 'delete_old_versions': 'deleteOldVersions'
54
+ }
55
+
56
+ def __init__(self, version_notes=None, subtitle=None, description=None, files=None, convert_to_csv=True, category_ids=None, delete_old_versions=False): # noqa: E501
57
+
58
+ self._version_notes = None
59
+ self._subtitle = None
60
+ self._description = None
61
+ self._files = None
62
+ self._convert_to_csv = None
63
+ self._category_ids = None
64
+ self._delete_old_versions = None
65
+ self.discriminator = None
66
+
67
+ self.version_notes = version_notes
68
+ if subtitle is not None:
69
+ self.subtitle = subtitle
70
+ if description is not None:
71
+ self.description = description
72
+ self.files = files
73
+ if convert_to_csv is not None:
74
+ self.convert_to_csv = convert_to_csv
75
+ if category_ids is not None:
76
+ self.category_ids = category_ids
77
+ if delete_old_versions is not None:
78
+ self.delete_old_versions = delete_old_versions
79
+
80
+ @property
81
+ def version_notes(self):
82
+ """Gets the version_notes of this DatasetNewVersionRequest. # noqa: E501
83
+
84
+ The version notes for the new dataset version # noqa: E501
85
+
86
+ :return: The version_notes of this DatasetNewVersionRequest. # noqa: E501
87
+ :rtype: str
88
+ """
89
+ return self._version_notes
90
+
91
+ @version_notes.setter
92
+ def version_notes(self, version_notes):
93
+ """Sets the version_notes of this DatasetNewVersionRequest.
94
+
95
+ The version notes for the new dataset version # noqa: E501
96
+
97
+ :param version_notes: The version_notes of this DatasetNewVersionRequest. # noqa: E501
98
+ :type: str
99
+ """
100
+ if version_notes is None:
101
+ raise ValueError("Invalid value for `version_notes`, must not be `None`") # noqa: E501
102
+
103
+ self._version_notes = version_notes
104
+
105
+ @property
106
+ def subtitle(self):
107
+ """Gets the subtitle of this DatasetNewVersionRequest. # noqa: E501
108
+
109
+ The subtitle to set on the dataset # noqa: E501
110
+
111
+ :return: The subtitle of this DatasetNewVersionRequest. # noqa: E501
112
+ :rtype: str
113
+ """
114
+ return self._subtitle
115
+
116
+ @subtitle.setter
117
+ def subtitle(self, subtitle):
118
+ """Sets the subtitle of this DatasetNewVersionRequest.
119
+
120
+ The subtitle to set on the dataset # noqa: E501
121
+
122
+ :param subtitle: The subtitle of this DatasetNewVersionRequest. # noqa: E501
123
+ :type: str
124
+ """
125
+
126
+ self._subtitle = subtitle
127
+
128
+ @property
129
+ def description(self):
130
+ """Gets the description of this DatasetNewVersionRequest. # noqa: E501
131
+
132
+ The description to set on the dataset # noqa: E501
133
+
134
+ :return: The description of this DatasetNewVersionRequest. # noqa: E501
135
+ :rtype: str
136
+ """
137
+ return self._description
138
+
139
+ @description.setter
140
+ def description(self, description):
141
+ """Sets the description of this DatasetNewVersionRequest.
142
+
143
+ The description to set on the dataset # noqa: E501
144
+
145
+ :param description: The description of this DatasetNewVersionRequest. # noqa: E501
146
+ :type: str
147
+ """
148
+
149
+ self._description = description
150
+
151
+ @property
152
+ def files(self):
153
+ """Gets the files of this DatasetNewVersionRequest. # noqa: E501
154
+
155
+ A list of files that should be associated with the dataset # noqa: E501
156
+
157
+ :return: The files of this DatasetNewVersionRequest. # noqa: E501
158
+ :rtype: list[UploadFile]
159
+ """
160
+ return self._files
161
+
162
+ @files.setter
163
+ def files(self, files):
164
+ """Sets the files of this DatasetNewVersionRequest.
165
+
166
+ A list of files that should be associated with the dataset # noqa: E501
167
+
168
+ :param files: The files of this DatasetNewVersionRequest. # noqa: E501
169
+ :type: list[UploadFile]
170
+ """
171
+ if files is None:
172
+ raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501
173
+
174
+ self._files = files
175
+
176
+ @property
177
+ def convert_to_csv(self):
178
+ """Gets the convert_to_csv of this DatasetNewVersionRequest. # noqa: E501
179
+
180
+ Whether or not a tabular dataset should be converted to csv # noqa: E501
181
+
182
+ :return: The convert_to_csv of this DatasetNewVersionRequest. # noqa: E501
183
+ :rtype: bool
184
+ """
185
+ return self._convert_to_csv
186
+
187
+ @convert_to_csv.setter
188
+ def convert_to_csv(self, convert_to_csv):
189
+ """Sets the convert_to_csv of this DatasetNewVersionRequest.
190
+
191
+ Whether or not a tabular dataset should be converted to csv # noqa: E501
192
+
193
+ :param convert_to_csv: The convert_to_csv of this DatasetNewVersionRequest. # noqa: E501
194
+ :type: bool
195
+ """
196
+
197
+ self._convert_to_csv = convert_to_csv
198
+
199
+ @property
200
+ def category_ids(self):
201
+ """Gets the category_ids of this DatasetNewVersionRequest. # noqa: E501
202
+
203
+ A list of tag IDs to associated with the dataset # noqa: E501
204
+
205
+ :return: The category_ids of this DatasetNewVersionRequest. # noqa: E501
206
+ :rtype: list[str]
207
+ """
208
+ return self._category_ids
209
+
210
+ @category_ids.setter
211
+ def category_ids(self, category_ids):
212
+ """Sets the category_ids of this DatasetNewVersionRequest.
213
+
214
+ A list of tag IDs to associated with the dataset # noqa: E501
215
+
216
+ :param category_ids: The category_ids of this DatasetNewVersionRequest. # noqa: E501
217
+ :type: list[str]
218
+ """
219
+
220
+ self._category_ids = category_ids
221
+
222
+ @property
223
+ def delete_old_versions(self):
224
+ """Gets the delete_old_versions of this DatasetNewVersionRequest. # noqa: E501
225
+
226
+ Whether or not all previous versions of the dataset should be deleted upon creating the new version # noqa: E501
227
+
228
+ :return: The delete_old_versions of this DatasetNewVersionRequest. # noqa: E501
229
+ :rtype: bool
230
+ """
231
+ return self._delete_old_versions
232
+
233
+ @delete_old_versions.setter
234
+ def delete_old_versions(self, delete_old_versions):
235
+ """Sets the delete_old_versions of this DatasetNewVersionRequest.
236
+
237
+ Whether or not all previous versions of the dataset should be deleted upon creating the new version # noqa: E501
238
+
239
+ :param delete_old_versions: The delete_old_versions of this DatasetNewVersionRequest. # noqa: E501
240
+ :type: bool
241
+ """
242
+
243
+ self._delete_old_versions = delete_old_versions
244
+
245
+ def to_dict(self):
246
+ """Returns the model properties as a dict"""
247
+ result = {}
248
+
249
+ for attr, _ in six.iteritems(self.project_types):
250
+ value = getattr(self, attr)
251
+ if isinstance(value, list):
252
+ result[attr] = list(map(
253
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
254
+ value
255
+ ))
256
+ elif hasattr(value, "to_dict"):
257
+ result[attr] = value.to_dict()
258
+ elif isinstance(value, dict):
259
+ result[attr] = dict(map(
260
+ lambda item: (item[0], item[1].to_dict())
261
+ if hasattr(item[1], "to_dict") else item,
262
+ value.items()
263
+ ))
264
+ else:
265
+ result[attr] = value
266
+
267
+ return result
268
+
269
+ def to_str(self):
270
+ """Returns the string representation of the model"""
271
+ return pprint.pformat(self.to_dict())
272
+
273
+ def __repr__(self):
274
+ """For `print` and `pprint`"""
275
+ return self.to_str()
276
+
277
+ def __eq__(self, other):
278
+ """Returns true if both objects are equal"""
279
+ if not isinstance(other, DatasetNewVersionRequest):
280
+ return False
281
+
282
+ return self.__dict__ == other.__dict__
283
+
284
+ def __ne__(self, other):
285
+ """Returns true if both objects are not equal"""
286
+ return not self == other
287
+