Is your feature request related to a problem? Please describe.
ObjectHighlights returned by Storage::read_object(...).send().await?.object() omits the metadata: HashMap<String, String> field of Object.
Reading per-object custom metadata requires a follow-up StorageControl::get_object RPC — doubling the GET count on workloads that key on per-object metadata, even though the metadata is already on the wire
alongside the body:
Describe the solution you'd like
Add metadata: HashMap<String, String> to ObjectHighlights. Additive on a #[non_exhaustive] struct, no API break. Optionally also surface event_based_hold, temporary_hold, retention so the response can drive retention/hold gating without a follow-up call.
Describe alternatives you've considered
Issuing the follow-up StorageControl::get_object per download — the current workaround the doc comment recommends. Works, but doubles the request count.
Additional context
ObjectHighlights was introduced in #2626 / #2685 as a deliberately curated subset, so this is asking to expand the subset, not redesign the API. The two other major-cloud Rust SDKs already expose object metadata on their download responses:
Is your feature request related to a problem? Please describe.
ObjectHighlightsreturned byStorage::read_object(...).send().await?.object()omits themetadata: HashMap<String, String>field ofObject.Reading per-object custom metadata requires a follow-up
StorageControl::get_objectRPC — doubling the GET count on workloads that key on per-object metadata, even though the metadata is already on the wirealongside the body:
google.storage.v2.ReadObjectResponsefield 4 ismetadata: Object, sent on the first response message of the stream.GET /storage/v1/b/{bucket}/o/{object}?alt=mediasurfaces custom metadata asx-goog-meta-*HTTP response headers.Describe the solution you'd like
Add
metadata: HashMap<String, String>toObjectHighlights. Additive on a#[non_exhaustive]struct, no API break. Optionally also surfaceevent_based_hold,temporary_hold,retentionso the response can drive retention/hold gating without a follow-up call.Describe alternatives you've considered
Issuing the follow-up
StorageControl::get_objectper download — the current workaround the doc comment recommends. Works, but doubles the request count.Additional context
ObjectHighlightswas introduced in #2626 / #2685 as a deliberately curated subset, so this is asking to expand the subset, not redesign the API. The two other major-cloud Rust SDKs already expose object metadata on their download responses:GetObjectOutput::metadata:Option<HashMap<String, String>>BlobClient::downloadresponse properties surfacex-ms-meta-*