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,314 @@
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
+ project_types = {
34
+ 'owner_slug': 'str',
35
+ 'slug': 'str',
36
+ 'title': 'str',
37
+ 'subtitle': 'str',
38
+ 'is_private': 'bool',
39
+ 'description': 'str',
40
+ 'publish_time': 'date',
41
+ 'provenance_sources': 'str'
42
+ }
43
+
44
+ attribute_map = {
45
+ 'owner_slug': 'ownerSlug',
46
+ 'slug': 'slug',
47
+ 'title': 'title',
48
+ 'subtitle': 'subtitle',
49
+ 'is_private': 'isPrivate',
50
+ 'description': 'description',
51
+ 'publish_time': 'publishTime',
52
+ 'provenance_sources': 'provenanceSources'
53
+ }
54
+
55
+ def __init__(self, owner_slug=None, slug=None, title=None, subtitle=None, is_private=True, description='', publish_time=None, provenance_sources=''): # noqa: E501
56
+
57
+ self._owner_slug = None
58
+ self._slug = None
59
+ self._title = None
60
+ self._subtitle = None
61
+ self._is_private = None
62
+ self._description = None
63
+ self._publish_time = None
64
+ self._provenance_sources = None
65
+ self.discriminator = None
66
+
67
+ self.owner_slug = owner_slug
68
+ self.slug = slug
69
+ self.title = title
70
+ if subtitle is not None:
71
+ self.subtitle = subtitle
72
+ self.is_private = is_private
73
+ if description is not None:
74
+ self.description = description
75
+ if publish_time is not None:
76
+ self.publish_time = publish_time
77
+ if provenance_sources is not None:
78
+ self.provenance_sources = provenance_sources
79
+
80
+ @property
81
+ def owner_slug(self):
82
+ """Gets the owner_slug of this ModelNewRequest. # noqa: E501
83
+
84
+ The owner's slug # noqa: E501
85
+
86
+ :return: The owner_slug of this ModelNewRequest. # noqa: E501
87
+ :rtype: str
88
+ """
89
+ return self._owner_slug
90
+
91
+ @owner_slug.setter
92
+ def owner_slug(self, owner_slug):
93
+ """Sets the owner_slug of this ModelNewRequest.
94
+
95
+ The owner's slug # noqa: E501
96
+
97
+ :param owner_slug: The owner_slug of this ModelNewRequest. # noqa: E501
98
+ :type: str
99
+ """
100
+ if owner_slug is None:
101
+ raise ValueError("Invalid value for `owner_slug`, must not be `None`") # noqa: E501
102
+
103
+ self._owner_slug = owner_slug
104
+
105
+ @property
106
+ def slug(self):
107
+ """Gets the slug of this ModelNewRequest. # noqa: E501
108
+
109
+ The slug that the model should be created with # noqa: E501
110
+
111
+ :return: The slug of this ModelNewRequest. # noqa: E501
112
+ :rtype: str
113
+ """
114
+ return self._slug
115
+
116
+ @slug.setter
117
+ def slug(self, slug):
118
+ """Sets the slug of this ModelNewRequest.
119
+
120
+ The slug that the model should be created with # noqa: E501
121
+
122
+ :param slug: The slug of this ModelNewRequest. # noqa: E501
123
+ :type: str
124
+ """
125
+ if slug is None:
126
+ raise ValueError("Invalid value for `slug`, must not be `None`") # noqa: E501
127
+
128
+ self._slug = slug
129
+
130
+ @property
131
+ def title(self):
132
+ """Gets the title of this ModelNewRequest. # noqa: E501
133
+
134
+ The title of the new model # noqa: E501
135
+
136
+ :return: The title of this ModelNewRequest. # noqa: E501
137
+ :rtype: str
138
+ """
139
+ return self._title
140
+
141
+ @title.setter
142
+ def title(self, title):
143
+ """Sets the title of this ModelNewRequest.
144
+
145
+ The title of the new model # noqa: E501
146
+
147
+ :param title: The title of this ModelNewRequest. # noqa: E501
148
+ :type: str
149
+ """
150
+ if title is None:
151
+ raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501
152
+
153
+ self._title = title
154
+
155
+ @property
156
+ def subtitle(self):
157
+ """Gets the subtitle of this ModelNewRequest. # noqa: E501
158
+
159
+ The subtitle of the new model # noqa: E501
160
+
161
+ :return: The subtitle of this ModelNewRequest. # noqa: E501
162
+ :rtype: str
163
+ """
164
+ return self._subtitle
165
+
166
+ @subtitle.setter
167
+ def subtitle(self, subtitle):
168
+ """Sets the subtitle of this ModelNewRequest.
169
+
170
+ The subtitle of the new model # noqa: E501
171
+
172
+ :param subtitle: The subtitle of this ModelNewRequest. # noqa: E501
173
+ :type: str
174
+ """
175
+
176
+ self._subtitle = subtitle
177
+
178
+ @property
179
+ def is_private(self):
180
+ """Gets the is_private of this ModelNewRequest. # noqa: E501
181
+
182
+ Whether or not the model should be private # noqa: E501
183
+
184
+ :return: The is_private of this ModelNewRequest. # noqa: E501
185
+ :rtype: bool
186
+ """
187
+ return self._is_private
188
+
189
+ @is_private.setter
190
+ def is_private(self, is_private):
191
+ """Sets the is_private of this ModelNewRequest.
192
+
193
+ Whether or not the model should be private # noqa: E501
194
+
195
+ :param is_private: The is_private of this ModelNewRequest. # noqa: E501
196
+ :type: bool
197
+ """
198
+ if is_private is None:
199
+ raise ValueError("Invalid value for `is_private`, must not be `None`") # noqa: E501
200
+
201
+ self._is_private = is_private
202
+
203
+ @property
204
+ def description(self):
205
+ """Gets the description of this ModelNewRequest. # noqa: E501
206
+
207
+ The description to be set on the model # noqa: E501
208
+
209
+ :return: The description of this ModelNewRequest. # noqa: E501
210
+ :rtype: str
211
+ """
212
+ return self._description
213
+
214
+ @description.setter
215
+ def description(self, description):
216
+ """Sets the description of this ModelNewRequest.
217
+
218
+ The description to be set on the model # noqa: E501
219
+
220
+ :param description: The description of this ModelNewRequest. # noqa: E501
221
+ :type: str
222
+ """
223
+
224
+ self._description = description
225
+
226
+ @property
227
+ def publish_time(self):
228
+ """Gets the publish_time of this ModelNewRequest. # noqa: E501
229
+
230
+ When the model was initially published # noqa: E501
231
+
232
+ :return: The publish_time of this ModelNewRequest. # noqa: E501
233
+ :rtype: date
234
+ """
235
+ return self._publish_time
236
+
237
+ @publish_time.setter
238
+ def publish_time(self, publish_time):
239
+ """Sets the publish_time of this ModelNewRequest.
240
+
241
+ When the model was initially published # noqa: E501
242
+
243
+ :param publish_time: The publish_time of this ModelNewRequest. # noqa: E501
244
+ :type: date
245
+ """
246
+
247
+ self._publish_time = publish_time
248
+
249
+ @property
250
+ def provenance_sources(self):
251
+ """Gets the provenance_sources of this ModelNewRequest. # noqa: E501
252
+
253
+ The provenance sources to be set on the model # noqa: E501
254
+
255
+ :return: The provenance_sources of this ModelNewRequest. # noqa: E501
256
+ :rtype: str
257
+ """
258
+ return self._provenance_sources
259
+
260
+ @provenance_sources.setter
261
+ def provenance_sources(self, provenance_sources):
262
+ """Sets the provenance_sources of this ModelNewRequest.
263
+
264
+ The provenance sources to be set on the model # noqa: E501
265
+
266
+ :param provenance_sources: The provenance_sources of this ModelNewRequest. # noqa: E501
267
+ :type: str
268
+ """
269
+
270
+ self._provenance_sources = provenance_sources
271
+
272
+ def to_dict(self):
273
+ """Returns the model properties as a dict"""
274
+ result = {}
275
+
276
+ for attr, _ in six.iteritems(self.project_types):
277
+ value = getattr(self, attr)
278
+ 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
+ ))
283
+ elif hasattr(value, "to_dict"):
284
+ result[attr] = value.to_dict()
285
+ elif isinstance(value, dict):
286
+ result[attr] = dict(map(
287
+ lambda item: (item[0], item[1].to_dict())
288
+ if hasattr(item[1], "to_dict") else item,
289
+ value.items()
290
+ ))
291
+ else:
292
+ result[attr] = value
293
+
294
+ return result
295
+
296
+ def to_str(self):
297
+ """Returns the string representation of the model"""
298
+ return pprint.pformat(self.to_dict())
299
+
300
+ def __repr__(self):
301
+ """For `print` and `pprint`"""
302
+ return self.to_str()
303
+
304
+ def __eq__(self, other):
305
+ """Returns true if both objects are equal"""
306
+ if not isinstance(other, ModelNewRequest):
307
+ return False
308
+
309
+ return self.__dict__ == other.__dict__
310
+
311
+ def __ne__(self, other):
312
+ """Returns true if both objects are not equal"""
313
+ return not self == other
314
+
@@ -0,0 +1,282 @@
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
+ project_types = {
34
+ 'title': 'str',
35
+ 'subtitle': 'str',
36
+ 'is_private': 'bool',
37
+ 'description': 'str',
38
+ 'publish_time': 'date',
39
+ 'provenance_sources': 'str',
40
+ 'update_mask': 'str'
41
+ }
42
+
43
+ attribute_map = {
44
+ 'title': 'title',
45
+ 'subtitle': 'subtitle',
46
+ 'is_private': 'isPrivate',
47
+ 'description': 'description',
48
+ 'publish_time': 'publishTime',
49
+ 'provenance_sources': 'provenanceSources',
50
+ 'update_mask': 'updateMask'
51
+ }
52
+
53
+ def __init__(self, title=None, subtitle=None, is_private=True, description='', publish_time=None, provenance_sources='', update_mask=None): # noqa: E501
54
+
55
+ self._title = None
56
+ self._subtitle = None
57
+ self._is_private = None
58
+ self._description = None
59
+ self._publish_time = None
60
+ self._provenance_sources = None
61
+ self._update_mask = None
62
+ self.discriminator = None
63
+
64
+ if title is not None:
65
+ self.title = title
66
+ if subtitle is not None:
67
+ self.subtitle = subtitle
68
+ if is_private is not None:
69
+ self.is_private = is_private
70
+ if description is not None:
71
+ self.description = description
72
+ if publish_time is not None:
73
+ self.publish_time = publish_time
74
+ if provenance_sources is not None:
75
+ self.provenance_sources = provenance_sources
76
+ if update_mask is not None:
77
+ self.update_mask = update_mask
78
+
79
+ @property
80
+ def title(self):
81
+ """Gets the title of this ModelUpdateRequest. # noqa: E501
82
+
83
+ The title of the new model # noqa: E501
84
+
85
+ :return: The title of this ModelUpdateRequest. # noqa: E501
86
+ :rtype: str
87
+ """
88
+ return self._title
89
+
90
+ @title.setter
91
+ def title(self, title):
92
+ """Sets the title of this ModelUpdateRequest.
93
+
94
+ The title of the new model # noqa: E501
95
+
96
+ :param title: The title of this ModelUpdateRequest. # noqa: E501
97
+ :type: str
98
+ """
99
+
100
+ self._title = title
101
+
102
+ @property
103
+ def subtitle(self):
104
+ """Gets the subtitle of this ModelUpdateRequest. # noqa: E501
105
+
106
+ The subtitle of the new model # noqa: E501
107
+
108
+ :return: The subtitle of this ModelUpdateRequest. # noqa: E501
109
+ :rtype: str
110
+ """
111
+ return self._subtitle
112
+
113
+ @subtitle.setter
114
+ def subtitle(self, subtitle):
115
+ """Sets the subtitle of this ModelUpdateRequest.
116
+
117
+ The subtitle of the new model # noqa: E501
118
+
119
+ :param subtitle: The subtitle of this ModelUpdateRequest. # noqa: E501
120
+ :type: str
121
+ """
122
+
123
+ self._subtitle = subtitle
124
+
125
+ @property
126
+ def is_private(self):
127
+ """Gets the is_private of this ModelUpdateRequest. # noqa: E501
128
+
129
+ Whether or not the model should be private # noqa: E501
130
+
131
+ :return: The is_private of this ModelUpdateRequest. # noqa: E501
132
+ :rtype: bool
133
+ """
134
+ return self._is_private
135
+
136
+ @is_private.setter
137
+ def is_private(self, is_private):
138
+ """Sets the is_private of this ModelUpdateRequest.
139
+
140
+ Whether or not the model should be private # noqa: E501
141
+
142
+ :param is_private: The is_private of this ModelUpdateRequest. # noqa: E501
143
+ :type: bool
144
+ """
145
+
146
+ self._is_private = is_private
147
+
148
+ @property
149
+ def description(self):
150
+ """Gets the description of this ModelUpdateRequest. # noqa: E501
151
+
152
+ The description to be set on the model # noqa: E501
153
+
154
+ :return: The description of this ModelUpdateRequest. # noqa: E501
155
+ :rtype: str
156
+ """
157
+ return self._description
158
+
159
+ @description.setter
160
+ def description(self, description):
161
+ """Sets the description of this ModelUpdateRequest.
162
+
163
+ The description to be set on the model # noqa: E501
164
+
165
+ :param description: The description of this ModelUpdateRequest. # noqa: E501
166
+ :type: str
167
+ """
168
+
169
+ self._description = description
170
+
171
+ @property
172
+ def publish_time(self):
173
+ """Gets the publish_time of this ModelUpdateRequest. # noqa: E501
174
+
175
+ When the model was initially published # noqa: E501
176
+
177
+ :return: The publish_time of this ModelUpdateRequest. # noqa: E501
178
+ :rtype: date
179
+ """
180
+ return self._publish_time
181
+
182
+ @publish_time.setter
183
+ def publish_time(self, publish_time):
184
+ """Sets the publish_time of this ModelUpdateRequest.
185
+
186
+ When the model was initially published # noqa: E501
187
+
188
+ :param publish_time: The publish_time of this ModelUpdateRequest. # noqa: E501
189
+ :type: date
190
+ """
191
+
192
+ self._publish_time = publish_time
193
+
194
+ @property
195
+ def provenance_sources(self):
196
+ """Gets the provenance_sources of this ModelUpdateRequest. # noqa: E501
197
+
198
+ The provenance sources to be set on the model # noqa: E501
199
+
200
+ :return: The provenance_sources of this ModelUpdateRequest. # noqa: E501
201
+ :rtype: str
202
+ """
203
+ return self._provenance_sources
204
+
205
+ @provenance_sources.setter
206
+ def provenance_sources(self, provenance_sources):
207
+ """Sets the provenance_sources of this ModelUpdateRequest.
208
+
209
+ The provenance sources to be set on the model # noqa: E501
210
+
211
+ :param provenance_sources: The provenance_sources of this ModelUpdateRequest. # noqa: E501
212
+ :type: str
213
+ """
214
+
215
+ self._provenance_sources = provenance_sources
216
+
217
+ @property
218
+ def update_mask(self):
219
+ """Gets the update_mask of this ModelUpdateRequest. # noqa: E501
220
+
221
+ Describes which fields to update # noqa: E501
222
+
223
+ :return: The update_mask of this ModelUpdateRequest. # noqa: E501
224
+ :rtype: str
225
+ """
226
+ return self._update_mask
227
+
228
+ @update_mask.setter
229
+ def update_mask(self, update_mask):
230
+ """Sets the update_mask of this ModelUpdateRequest.
231
+
232
+ Describes which fields to update # noqa: E501
233
+
234
+ :param update_mask: The update_mask of this ModelUpdateRequest. # noqa: E501
235
+ :type: str
236
+ """
237
+
238
+ self._update_mask = update_mask
239
+
240
+ def to_dict(self):
241
+ """Returns the model properties as a dict"""
242
+ result = {}
243
+
244
+ for attr, _ in six.iteritems(self.project_types):
245
+ value = getattr(self, attr)
246
+ 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
+ ))
251
+ elif hasattr(value, "to_dict"):
252
+ result[attr] = value.to_dict()
253
+ elif isinstance(value, dict):
254
+ result[attr] = dict(map(
255
+ lambda item: (item[0], item[1].to_dict())
256
+ if hasattr(item[1], "to_dict") else item,
257
+ value.items()
258
+ ))
259
+ else:
260
+ result[attr] = value
261
+
262
+ return result
263
+
264
+ def to_str(self):
265
+ """Returns the string representation of the model"""
266
+ return pprint.pformat(self.to_dict())
267
+
268
+ def __repr__(self):
269
+ """For `print` and `pprint`"""
270
+ return self.to_str()
271
+
272
+ def __eq__(self, other):
273
+ """Returns true if both objects are equal"""
274
+ if not isinstance(other, ModelUpdateRequest):
275
+ return False
276
+
277
+ return self.__dict__ == other.__dict__
278
+
279
+ def __ne__(self, other):
280
+ """Returns true if both objects are not equal"""
281
+ return not self == other
282
+