@@ -2701,8 +2701,10 @@ class Model():
2701
2701
:attr str description: (optional) Model description.
2702
2702
:attr str workspace_id: (optional) ID of the Watson Knowledge Studio workspace
2703
2703
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.
2706
2708
:attr str version_description: (optional) The description of the version, if it
2707
2709
was manually provided in Watson Knowledge Studio.
2708
2710
:attr datetime created: (optional) A dateTime indicating when the model was
@@ -2716,6 +2718,7 @@ def __init__(self,
2716
2718
language : str = None ,
2717
2719
description : str = None ,
2718
2720
workspace_id : str = None ,
2721
+ model_version : str = None ,
2719
2722
version : str = None ,
2720
2723
version_description : str = None ,
2721
2724
created : datetime = None ) -> None :
@@ -2730,8 +2733,10 @@ def __init__(self,
2730
2733
:param str description: (optional) Model description.
2731
2734
:param str workspace_id: (optional) ID of the Watson Knowledge Studio
2732
2735
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
2734
2737
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.
2735
2740
:param str version_description: (optional) The description of the version,
2736
2741
if it was manually provided in Watson Knowledge Studio.
2737
2742
:param datetime created: (optional) A dateTime indicating when the model
@@ -2742,6 +2747,7 @@ def __init__(self,
2742
2747
self .language = language
2743
2748
self .description = description
2744
2749
self .workspace_id = workspace_id
2750
+ self .model_version = model_version
2745
2751
self .version = version
2746
2752
self .version_description = version_description
2747
2753
self .created = created
@@ -2752,7 +2758,7 @@ def from_dict(cls, _dict: Dict) -> 'Model':
2752
2758
args = {}
2753
2759
valid_keys = [
2754
2760
'status' , 'model_id' , 'language' , 'description' , 'workspace_id' ,
2755
- 'version' , 'version_description' , 'created'
2761
+ 'model_version' , ' version' , 'version_description' , 'created'
2756
2762
]
2757
2763
bad_keys = set (_dict .keys ()) - set (valid_keys )
2758
2764
if bad_keys :
@@ -2769,6 +2775,8 @@ def from_dict(cls, _dict: Dict) -> 'Model':
2769
2775
args ['description' ] = _dict .get ('description' )
2770
2776
if 'workspace_id' in _dict :
2771
2777
args ['workspace_id' ] = _dict .get ('workspace_id' )
2778
+ if 'model_version' in _dict :
2779
+ args ['model_version' ] = _dict .get ('model_version' )
2772
2780
if 'version' in _dict :
2773
2781
args ['version' ] = _dict .get ('version' )
2774
2782
if 'version_description' in _dict :
@@ -2795,6 +2803,8 @@ def to_dict(self) -> Dict:
2795
2803
_dict ['description' ] = self .description
2796
2804
if hasattr (self , 'workspace_id' ) and self .workspace_id is not None :
2797
2805
_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
2798
2808
if hasattr (self , 'version' ) and self .version is not None :
2799
2809
_dict ['version' ] = self .version
2800
2810
if hasattr (
0 commit comments