Sets the payload of the message and eventually the Content-Type

        :param value: the payload
198235
def payload(self, value):
        
        if isinstance(value, tuple):
            content_type, payload = value
            self.content_type = content_type
            self._payload = payload
        else:
            self._payload = value
113991
def set(self, value, parse=False):
        
        self.value = self.parse(value) if parse else value
145502
def token(self, value):
        
        if value and not isinstance(value, Token):
            value = Token(value)
        self._token = value
726094
def set_payload(self, payload, charset=None):
        
        self._payload = payload
        if charset is not None:
            self.set_charset(charset)
1039388
def extension(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "extension", value)
        self.__extension = value
46313
def set(self, value):
        

        if not isinstance(value, byte_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a byte string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._bytes = value
        self.contents = value
        self._header = None
        if self._indefinite:
            self._indefinite = False
            self.method = 0
        if self._trailer != b'':
            self._trailer = b''
345122
def value(self, value):
        
        try:
            struct.pack('>' + conf.TYPE_CHAR, value)
        except struct.error:
            raise IllegalDataValueError

        self._value = value
930852
def set(self, field, value = None):
        
        if value is None and isinstance(field, dict):
            self.content(field)
        if field and value:
            self.data[field] = value
        return self
310703
def set_value(self, value: datetime):
        
        assert isinstance(value, datetime)

        self.value = value
1344257
public function setContent(\AgentSIB\Diadoc\Api\Proto\Content_v2 $value = null)
    {
        $this->Content = $value;
    }
639025
final void setJsMessageType(MessageType value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJsMessageType", value);
        /* Get the int value of the MessageType and set that into the field */
        jmo.setField(JsHdrAccess.MESSAGETYPE, value.toByte());
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJsMessageType");
    }
201293
def set_value(self, value):
        
        self.raw_value = self.preference.serializer.serialize(value)
537190
public void setResponse(byte[] contentType, byte[] value) {
        int valueSize = (value == null) ? 0 : value.length;
        byte[] len = stringToBytes(String.valueOf(valueSize));
        int size = RES_200.length;
        if (contentType != null) {
            size += CONTENT_TYPE.length;
            size += contentType.length;
            size += TextCommandConstants.RETURN.length;
        }
        size += CONTENT_LENGTH.length;
        size += len.length;
        size += TextCommandConstants.RETURN.length;
        size += TextCommandConstants.RETURN.length;
        size += valueSize;
        this.response = ByteBuffer.allocate(size);
        response.put(RES_200);
        if (contentType != null) {
            response.put(CONTENT_TYPE);
            response.put(contentType);
            response.put(TextCommandConstants.RETURN);
        }
        response.put(CONTENT_LENGTH);
        response.put(len);
        response.put(TextCommandConstants.RETURN);
        response.put(TextCommandConstants.RETURN);
        if (value != null) {
            response.put(value);
        }
        response.flip();
    }
991574
def set(self, value):
        
        # check a few things up front
        if not isinstance(value, self.TYPES[self.type]['type']):
            badtype = type(value).__name__
            raise BadRequest('Invalid value for %s: a %s is required, not %s' % (self.id, self.type, badtype))
        if self.enumValues and value not in self.enumValues:
            raise BadRequest('Invalid value for %s: %s not in %s' % (self.id, value, list(self.enumValues)))
        # store value off to the side until we call settings.save()
        tostr = self.TYPES[self.type]['tostr']
        self._setValue = tostr(value)
812863
def set_text(self, text):
        
        log = logging.getLogger(self.cls_logger + '.set_text')
        if not isinstance(text, basestring):
            msg = 'text arg must be a string'
            log.error(msg)
            raise ValueError(msg)
        self.payload['text'] = text
        log.debug('Set message text to: {t}'.format(t=text))
526667
def _parse_content_type(self, value):
        
        content_type, params = parse_header(value)
        if 'charset' in params:
            charset = params['charset']
        else:
            charset = None
        return content_type, charset
170412
def message(self, value):
        
        if value == self._defaults['message'] and 'message' in self._values:
            del self._values['message']
        else:
            self._values['message'] = value