[#BloombergLP-bdlat-FuzzUtil-consumeMessage-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat.adoc[bdlat]::xref:BloombergLP/bdlat/FuzzUtil.adoc[FuzzUtil]::consumeMessage
:relfileprefix: ../../../
:mrdocs:

Populate a message from fuzz data bytes&period;

== Synopsis

Declared in `&lt;bdlat&lowbar;fuzzutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;MESSAGE&gt;
static
void
consumeMessage(
    t&lowbar;MESSAGE* message,
    xref:BloombergLP/bslim/FuzzDataView.adoc[bslim::FuzzDataView]* fuzzData);
----

== Description

Load into the specified `message` content generated using bytes from the specified `fuzzData`, and update `fuzzData` to reflect the bytes consumed&period; Optionally specify an `options` to customize the generated values&period; If `options` is not supplied, default values for the options are used&period; In general, this operation uses `fuzzData` to load the root message element, and then recursively applies `consumeMessage` to any child elements&period; More specifically&colon;

&ast; sequence types&colon; recursively `consumeMessage` on each of the elements of the sequence &ast; array types&colon; use `fuzzData` to determine the size of the array, use `consumeMessage` on each of the elements in the array &ast; choice types&colon; use `fuzzData` to select the active element of the choice, and then recursively `consumeMessage` for that element &ast; nullable values&colon; use `fuzzData` to select whether the object contains a value, and if it is engaged, recursively `consumeMessage` on it&period; &ast; customized and dynamic types&colon; recursively `consumeMessage` on the underlying value&period;

`t&lowbar;MESSAGE` must be a `bdlat`&hyphen;compatible type&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *message*
| message object to populate with generated content
| *fuzzData*
| fuzz input bytes&semi; updated to reflect bytes consumed
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
