Send feedback
Class ReadPayload (2.47.0-rc)
Stay organized with collections
Save and categorize content based on your preferences.
Version latestkeyboard_arrow_down
A partial or full response to an asynchronous download.
Constructors
ReadPayload()
ReadPayload(std::string)
Constructor from string. Applications may use this in their mocks.
Parameter
Name
Description
contents
std::string
ReadPayload(std::vector< std::string >)
Constructor from vector of strings.
Applications may use this in their mocks with more complex contents() results.
Parameter
Name
Description
contents
std::vector< std::string >
Functions
set_metadata(google::storage::v2::Object) &
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
google::storage::v2::Object
Returns
Type
Description
ReadPayload &
set_metadata(google::storage::v2::Object) &&
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
google::storage::v2::Object
Returns
Type
Description
ReadPayload &&
reset_metadata() &
Modifiers. Applications may need these in mocks.
Returns
Type
Description
ReadPayload &
reset_metadata() &&
Modifiers. Applications may need these in mocks.
Returns
Type
Description
ReadPayload &&
set_headers(storage::HeadersMap) &
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
storage::HeadersMap
Returns
Type
Description
ReadPayload &
set_headers(storage::HeadersMap) &&
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
storage::HeadersMap
Returns
Type
Description
ReadPayload &&
clear_headers() &
Modifiers. Applications may need these in mocks.
Returns
Type
Description
ReadPayload &
clear_headers() &&
Modifiers. Applications may need these in mocks.
Returns
Type
Description
ReadPayload &&
set_offset(std::int64_t) &
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
std::int64_t
Returns
Type
Description
ReadPayload &
set_offset(std::int64_t) &&
Modifiers. Applications may need these in mocks.
Parameter
Name
Description
v
std::int64_t
Returns
Type
Description
ReadPayload &&
size() const
The total size of the payload.
Returns
Type
Description
std::size_t
contents() const
These buffers are invalidated if this object is modified.
Returns
Type
Description
std::vector< absl::string_view >
metadata() const
Returns
Type
Description
absl::optional< google::storage::v2::Object >
offset() const
The starting offset of the current message.
Returns
Type
Description
std::int64_t
headers() const
The headers (if any) returned by the service.
For debugging only.
Warning:
The contents of these headers may change without notice. Unless documented in the API, headers may be removed or added by the service. Furthermore, the headers may change from one version of the library to the next, as we find more (or different) opportunities for optimization.
Returns
Type
Description
storage::HeadersMap const &
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-29 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-01-29 UTC."],[],[]]