Skip to content

Commit f2a87ff

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add new field contexts for Object Contexts in message Object
feat: Add new field `filter` for Object Contexts in message `ListObjectsRequest` PiperOrigin-RevId: 781971065
1 parent d4be887 commit f2a87ff

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

google/storage/v2/storage.proto

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,11 @@ message ListObjectsRequest {
15041504
// Glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob)
15051505
// for the full syntax.
15061506
string match_glob = 14 [(google.api.field_behavior) = OPTIONAL];
1507+
1508+
// Optional. Filter the returned objects. Currently only supported for the
1509+
// `contexts` field. If `delimiter` is set, the returned `prefixes` are exempt
1510+
// from this filter.
1511+
string filter = 15 [(google.api.field_behavior) = OPTIONAL];
15071512
}
15081513

15091514
// Request object for `QueryWriteStatus`.
@@ -2635,6 +2640,27 @@ message ObjectChecksums {
26352640
bytes md5_hash = 2 [(google.api.field_behavior) = OPTIONAL];
26362641
}
26372642

2643+
// The payload of a single user-defined object context.
2644+
message ObjectCustomContextPayload {
2645+
// Required. The value of the object context.
2646+
string value = 1 [(google.api.field_behavior) = REQUIRED];
2647+
2648+
// Output only. The time at which the object context was created.
2649+
google.protobuf.Timestamp create_time = 2
2650+
[(google.api.field_behavior) = OUTPUT_ONLY];
2651+
2652+
// Output only. The time at which the object context was last updated.
2653+
google.protobuf.Timestamp update_time = 3
2654+
[(google.api.field_behavior) = OUTPUT_ONLY];
2655+
}
2656+
2657+
// All contexts of an object grouped by type.
2658+
message ObjectContexts {
2659+
// Optional. User-defined object contexts.
2660+
map<string, ObjectCustomContextPayload> custom = 1
2661+
[(google.api.field_behavior) = OPTIONAL];
2662+
}
2663+
26382664
// Describes the Customer-Supplied Encryption Key mechanism used to store an
26392665
// Object's data at rest.
26402666
message CustomerEncryption {
@@ -2817,6 +2843,11 @@ message Object {
28172843
// Optional. User-provided metadata, in key/value pairs.
28182844
map<string, string> metadata = 22 [(google.api.field_behavior) = OPTIONAL];
28192845

2846+
// Optional. User-defined or system-defined object contexts. Each object
2847+
// context is a key-payload pair, where the key provides the identification
2848+
// and the payload holds the associated value and additional metadata.
2849+
ObjectContexts contexts = 38 [(google.api.field_behavior) = OPTIONAL];
2850+
28202851
// Whether an object is under event-based hold.
28212852
// An event-based hold is a way to force the retention of an object until
28222853
// after some event occurs. Once the hold is released by explicitly setting

0 commit comments

Comments
 (0)