@@ -130,7 +130,7 @@ def __init__(
130
130
class JumpStartModelHeader (JumpStartDataHolderType ):
131
131
"""Data class JumpStart model header."""
132
132
133
- __slots__ = ["model_id" , "version" , "min_version" , "spec_key" ]
133
+ __slots__ = ["model_id" , "version" , "min_version" , "spec_key" , "search_keywords" ]
134
134
135
135
def __init__ (self , header : Dict [str , str ]):
136
136
"""Initializes a JumpStartModelHeader object from its json representation.
@@ -142,7 +142,11 @@ def __init__(self, header: Dict[str, str]):
142
142
143
143
def to_json (self ) -> Dict [str , str ]:
144
144
"""Returns json representation of JumpStartModelHeader object."""
145
- json_obj = {att : getattr (self , att ) for att in self .__slots__ if hasattr (self , att )}
145
+ json_obj = {
146
+ att : getattr (self , att )
147
+ for att in self .__slots__
148
+ if getattr (self , att , None ) is not None
149
+ }
146
150
return json_obj
147
151
148
152
def from_json (self , json_obj : Dict [str , str ]) -> None :
@@ -155,6 +159,7 @@ def from_json(self, json_obj: Dict[str, str]) -> None:
155
159
self .version : str = json_obj ["version" ]
156
160
self .min_version : str = json_obj ["min_version" ]
157
161
self .spec_key : str = json_obj ["spec_key" ]
162
+ self .search_keywords : Optional [List [str ]] = json_obj .get ("search_keywords" )
158
163
159
164
160
165
class JumpStartECRSpecs (JumpStartDataHolderType ):
0 commit comments