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.
Files changed (114) hide show
  1. kaggle/__init__.py +10 -6
  2. kaggle/api/kaggle_api.py +574 -585
  3. kaggle/api/kaggle_api_extended.py +5251 -4738
  4. kaggle/cli.py +1335 -1585
  5. kaggle/models/api_blob_type.py +3 -3
  6. kaggle/models/dataset_column.py +129 -129
  7. kaggle/models/dataset_new_request.py +130 -72
  8. kaggle/models/dataset_new_version_request.py +88 -56
  9. kaggle/models/dataset_update_settings_request.py +93 -59
  10. kaggle/models/kaggle_models_extended.py +169 -172
  11. kaggle/models/kernel_push_request.py +152 -100
  12. kaggle/models/model_instance_new_version_request.py +30 -30
  13. kaggle/models/model_instance_update_request.py +171 -71
  14. kaggle/models/model_new_instance_request.py +223 -88
  15. kaggle/models/model_new_request.py +61 -46
  16. kaggle/models/model_update_request.py +66 -48
  17. kaggle/models/start_blob_upload_request.py +146 -138
  18. kaggle/models/start_blob_upload_response.py +83 -78
  19. kaggle/models/upload_file.py +92 -96
  20. kaggle/test/test_authenticate.py +23 -23
  21. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/METADATA +11 -15
  22. kaggle-1.8.0.dist-info/RECORD +148 -0
  23. kagglesdk/__init__.py +5 -1
  24. kagglesdk/benchmarks/services/__init__.py +0 -0
  25. kagglesdk/benchmarks/services/benchmarks_api_service.py +19 -0
  26. kagglesdk/benchmarks/types/__init__.py +0 -0
  27. kagglesdk/benchmarks/types/benchmark_types.py +307 -0
  28. kagglesdk/benchmarks/types/benchmarks_api_service.py +243 -0
  29. kagglesdk/blobs/services/blob_api_service.py +1 -1
  30. kagglesdk/blobs/types/blob_api_service.py +2 -2
  31. kagglesdk/common/services/__init__.py +0 -0
  32. kagglesdk/common/services/operations_service.py +46 -0
  33. kagglesdk/common/types/file_download.py +1 -1
  34. kagglesdk/common/types/http_redirect.py +1 -1
  35. kagglesdk/common/types/operations.py +194 -0
  36. kagglesdk/common/types/operations_service.py +48 -0
  37. kagglesdk/community/__init__.py +0 -0
  38. kagglesdk/community/types/__init__.py +0 -0
  39. kagglesdk/community/types/content_enums.py +44 -0
  40. kagglesdk/community/types/organization.py +410 -0
  41. kagglesdk/competitions/services/competition_api_service.py +49 -12
  42. kagglesdk/competitions/types/competition.py +14 -0
  43. kagglesdk/competitions/types/competition_api_service.py +1639 -1275
  44. kagglesdk/competitions/types/search_competitions.py +28 -0
  45. kagglesdk/datasets/databundles/__init__.py +0 -0
  46. kagglesdk/datasets/databundles/types/__init__.py +0 -0
  47. kagglesdk/datasets/databundles/types/databundle_api_types.py +540 -0
  48. kagglesdk/datasets/services/dataset_api_service.py +39 -14
  49. kagglesdk/datasets/types/dataset_api_service.py +567 -297
  50. kagglesdk/datasets/types/dataset_enums.py +21 -0
  51. kagglesdk/datasets/types/dataset_service.py +145 -0
  52. kagglesdk/datasets/types/dataset_types.py +74 -74
  53. kagglesdk/datasets/types/search_datasets.py +6 -0
  54. kagglesdk/discussions/__init__.py +0 -0
  55. kagglesdk/discussions/types/__init__.py +0 -0
  56. kagglesdk/discussions/types/search_discussions.py +43 -0
  57. kagglesdk/discussions/types/writeup_enums.py +11 -0
  58. kagglesdk/education/services/education_api_service.py +1 -1
  59. kagglesdk/education/types/education_api_service.py +1 -1
  60. kagglesdk/kaggle_client.py +55 -20
  61. kagglesdk/kaggle_creds.py +148 -0
  62. kagglesdk/kaggle_env.py +89 -27
  63. kagglesdk/kaggle_http_client.py +235 -290
  64. kagglesdk/kaggle_oauth.py +200 -0
  65. kagglesdk/kaggle_object.py +298 -250
  66. kagglesdk/kernels/services/kernels_api_service.py +46 -9
  67. kagglesdk/kernels/types/kernels_api_service.py +658 -158
  68. kagglesdk/kernels/types/kernels_enums.py +6 -0
  69. kagglesdk/kernels/types/search_kernels.py +6 -0
  70. kagglesdk/licenses/__init__.py +0 -0
  71. kagglesdk/licenses/types/__init__.py +0 -0
  72. kagglesdk/licenses/types/licenses_types.py +182 -0
  73. kagglesdk/models/services/model_api_service.py +46 -21
  74. kagglesdk/models/types/model_api_service.py +1018 -652
  75. kagglesdk/models/types/model_enums.py +8 -0
  76. kagglesdk/models/types/model_service.py +71 -71
  77. kagglesdk/models/types/model_types.py +1057 -5
  78. kagglesdk/models/types/search_models.py +8 -0
  79. kagglesdk/search/__init__.py +0 -0
  80. kagglesdk/search/services/__init__.py +0 -0
  81. kagglesdk/search/services/search_api_service.py +19 -0
  82. kagglesdk/search/types/__init__.py +0 -0
  83. kagglesdk/search/types/search_api_service.py +2435 -0
  84. kagglesdk/search/types/search_content_shared.py +50 -0
  85. kagglesdk/search/types/search_enums.py +45 -0
  86. kagglesdk/search/types/search_service.py +303 -0
  87. kagglesdk/security/__init__.py +0 -0
  88. kagglesdk/security/services/__init__.py +0 -0
  89. kagglesdk/security/services/iam_service.py +31 -0
  90. kagglesdk/security/services/oauth_service.py +58 -0
  91. kagglesdk/security/types/__init__.py +0 -0
  92. kagglesdk/security/types/authentication.py +171 -0
  93. kagglesdk/security/types/iam_service.py +496 -0
  94. kagglesdk/security/types/oauth_service.py +1181 -0
  95. kagglesdk/security/types/roles.py +8 -0
  96. kagglesdk/security/types/security_types.py +159 -0
  97. kagglesdk/test/__init__.py +0 -0
  98. kagglesdk/test/test_client.py +20 -24
  99. kagglesdk/users/services/__init__.py +0 -0
  100. kagglesdk/users/services/account_service.py +31 -0
  101. kagglesdk/users/services/group_api_service.py +31 -0
  102. kagglesdk/users/types/account_service.py +345 -0
  103. kagglesdk/users/types/group_api_service.py +315 -0
  104. kagglesdk/users/types/group_types.py +165 -0
  105. kagglesdk/users/types/groups_enum.py +8 -0
  106. kagglesdk/users/types/progression_service.py +9 -0
  107. kagglesdk/users/types/search_users.py +23 -0
  108. kagglesdk/users/types/user_avatar.py +226 -0
  109. kaggle/configuration.py +0 -206
  110. kaggle-1.7.4.2.dist-info/RECORD +0 -89
  111. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/WHEEL +0 -0
  112. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/entry_points.txt +0 -0
  113. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/licenses/LICENSE.txt +0 -0
  114. {kaggle/test → kagglesdk/benchmarks}/__init__.py +0 -0
