@@ -190,6 +190,12 @@ message RelationshipFilter {
190190 max_bytes : 1024 ,
191191 } ];
192192
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+ } ];
193199
194200 // relation is the *optional* relation of the relationship.
195201 string optional_relation = 3 [ (validate.rules ).string = {
@@ -223,6 +229,13 @@ message SubjectFilter {
223229 max_bytes : 1024 ,
224230 } ];
225231
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+
226239 RelationFilter optional_relation = 3 ;
227240}
228241
@@ -257,6 +270,10 @@ message ReadRelationshipsResponse {
257270 // relationship is the found relationship.
258271 Relationship relationship = 2 [ (validate.rules ) .message.required = true ];
259272
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+
260277 // after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
261278 // result.
262279 Cursor after_result_cursor = 3 ;
0 commit comments