Class ReadPayload (2.17.0)

A partial response to a streaming 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(storage::ObjectMetadata) &

Modifiers. Applications may need these in mocks.

Parameter
Name Description
v storage::ObjectMetadata
Returns
Type Description
ReadPayload &

set_metadata(storage::ObjectMetadata) &&

Modifiers. Applications may need these in mocks.

Parameter
Name Description
v storage::ObjectMetadata
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

The payload contents.

These buffers are invalidated if this object is modified.

Returns
Type Description
std::vector< absl::string_view >

metadata() const

The object metadata.

Returns
Type Description
absl::optional< storage::ObjectMetadata >

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.

Returns
Type Description
storage::HeadersMap const &