@@ -153,30 +153,12 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
153
153
self .hub_content_version : str = json_obj ["hub_content_version" ]
154
154
self .hub_name : str = json_obj ["hub_name" ]
155
155
156
- def to_json (self ) -> Dict [str , Any ]:
157
- """Returns json representation of DescribeHubContentsResponse object."""
158
- json_obj = {}
159
- for att in self .__slots__ :
160
- if hasattr (self , att ):
161
- cur_val = getattr (self , att )
162
- if issubclass (type (cur_val ), JumpStartDataHolderType ):
163
- json_obj [att ] = cur_val .to_json ()
164
- elif isinstance (cur_val , list ):
165
- json_obj [att ] = []
166
- for obj in cur_val :
167
- if issubclass (type (obj ), JumpStartDataHolderType ):
168
- json_obj [att ].append (obj .to_json ())
169
- else :
170
- json_obj [att ].append (obj )
171
- else :
172
- json_obj [att ] = cur_val
173
- return json_obj
174
-
175
156
176
157
class HubS3StorageConfig (JumpStartDataHolderType ):
177
158
"""Data class for any dependencies related to hub content.
178
159
179
- Includes scripts, model artifacts, datasets, or notebooks."""
160
+ Includes scripts, model artifacts, datasets, or notebooks.
161
+ """
180
162
181
163
__slots__ = ["s3_output_path" ]
182
164
@@ -245,22 +227,3 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
245
227
self .s3_storage_config : HubS3StorageConfig = HubS3StorageConfig (
246
228
json_obj ["s3_storage_config" ]
247
229
)
248
-
249
- def to_json (self ) -> Dict [str , Any ]:
250
- """Returns json representation of DescribeHubContentsResponse object."""
251
- json_obj = {}
252
- for att in self .__slots__ :
253
- if hasattr (self , att ):
254
- cur_val = getattr (self , att )
255
- if issubclass (type (cur_val ), JumpStartDataHolderType ):
256
- json_obj [att ] = cur_val .to_json ()
257
- elif isinstance (cur_val , list ):
258
- json_obj [att ] = []
259
- for obj in cur_val :
260
- if issubclass (type (obj ), JumpStartDataHolderType ):
261
- json_obj [att ].append (obj .to_json ())
262
- else :
263
- json_obj [att ].append (obj )
264
- else :
265
- json_obj [att ] = cur_val
266
- return json_obj
0 commit comments