@@ -2701,8 +2701,10 @@ class Model():
27012701 :attr str description: (optional) Model description.
27022702 :attr str workspace_id: (optional) ID of the Watson Knowledge Studio workspace
27032703 that deployed this model to Natural Language Understanding.
2704- :attr str version: (optional) The model version, if it was manually provided in
2705- Watson Knowledge Studio.
2704+ :attr str model_version: (optional) The model version, if it was manually
2705+ provided in Watson Knowledge Studio.
2706+ :attr str version: (optional) (Deprecated — use `model_version`) The model
2707+ version, if it was manually provided in Watson Knowledge Studio.
27062708 :attr str version_description: (optional) The description of the version, if it
27072709 was manually provided in Watson Knowledge Studio.
27082710 :attr datetime created: (optional) A dateTime indicating when the model was
@@ -2716,6 +2718,7 @@ def __init__(self,
27162718 language : str = None ,
27172719 description : str = None ,
27182720 workspace_id : str = None ,
2721+ model_version : str = None ,
27192722 version : str = None ,
27202723 version_description : str = None ,
27212724 created : datetime = None ) -> None :
@@ -2730,8 +2733,10 @@ def __init__(self,
27302733 :param str description: (optional) Model description.
27312734 :param str workspace_id: (optional) ID of the Watson Knowledge Studio
27322735 workspace that deployed this model to Natural Language Understanding.
2733- :param str version : (optional) The model version, if it was manually
2736+ :param str model_version : (optional) The model version, if it was manually
27342737 provided in Watson Knowledge Studio.
2738+ :param str version: (optional) (Deprecated — use `model_version`) The model
2739+ version, if it was manually provided in Watson Knowledge Studio.
27352740 :param str version_description: (optional) The description of the version,
27362741 if it was manually provided in Watson Knowledge Studio.
27372742 :param datetime created: (optional) A dateTime indicating when the model
@@ -2742,6 +2747,7 @@ def __init__(self,
27422747 self .language = language
27432748 self .description = description
27442749 self .workspace_id = workspace_id
2750+ self .model_version = model_version
27452751 self .version = version
27462752 self .version_description = version_description
27472753 self .created = created
@@ -2752,7 +2758,7 @@ def from_dict(cls, _dict: Dict) -> 'Model':
27522758 args = {}
27532759 valid_keys = [
27542760 'status' , 'model_id' , 'language' , 'description' , 'workspace_id' ,
2755- 'version' , 'version_description' , 'created'
2761+ 'model_version' , ' version' , 'version_description' , 'created'
27562762 ]
27572763 bad_keys = set (_dict .keys ()) - set (valid_keys )
27582764 if bad_keys :
@@ -2769,6 +2775,8 @@ def from_dict(cls, _dict: Dict) -> 'Model':
27692775 args ['description' ] = _dict .get ('description' )
27702776 if 'workspace_id' in _dict :
27712777 args ['workspace_id' ] = _dict .get ('workspace_id' )
2778+ if 'model_version' in _dict :
2779+ args ['model_version' ] = _dict .get ('model_version' )
27722780 if 'version' in _dict :
27732781 args ['version' ] = _dict .get ('version' )
27742782 if 'version_description' in _dict :
@@ -2795,6 +2803,8 @@ def to_dict(self) -> Dict:
27952803 _dict ['description' ] = self .description
27962804 if hasattr (self , 'workspace_id' ) and self .workspace_id is not None :
27972805 _dict ['workspace_id' ] = self .workspace_id
2806+ if hasattr (self , 'model_version' ) and self .model_version is not None :
2807+ _dict ['model_version' ] = self .model_version
27982808 if hasattr (self , 'version' ) and self .version is not None :
27992809 _dict ['version' ] = self .version
28002810 if hasattr (
0 commit comments