@@ -1374,9 +1374,9 @@ def input_file_bytes(self):
13741374 :returns: the count (None until set from the server).
13751375 :raises: ValueError for invalid value types.
13761376 """
1377- statistics = self . _properties . get ( 'statistics' )
1378- if statistics is not None :
1379- return int ( statistics [ 'load' ][ 'inputFileBytes' ] )
1377+ return _helpers . _int_or_none ( _helpers . _get_sub_prop (
1378+ self . _properties , [ 'statistics' , 'load' , 'inputFileBytes' ]
1379+ ) )
13801380
13811381 @property
13821382 def input_files (self ):
@@ -1385,9 +1385,9 @@ def input_files(self):
13851385 :rtype: int, or ``NoneType``
13861386 :returns: the count (None until set from the server).
13871387 """
1388- statistics = self . _properties . get ( 'statistics' )
1389- if statistics is not None :
1390- return int ( statistics [ 'load' ][ 'inputFiles' ] )
1388+ return _helpers . _int_or_none ( _helpers . _get_sub_prop (
1389+ self . _properties , [ 'statistics' , 'load' , 'inputFiles' ]
1390+ ) )
13911391
13921392 @property
13931393 def output_bytes (self ):
@@ -1396,9 +1396,9 @@ def output_bytes(self):
13961396 :rtype: int, or ``NoneType``
13971397 :returns: the count (None until set from the server).
13981398 """
1399- statistics = self . _properties . get ( 'statistics' )
1400- if statistics is not None :
1401- return int ( statistics [ 'load' ][ 'outputBytes' ] )
1399+ return _helpers . _int_or_none ( _helpers . _get_sub_prop (
1400+ self . _properties , [ 'statistics' , 'load' , 'outputBytes' ]
1401+ ) )
14021402
14031403 @property
14041404 def output_rows (self ):
@@ -1407,9 +1407,9 @@ def output_rows(self):
14071407 :rtype: int, or ``NoneType``
14081408 :returns: the count (None until set from the server).
14091409 """
1410- statistics = self . _properties . get ( 'statistics' )
1411- if statistics is not None :
1412- return int ( statistics [ 'load' ][ 'outputRows' ] )
1410+ return _helpers . _int_or_none ( _helpers . _get_sub_prop (
1411+ self . _properties , [ 'statistics' , 'load' , 'outputRows' ]
1412+ ) )
14131413
14141414 def to_api_repr (self ):
14151415 """Generate a resource for :meth:`_begin`."""
0 commit comments