Constructs the actual underlying message with provided values
334388
def _setup_message(self):
        """"""
        if self.content == 'html':
            self._message = MIMEMultipart('alternative')
            part = MIMEText(self.body, 'html', 'UTF-8')
        else:
            self._message = MIMEMultipart()
            part = MIMEText(self.body, 'plain', 'UTF-8')
        self._message.preamble = 'Multipart massage.\n'
        self._message.attach(part)
        self._message['From'] = self.sender
        self._message['To'] = COMMASPACE.join(self.to)
        if self.cc:
            self._message['Cc'] = COMMASPACE.join(self.cc)
        self._message['Date'] = formatdate(localtime=True)
        self._message['Subject'] = self.subject
        for part in self._parts:
            self._message.attach(part)
627606
function PartiallyAppliedMessage(underlyingMessage, payload) {

  function message(...otherPayloads) {
    return underlyingMessage.apply(null, [payload, ...otherPayloads])
  }

  message.type = 'partiallyAppliedMessage'

  message._id = underlyingMessage._id
  message._name = underlyingMessage._name
  message._isMessage = true

  message.with = withPayload

  // Used for VDOM Diffing (See util/shallowEqual)
  message.payload = payload

  return message
}
937864
def _ConvertWrapperMessage(self, value, message):
    """"""
    field = message.DESCRIPTOR.fields_by_name['value']
    setattr(message, 'value', _ConvertScalarFieldValue(value, field))
784343
def from_raw_message(cls, rawmessage):
        """"""
        userdata_dict = Userdata(rawmessage[8:22])
        return ExtendedSend(rawmessage[2:5],
                            {'cmd1': rawmessage[6],
                             'cmd2': rawmessage[7]},
                            userdata_dict,
                            flags=rawmessage[5],
                            acknak=rawmessage[22:23])
989246
def build_message(self):
        '''
        '''
        if self._text is None:
            raise InvalidPayloadError('text is required')

        message = {
            'text': self._text,
            'markdown': self._markdown
        }

        if self._channel != Incoming.DEFAULT_CHANNEL:
            message['channel'] = self._channel

        if self._attachments:
            message['attachments'] = []
            for attachment in self._attachments:
                if 'title' not in attachment and 'text' not in attachment:
                    raise InvalidPayloadError('title or text is required')
                message['attachments'].append(attachment)

        return message
947521
private String buildValidationErrorMessage(String message, Object expectedValue, Object actualValue) {
        return message + ", expected '" + expectedValue + "' but was '" + actualValue + "'";
    }
1284235
def from_raw_message(cls, rawmessage):
        """"""
        if (rawmessage[5] &
                MESSAGE_FLAG_EXTENDED_0X10) == MESSAGE_FLAG_EXTENDED_0X10:
            if len(rawmessage) >= ExtendedSend.receivedSize:
                msg = ExtendedSend.from_raw_message(rawmessage)
            else:
                msg = None
        else:
            msg = StandardSend(rawmessage[2:5],
                               {'cmd1': rawmessage[6],
                                'cmd2': rawmessage[7]},
                               flags=rawmessage[5],
                               acknak=rawmessage[8:9])
        return msg
261599
private static String createMessage(String fieldName, Number value,
                                        Number lowerBound, Number upperBound, String explain) {
        StringBuilder buf = new StringBuilder()
            .append("Value ").append(value).append(" for ").append(fieldName).append(' ');

        if (lowerBound == null) {
            if (upperBound == null) {
                buf.append("is not supported");
            } else {
                buf.append("must not be larger than ").append(upperBound);
            }
        } else if (upperBound == null) {
            buf.append("must not be smaller than ").append(lowerBound);
        } else {
            buf.append("must be in the range [")
                .append(lowerBound)
                .append(',')
                .append(upperBound)
                .append(']');
        }
        if (explain != null) {
            buf.append(": ").append(explain);
        }

        return buf.toString();
    }