@@ -23,210 +23,218 @@ import six
23
23
 
24
24
 
25
25
  class StartBlobUploadRequest(object):
26
- """
26
+ """
27
27
  Attributes:
28
28
  project_types (dict): The key is attribute name
29
29
  and the value is attribute type.
30
30
  attribute_map (dict): The key is attribute name
31
31
  and the value is json key in definition.
32
32
  """
33
- project_types = {
34
- 'type': 'object',
35
- 'name': 'str',
36
- 'content_length': 'int',
37
- 'content_type': 'str',
38
- 'last_modified_epoch_seconds': 'int'
39
- }
40
-
41
- attribute_map = {
42
- 'type': 'type',
43
- 'name': 'name',
44
- 'content_length': 'contentLength',
45
- 'content_type': 'contentType',
46
- 'last_modified_epoch_seconds': 'lastModifiedEpochSeconds'
47
- }
48
-
49
- def __init__(self,
50
- type=None,
51
- name=None,
52
- content_length=None,
53
- content_type=None,
54
- last_modified_epoch_seconds=None): # noqa: E501
55
- """StartBlobUploadRequest - a model defined in Swagger""" # noqa: E501
56
-
57
- self._type = None
58
- self._name = None
59
- self._content_length = None
60
- self._content_type = None
61
- self._last_modified_epoch_seconds = None
62
- self.discriminator = None
63
-
64
- if type is not None:
65
- self.type = type
66
- self.name = name
67
- self.content_length = content_length
68
- if content_type is not None:
69
- self.content_type = content_type
70
- if last_modified_epoch_seconds is not None:
71
- self.last_modified_epoch_seconds = last_modified_epoch_seconds
72
-
73
- @property
74
- def type(self):
75
- """Gets the type of this StartBlobUploadRequest. # noqa: E501
76
-
77
- The type of the blob (one of \"dataset\", \"model\", \"inbox\") # noqa: E501
33
+
34
+ project_types = {
35
+ "type": "object",
36
+ "name": "str",
37
+ "content_length": "int",
38
+ "content_type": "str",
39
+ "last_modified_epoch_seconds": "int",
40
+ }
41
+
42
+ attribute_map = {
43
+ "type": "type",
44
+ "name": "name",
45
+ "content_length": "contentLength",
46
+ "content_type": "contentType",
47
+ "last_modified_epoch_seconds": "lastModifiedEpochSeconds",
48
+ }
49
+
50
+ def __init__(
51
+ self, type=None, name=None, content_length=None, content_type=None, last_modified_epoch_seconds=None
52
+ ): # noqa: E501
53
+ """StartBlobUploadRequest - a model defined in Swagger""" # noqa: E501
54
+
55
+ self._type = None
56
+ self._name = None
57
+ self._content_length = None
58
+ self._content_type = None
59
+ self._last_modified_epoch_seconds = None
60
+ self.discriminator = None
61
+
62
+ if type is not None:
63
+ self.type = type
64
+ self.name = name
65
+ self.content_length = content_length
66
+ if content_type is not None:
67
+ self.content_type = content_type
68
+ if last_modified_epoch_seconds is not None:
69
+ self.last_modified_epoch_seconds = last_modified_epoch_seconds
70
+
71
+ @property
72
+ def type(self):
73
+ """Gets the type of this StartBlobUploadRequest. # noqa: E501.
74
+
75
+ The type of the blob (one of \"dataset\", \"model\", \"inbox\") #
76
+ noqa: E501
78
77
 
79
78
  :return: The type of this StartBlobUploadRequest. # noqa: E501
80
79
  :rtype: object
81
80
  """
82
- return self._type
81
+ return self._type
83
82
 
84
- @type.setter
85
- def type(self, type):
86
- """Sets the type of this StartBlobUploadRequest.
83
+ @type.setter
84
+ def type(self, type):
85
+ """Sets the type of this StartBlobUploadRequest.
87
86
 
88
- The type of the blob (one of \"dataset\", \"model\", \"inbox\") # noqa: E501
87
+ The type of the blob (one of \"dataset\", \"model\", \"inbox\") #
88
+ noqa: E501
89
89
 
90
90
  :param type: The type of this StartBlobUploadRequest. # noqa: E501
91
91
  :type: object
92
92
  """
93
93
 
94
- self._type = type
94
+ self._type = type
95
95
 
96
- @property
97
- def name(self):
98
- """Gets the name of this StartBlobUploadRequest. # noqa: E501
96
+ @property
97
+ def name(self):
98
+ """Gets the name of this StartBlobUploadRequest. # noqa: E501.
99
99
 
100
100
  Name of the file # noqa: E501
101
101
 
102
102
  :return: The name of this StartBlobUploadRequest. # noqa: E501
103
103
  :rtype: str
104
104
  """
105
- return self._name
105
+ return self._name
106
106
 
107
- @name.setter
108
- def name(self, name):
109
- """Sets the name of this StartBlobUploadRequest.
107
+ @name.setter
108
+ def name(self, name):
109
+ """Sets the name of this StartBlobUploadRequest.
110
110
 
111
111
  Name of the file # noqa: E501
112
112
 
113
113
  :param name: The name of this StartBlobUploadRequest. # noqa: E501
114
114
  :type: str
115
115
  """
116
- if name is None:
117
- raise ValueError(
118
- "Invalid value for `name`, must not be `None`") # noqa: E501
116
+ if name is None:
117
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
119
118
 
120
- self._name = name
119
+ self._name = name
121
120
 
122
- @property
123
- def content_length(self):
124
- """Gets the content_length of this StartBlobUploadRequest. # noqa: E501
121
+ @property
122
+ def content_length(self):
123
+ """Gets the content_length of this StartBlobUploadRequest. # noqa: E501.
125
124
 
126
125
  Content length of the file in bytes # noqa: E501
127
126
 
128
- :return: The content_length of this StartBlobUploadRequest. # noqa: E501
127
+ :return: The content_length of this StartBlobUploadRequest. # noqa:
128
+ E501
129
129
  :rtype: int
130
130
  """
131
- return self._content_length
131
+ return self._content_length
132
132
 
133
- @content_length.setter
134
- def content_length(self, content_length):
135
- """Sets the content_length of this StartBlobUploadRequest.
133
+ @content_length.setter
134
+ def content_length(self, content_length):
135
+ """Sets the content_length of this StartBlobUploadRequest.
136
136
 
137
137
  Content length of the file in bytes # noqa: E501
138
138
 
139
- :param content_length: The content_length of this StartBlobUploadRequest. # noqa: E501
139
+ :param content_length: The content_length of this
140
+ StartBlobUploadRequest. # noqa: E501
140
141
  :type: int
141
142
  """
142
- if content_length is None:
143
- raise ValueError("Invalid value for `content_length`, must not be `None`"
144
- ) # noqa: E501
143
+ if content_length is None:
144
+ raise ValueError("Invalid value for `content_length`, must not be `None`") # noqa: E501
145
145
 
146
- self._content_length = content_length
146
+ self._content_length = content_length
147
147
 
148
- @property
149
- def content_type(self):
150
- """Gets the content_type of this StartBlobUploadRequest. # noqa: E501
148
+ @property
149
+ def content_type(self):
150
+ """Gets the content_type of this StartBlobUploadRequest. # noqa: E501.
151
151
 
152
152
  Content/MIME type (e.g. \"text/plain\") of the file # noqa: E501
153
153
 
154
- :return: The content_type of this StartBlobUploadRequest. # noqa: E501
154
+ :return: The content_type of this StartBlobUploadRequest. # noqa:
155
+ E501
155
156
  :rtype: str
156
157
  """
157
- return self._content_type
158
+ return self._content_type
158
159
 
159
- @content_type.setter
160
- def content_type(self, content_type):
161
- """Sets the content_type of this StartBlobUploadRequest.
160
+ @content_type.setter
161
+ def content_type(self, content_type):
162
+ """Sets the content_type of this StartBlobUploadRequest.
162
163
 
163
164
  Content/MIME type (e.g. \"text/plain\") of the file # noqa: E501
164
165
 
165
- :param content_type: The content_type of this StartBlobUploadRequest. # noqa: E501
166
+ :param content_type: The content_type of this
167
+ StartBlobUploadRequest. # noqa: E501
166
168
  :type: str
167
169
  """
168
170
 
169
- self._content_type = content_type
171
+ self._content_type = content_type
170
172
 
171
- @property
172
- def last_modified_epoch_seconds(self):
173
- """Gets the last_modified_epoch_seconds of this StartBlobUploadRequest. # noqa: E501
173
+ @property
174
+ def last_modified_epoch_seconds(self):
175
+ """Gets the last_modified_epoch_seconds of this StartBlobUploadRequest. #
176
+ noqa: E501.
174
177
 
175
- Last modified date of file in seconds since epoch in UTC # noqa: E501
178
+ Last modified date of file in seconds since epoch in UTC # noqa:
179
+ E501
176
180
 
177
- :return: The last_modified_epoch_seconds of this StartBlobUploadRequest. # noqa: E501
181
+ :return: The last_modified_epoch_seconds of this
182
+ StartBlobUploadRequest. # noqa: E501
178
183
  :rtype: int
179
184
  """
180
- return self._last_modified_epoch_seconds
185
+ return self._last_modified_epoch_seconds
181
186
 
182
- @last_modified_epoch_seconds.setter
183
- def last_modified_epoch_seconds(self, last_modified_epoch_seconds):
184
- """Sets the last_modified_epoch_seconds of this StartBlobUploadRequest.
187
+ @last_modified_epoch_seconds.setter
188
+ def last_modified_epoch_seconds(self, last_modified_epoch_seconds):
189
+ """Sets the last_modified_epoch_seconds of this StartBlobUploadRequest.
185
190
 
186
- Last modified date of file in seconds since epoch in UTC # noqa: E501
191
+ Last modified date of file in seconds since epoch in UTC # noqa:
192
+ E501
187
193
 
188
- :param last_modified_epoch_seconds: The last_modified_epoch_seconds of this StartBlobUploadRequest. # noqa: E501
194
+ :param last_modified_epoch_seconds: The last_modified_epoch_seconds
195
+ of this StartBlobUploadRequest. # noqa: E501
189
196
  :type: int
190
197
  """
191
198
 
192
- self._last_modified_epoch_seconds = last_modified_epoch_seconds
193
-
194
- def to_dict(self):
195
- """Returns the model properties as a dict"""
196
- result = {}
197
-
198
- for attr, _ in six.iteritems(self.project_types):
199
- value = getattr(self, attr)
200
- if isinstance(value, list):
201
- result[attr] = list(
202
- map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
203
- elif hasattr(value, "to_dict"):
204
- result[attr] = value.to_dict()
205
- elif isinstance(value, dict):
206
- result[attr] = dict(
207
- map(
208
- lambda item: (item[0], item[1].to_dict())
209
- if hasattr(item[1], "to_dict") else item, value.items()))
210
- else:
211
- result[attr] = value
212
-
213
- return result
214
-
215
- def to_str(self):
216
- """Returns the string representation of the model"""
217
- return pprint.pformat(self.to_dict())
218
-
219
- def __repr__(self):
220
- """For `print` and `pprint`"""
221
- return self.to_str()
222
-
223
- def __eq__(self, other):
224
- """Returns true if both objects are equal"""
225
- if not isinstance(other, StartBlobUploadRequest):
226
- return False
227
-
228
- return self.__dict__ == other.__dict__
229
-
230
- def __ne__(self, other):
231
- """Returns true if both objects are not equal"""
232
- return not self == other
199
+ self._last_modified_epoch_seconds = last_modified_epoch_seconds
200
+
201
+ def to_dict(self):
202
+ """Returns the model properties as a dict."""
203
+ result = {}
204
+
205
+ for attr, _ in six.iteritems(self.project_types):
206
+ value = getattr(self, attr)
207
+ if isinstance(value, list):
208
+ result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
209
+ elif hasattr(value, "to_dict"):
210
+ result[attr] = value.to_dict()
211
+ elif isinstance(value, dict):
212
+ result[attr] = dict(
213
+ map(
214
+ lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
215
+ value.items(),
216
+ )
217
+ )
218
+ else:
219
+ result[attr] = value
220
+
221
+ return result
222
+
223
+ def to_str(self):
224
+ """Returns the string representation of the model."""
225
+ return pprint.pformat(self.to_dict())
226
+
227
+ def __repr__(self):
228
+ """For `print` and `pprint`"""
229
+ return self.to_str()
230
+
231
+ def __eq__(self, other):
232
+ """Returns true if both objects are equal."""
233
+ if not isinstance(other, StartBlobUploadRequest):
234
+ return False
235
+
236
+ return self.__dict__ == other.__dict__
237
+
238
+ def __ne__(self, other):
239
+ """Returns true if both objects are not equal."""
240
+ return not self == other
@@ -23,115 +23,120 @@ import six
23
23
 
24
24
 
25
25
  class StartBlobUploadResponse(object):
26
- """
26
+ """
27
27
  Attributes:
28
28
  project_types (dict): The key is attribute name
29
29
  and the value is attribute type.
30
30
  attribute_map (dict): The key is attribute name
31
31
  and the value is json key in definition.
32
32
  """
33
- project_types = {'token': 'str', 'create_url': 'str'}
34
33
 
35
- attribute_map = {'token': 'token', 'create_url': 'createUrl'}
34
+ project_types = {"token": "str", "create_url": "str"}
35
+
36
+ attribute_map = {"token": "token", "create_url": "createUrl"}
36
37
 
37
- def __init__(self, token=None, create_url=None): # noqa: E501
38
- """StartBlobUploadResponse - a model defined in Swagger""" # noqa: E501
38
+ def __init__(self, token=None, create_url=None): # noqa: E501
39
+ """StartBlobUploadResponse - a model defined in Swagger""" # noqa: E501
39
40
 
40
- self._token = None
41
- self._create_url = None
42
- self.discriminator = None
41
+ self._token = None
42
+ self._create_url = None
43
+ self.discriminator = None
43
44
 
44
- self.token = token
45
- self.create_url = create_url
45
+ self.token = token
46
+ self.create_url = create_url
46
47
 
47
- @property
48
- def token(self):
49
- """Gets the token of this StartBlobUploadResponse. # noqa: E501
48
+ @property
49
+ def token(self):
50
+ """Gets the token of this StartBlobUploadResponse. # noqa: E501.
50
51
 
51
- Opaque string token used to reference the new blob/file. # noqa: E501
52
+ Opaque string token used to reference the new blob/file. # noqa:
53
+ E501
52
54
 
53
55
  :return: The token of this StartBlobUploadResponse. # noqa: E501
54
56
  :rtype: str
55
57
  """
56
- return self._token
58
+ return self._token
57
59
 
58
- @token.setter
59
- def token(self, token):
60
- """Sets the token of this StartBlobUploadResponse.
60
+ @token.setter
61
+ def token(self, token):
62
+ """Sets the token of this StartBlobUploadResponse.
61
63
 
62
- Opaque string token used to reference the new blob/file. # noqa: E501
64
+ Opaque string token used to reference the new blob/file. # noqa:
65
+ E501
63
66
 
64
- :param token: The token of this StartBlobUploadResponse. # noqa: E501
67
+ :param token: The token of this StartBlobUploadResponse. # noqa:
68
+ E501
65
69
  :type: str
66
70
  """
67
- if token is None:
68
- raise ValueError(
69
- "Invalid value for `token`, must not be `None`") # noqa: E501
71
+ if token is None:
72
+ raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501
70
73
 
71
- self._token = token
74
+ self._token = token
72
75
 
73
- @property
74
- def create_url(self):
75
- """Gets the create_url of this StartBlobUploadResponse. # noqa: E501
76
+ @property
77
+ def create_url(self):
78
+ """Gets the create_url of this StartBlobUploadResponse. # noqa: E501.
76
79
 
77
80
  URL to use to start the upload. # noqa: E501
78
81
 
79
- :return: The create_url of this StartBlobUploadResponse. # noqa: E501
82
+ :return: The create_url of this StartBlobUploadResponse. # noqa:
83
+ E501
80
84
  :rtype: str
81
85
  """
82
- return self._create_url
86
+ return self._create_url
83
87
 
84
- @create_url.setter
85
- def create_url(self, create_url):
86
- """Sets the create_url of this StartBlobUploadResponse.
88
+ @create_url.setter
89
+ def create_url(self, create_url):
90
+ """Sets the create_url of this StartBlobUploadResponse.
87
91
 
88
92
  URL to use to start the upload. # noqa: E501
89
93
 
90
- :param create_url: The create_url of this StartBlobUploadResponse. # noqa: E501
94
+ :param create_url: The create_url of this StartBlobUploadResponse. #
95
+ noqa: E501
91
96
  :type: str
92
97
  """
93
- if create_url is None:
94
- raise ValueError(
95
- "Invalid value for `create_url`, must not be `None`") # noqa: E501
96
-
97
- self._create_url = create_url
98
-
99
- def to_dict(self):
100
- """Returns the model properties as a dict"""
101
- result = {}
102
-
103
- for attr, _ in six.iteritems(self.project_types):
104
- value = getattr(self, attr)
105
- if isinstance(value, list):
106
- result[attr] = list(
107
- map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
108
- elif hasattr(value, "to_dict"):
109
- result[attr] = value.to_dict()
110
- elif isinstance(value, dict):
111
- result[attr] = dict(
112
- map(
113
- lambda item: (item[0], item[1].to_dict())
114
- if hasattr(item[1], "to_dict") else item, value.items()))
115
- else:
116
- result[attr] = value
117
-
118
- return result
119
-
120
- def to_str(self):
121
- """Returns the string representation of the model"""
122
- return pprint.pformat(self.to_dict())
123
-
124
- def __repr__(self):
125
- """For `print` and `pprint`"""
126
- return self.to_str()
127
-
128
- def __eq__(self, other):
129
- """Returns true if both objects are equal"""
130
- if not isinstance(other, StartBlobUploadResponse):
131
- return False
132
-
133
- return self.__dict__ == other.__dict__
134
-
135
- def __ne__(self, other):
136
- """Returns true if both objects are not equal"""
137
- return not self == other
98
+ if create_url is None:
99
+ raise ValueError("Invalid value for `create_url`, must not be `None`") # noqa: E501
100
+
101
+ self._create_url = create_url
102
+
103
+ def to_dict(self):
104
+ """Returns the model properties as a dict."""
105
+ result = {}
106
+
107
+ for attr, _ in six.iteritems(self.project_types):
108
+ value = getattr(self, attr)
109
+ if isinstance(value, list):
110
+ result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
111
+ elif hasattr(value, "to_dict"):
112
+ result[attr] = value.to_dict()
113
+ elif isinstance(value, dict):
114
+ result[attr] = dict(
115
+ map(
116
+ lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
117
+ value.items(),
118
+ )
119
+ )
120
+ else:
121
+ result[attr] = value
122
+
123
+ return result
124
+
125
+ def to_str(self):
126
+ """Returns the string representation of the model."""
127
+ return pprint.pformat(self.to_dict())
128
+
129
+ def __repr__(self):
130
+ """For `print` and `pprint`"""
131
+ return self.to_str()
132
+
133
+ def __eq__(self, other):
134
+ """Returns true if both objects are equal."""
135
+ if not isinstance(other, StartBlobUploadResponse):
136
+ return False
137
+
138
+ return self.__dict__ == other.__dict__
139
+
140
+ def __ne__(self, other):
141
+ """Returns true if both objects are not equal."""
142
+ return not self == other