def serialize(self, buff):
    '\n    serialize message into buffer\n    :param buff: buffer, ``StringIO``\n    '
    try:
        buff.write(_get_struct_B().pack(self.success))
        _x = self.status_message
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
    except struct.error as se:
        self._check_types(struct.error(("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))))
    except TypeError as te:
        self._check_types(ValueError(("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))))
serialize message into buffer
:param buff: buffer, ``StringIO``
def serialize(self, buff):
    '\n    serialize message into buffer\n    :param buff: buffer, ``StringIO``\n    '
    try:
        buff.write(_get_struct_B().pack(self.success))
        _x = self.status_message
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
    except struct.error as se:
        self._check_types(struct.error(("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))))
    except TypeError as te:
        self._check_types(ValueError(("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))))