@@ -190,6 +190,12 @@ message RelationshipFilter {
190
190
max_bytes : 1024 ,
191
191
} ];
192
192
193
+ // optional_resource_ids is the *optional* list of resource IDs to filter relationships.
194
+ // If specified, optional_resource_id and optional_resource_id_prefix cannot be specified.
195
+ repeated string optional_resource_ids = 6 [ (validate.rules ).repeated .string = {
196
+ pattern : "^([a-zA-Z0-9/_|\\-=+]{1,})?$" ,
197
+ max_bytes : 1024 ,
198
+ } ];
193
199
194
200
// relation is the *optional* relation of the relationship.
195
201
string optional_relation = 3 [ (validate.rules ).string = {
@@ -223,6 +229,13 @@ message SubjectFilter {
223
229
max_bytes : 1024 ,
224
230
} ];
225
231
232
+ // optional_subject_ids is the *optional* list of subject IDs to filter.
233
+ // If specified, optional_subject_id cannot be specified.
234
+ repeated string optional_subject_ids = 4 [ (validate.rules ).string = {
235
+ pattern : "^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$" ,
236
+ max_bytes : 1024 ,
237
+ } ];
238
+
226
239
RelationFilter optional_relation = 3 ;
227
240
}
228
241
@@ -257,6 +270,10 @@ message ReadRelationshipsResponse {
257
270
// relationship is the found relationship.
258
271
Relationship relationship = 2 [ (validate.rules ) .message.required = true ];
259
272
273
+ // optional_relationships are a list of relationships found when multiple resource and subject ids are
274
+ // specified in the request
275
+ repeated Relationship optional_relationships = 3 [ (validate.rules ) .message.required = true ];
276
+
260
277
// after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
261
278
// result.
262
279
Cursor after_result_cursor = 3 ;
0 commit comments