…shallow (#3273)
* chore: update BlobInfo.contexts diff handling to be deep rather than shallow
Add JsonUtils class to provide some helpers for performing arbitrarily deep
field selection. Our existing implementation is flat for everything exception
metadata, with the addition of object contexts we now have an N depth diff
(metadata is always depth 2, but a context path is
`contexts.custom.<key>.value`) and the value of the key is an object instead
of a string. We accomplish this arbitrary diffing by first flattening the src
object to a map of paths to leaves and their corresponding string values. Then
we diff the keys to produce a new map, and then treeify that new map back to a
json structure.
This is quite robust, but isn't terribly efficient so we only use it for
contexts and metadata fields.
Update BlobInfo.BuilderImpl#setContexts to deeply resolve the diff against the
provided value.
Update BlobInfo object contexts maps to use unmodifiable hashmaps instead of
ImmutableMap. ImmutableMap doesn't allow null values, but we need to accept
null values to allow customers to remove individual values.
Add object contexts to the existing ITNestedUpdateMaskTest.
gRPC didn't require any special handling as it's `update_mask` already takes
care of things appropriately after the deep diffing is added.
* chore: update method name