#NEWLINE# def _entry_from_resource( self , resource , loggers ) : #NEWLINE# #INDENT# 'Detect correct entry type from resource and instantiate.\n\n        :type resource: dict\n        :param resource: one entry resource from API response\n\n        :type loggers: dict or None\n        :param loggers: A mapping of logger fullnames -> loggers.  If not\n                        passed, the entry will have a newly-created logger.\n\n        :rtype; One of:\n                :class:`gcloud.logging.entries.TextEntry`,\n                :class:`gcloud.logging.entries.StructEntry`,\n                :class:`gcloud.logging.entries.ProtobufEntry`\n        :returns: the entry instance, constructed via the resource\n        ' #NEWLINE# if ( 'textPayload' in resource ) : #NEWLINE# #INDENT# return TextEntry . from_api_repr ( resource , resource , loggers ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'jsonPayload' in resource ) : #NEWLINE# #INDENT# return StructEntry . from_api_repr ( resource , self , loggers ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'protoPayload' in resource ) : #NEWLINE# #INDENT# return ProtobufEntry . from_api_repr ( resource , self , loggers ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# raise ValueError ( 'Cannot parse log entry resource' )