samples: add samples for object contexts#3329
Conversation
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
BenWhitehead
left a comment
There was a problem hiding this comment.
Two small things to address and a few nits. Feel free to skip the nits if you so choose.
| import java.util.Map; | ||
|
|
||
| public class GetObjectContexts { | ||
| public static void getObjectMetadata(String projectId, String bucketName, String blobName) |
There was a problem hiding this comment.
nit: method is named getObjectMetadata but the contents show how to get contexts.
| * List any object that does not have a context with the specified key and value attached | ||
| * String filter = "NOT contexts.\"KEY\"=\"VALUE\""; | ||
| */ | ||
| String key = "your-context-key"; |
There was a problem hiding this comment.
nit: making this a method parameter will probably make test authoring easier
| String key = "your-context-key"; | ||
| String value = "your-context-value"; |
There was a problem hiding this comment.
nit: providing these as method parameters will probably make test authoring easier
There was a problem hiding this comment.
Thank you for the suggestion!
Added samples :
storage_get_object_contexts
storage_list_object_contexts
storage_set_object_contexts