// SPDX-License-Identifier: Apache-2.0
/// Get an optional field from a protobuf object, returning an error if the field does not exist.
/// Get a specific variant from a `oneof` field of a protobuf object, returning an error
/// if the variant is not as expected.