The proto specification for "just return a few fields" is a FieldMask, the client library uses gcs::Fields which is a string. Translating from a string to a FieldMask is not possible in general:
The REST fields API supports returning just a few keys from the labels field in a bucket bucket or the metadata field in a object.
We need to return an error when gcs::Fields cannot be easily translated to a FieldMask, and we need to handle the most common case: a gcs::Fields with an empty string.
The proto specification for "just return a few fields" is a
FieldMask, the client library usesgcs::Fieldswhich is a string. Translating from a string to a FieldMask is not possible in general:The REST
fieldsAPI supports returning just a few keys from thelabelsfield in a bucket bucket or themetadatafield in a object.We need to return an error when
gcs::Fieldscannot be easily translated to aFieldMask, and we need to handle the most common case: agcs::Fieldswith an empty string.