@@ -6224,60 +6224,60 @@ class TrainingWarning(object):
62246224 """
62256225 A warning from training of a custom language or custom acoustic model.
62266226
6227- :attr str description: A warning message that lists the invalid resources that are
6227+ :attr str code: An identifier for the type of invalid resources listed in the
6228+ `description` field.
6229+ :attr str message: A warning message that lists the invalid resources that are
62286230 excluded from the custom model's training. The message has the following format:
62296231 `Analysis of the following {resource_type} has not completed successfully:
62306232 [{resource_names}]. They will be excluded from custom {model_type} model training.`.
6231- :attr str warning_id: An identifier for the type of invalid resources listed in the
6232- `description` field.
62336233 """
62346234
6235- def __init__ (self , description , warning_id ):
6235+ def __init__ (self , code , message ):
62366236 """
62376237 Initialize a TrainingWarning object.
62386238
6239- :param str description: A warning message that lists the invalid resources that
6240- are excluded from the custom model's training. The message has the following
6241- format: `Analysis of the following {resource_type} has not completed successfully:
6239+ :param str code: An identifier for the type of invalid resources listed in the
6240+ `description` field.
6241+ :param str message: A warning message that lists the invalid resources that are
6242+ excluded from the custom model's training. The message has the following format:
6243+ `Analysis of the following {resource_type} has not completed successfully:
62426244 [{resource_names}]. They will be excluded from custom {model_type} model
62436245 training.`.
6244- :param str warning_id: An identifier for the type of invalid resources listed in
6245- the `description` field.
62466246 """
6247- self .description = description
6248- self .warning_id = warning_id
6247+ self .code = code
6248+ self .message = message
62496249
62506250 @classmethod
62516251 def _from_dict (cls , _dict ):
62526252 """Initialize a TrainingWarning object from a json dictionary."""
62536253 args = {}
6254- validKeys = ['description ' , 'warning_id ' ]
6254+ validKeys = ['code ' , 'message ' ]
62556255 badKeys = set (_dict .keys ()) - set (validKeys )
62566256 if badKeys :
62576257 raise ValueError (
62586258 'Unrecognized keys detected in dictionary for class TrainingWarning: '
62596259 + ', ' .join (badKeys ))
6260- if 'description ' in _dict :
6261- args ['description ' ] = _dict .get ('description ' )
6260+ if 'code ' in _dict :
6261+ args ['code ' ] = _dict .get ('code ' )
62626262 else :
62636263 raise ValueError (
6264- 'Required property \' description \' not present in TrainingWarning JSON'
6264+ 'Required property \' code \' not present in TrainingWarning JSON'
62656265 )
6266- if 'warning_id ' in _dict :
6267- args ['warning_id ' ] = _dict .get ('warning_id ' )
6266+ if 'message ' in _dict :
6267+ args ['message ' ] = _dict .get ('message ' )
62686268 else :
62696269 raise ValueError (
6270- 'Required property \' warning_id \' not present in TrainingWarning JSON'
6270+ 'Required property \' message \' not present in TrainingWarning JSON'
62716271 )
62726272 return cls (** args )
62736273
62746274 def _to_dict (self ):
62756275 """Return a json dictionary representing this model."""
62766276 _dict = {}
6277- if hasattr (self , 'description ' ) and self .description is not None :
6278- _dict ['description ' ] = self .description
6279- if hasattr (self , 'warning_id ' ) and self .warning_id is not None :
6280- _dict ['warning_id ' ] = self .warning_id
6277+ if hasattr (self , 'code ' ) and self .code is not None :
6278+ _dict ['code ' ] = self .code
6279+ if hasattr (self , 'message ' ) and self .message is not None :
6280+ _dict ['message ' ] = self .message
62816281 return _dict
62826282
62836283 def __str__ (self ):
0 commit comments