258406
def actual_value(node, multi_keys)
      multi_keys.inject(node) { |n, key|
        if n
          key == :source ? n.send(key) : n.send(key)
        end
      }
    end
1123053
def prepare_message(self, message_data, delivery_mode,
                        content_type, content_encoding, **kwargs):
        """"""
        return (message_data, content_type, content_encoding)
1153988
def from_raw_message(cls, rawmessage):
        """"""
        userdata = Userdata.from_raw_message(rawmessage[11:25])
        return ExtendedReceive(rawmessage[2:5],
                               rawmessage[5:8],
                               {'cmd1': rawmessage[9],
                                'cmd2': rawmessage[10]},
                               userdata,
                               flags=rawmessage[8])
428174
def make_messages(context: Context, javascript=False, fuzzy=False):
    
    kwargs = {
        'all': True,
        'keep_pot': True,
        'no_wrap': True,
    }
    if fuzzy:
        kwargs['allow_fuzzy'] = True
    if javascript:
        kwargs.update(domain='djangojs', ignore_patterns=['*.bundle.js'])
    with in_dir(context.app.django_app_name):
        return context.management_command('makemessages', **kwargs)
310616
def created(message):
    """"""

    def create(value, _context, **_params):
        return Created(value, message)

    return create
471959
private static String constructMessage(String property, 
                                         String newVal, String oldVal) {
    String message = "Could not change property " + property;
    if (oldVal != null) {
      message += " from \'" + oldVal;
    }
    if (newVal != null) {
      message += "\' to \'" + newVal + "\'";
    }
    return message;
  }
737882
private static final String createMessage(Object illegalContext, Set<Class<?>> applicableContexts) {
		
		StringBuilder stringBuilder = new StringBuilder();
		
		stringBuilder.append("The given context ");
		stringBuilder.append(illegalContext.getClass().getName());
		stringBuilder.append(" is illegal");
		
		if(applicableContexts != null && applicableContexts.size() > 0) {
			
			stringBuilder.append(". The only applicable contexts are");
			
			for (Class<?> contextClass : applicableContexts) {
				
				stringBuilder.append(", ");
				stringBuilder.append(contextClass.getName());
			}
		}
		
		stringBuilder.append(". ");

		return stringBuilder.toString();
	}
1319731
function(values, var_args) {
                    ProtoBuf.Builder.Message.call(this);

                    // Create virtual oneof properties
                    for (var i=0, k=oneofs.length; i<k; ++i)
                        this[oneofs[i].name] = null;
                    // Create fields and set default values
                    for (i=0, k=fields.length; i<k; ++i) {
                        var field = fields[i];
                        this[field.name] =
                            field.repeated ? [] :
                            (field.map ? new ProtoBuf.Map(field) : null);
                        if ((field.required || T.syntax === 'proto3') &&
                            field.defaultValue !== null)
                            this[field.name] = field.defaultValue;
                    }

                    if (arguments.length > 0) {
                        var value;
                        // Set field values from a values object
                        if (arguments.length === 1 && values !== null && typeof values === 'object' &&
                            /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) &&
                            /* not a repeated field */ !Array.isArray(values) &&
                            /* not a Map */ !(values instanceof ProtoBuf.Map) &&
                            /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) &&
                            /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) &&
                            /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) {
                            this.$set(values);
                        } else // Set field values from arguments, in declaration order
                            for (i=0, k=arguments.length; i<k; ++i)
                                if (typeof (value = arguments[i]) !== 'undefined')
                                    this.$set(fields[i].name, value); // May throw
                    }
                }
436028
def make_message(self, data):

        

        data = self.codec.loads(data)
        msg = Message(
            data.get("data"),
            *data.get("args",[]),
            **data.get("kwargs",{})
        )
        msg.meta.update(data.get("meta"))
        self.trigger("make_message", data, msg)
        return msg