parameters: (self, message)
docstring: Serializes if message is a google.protobuf.Any field.
docstring_summary: Serializes if message is a google.protobuf.Any field.
docstring_tokens: Serializes if message is a google . protobuf . Any field .
function: def _TryPrintAsAnyMessage(self, message):
      """Serializes if message is a google.protobuf.Any field."""
      if '/' not in message.type_url:
        return False
      packed_message = _BuildMessageFromTypeName(message.TypeName(),
                                                 self.descriptor_pool)
      if packed_message:
        packed_message.MergeFromString(message.value)
        colon = ':' if self.force_colon else ''
        self.out.write('%s[%s]%s ' % (self.indent * ' ', message.type_url, colon))
        self._PrintMessageFieldValue(packed_message)
        self.out.write(' ' if self.as_one_line else '\n')
        return True
      else:
        return False
function_tokens: def _TryPrintAsAnyMessage ( self , message ) : if '/' not in message . type_url : return False packed_message = _BuildMessageFromTypeName ( message . TypeName ( ) , self . descriptor_pool ) if packed_message : packed_message . MergeFromString ( message . value ) colon = ':' if self . force_colon else '' self . out . write ( '%s[%s]%s ' % ( self . indent * ' ' , message . type_url , colon ) ) self . _PrintMessageFieldValue ( packed_message ) self . out . write ( ' ' if self . as_one_line else '\n' ) return True else : return False