Checklist
Description
I am using an object I created with the ClientTupleKey type for both write operation and delete operation, but I encounter a type error for delete operation.
The method deletes(List) in the type ClientWriteRequest is not applicable for the arguments (List) Java(67108979)
package dev.openfga.sdk.api.client.model;
import java.util.List;
public class ClientWriteRequest {
private List<ClientTupleKey> writes;
private List<ClientTupleKeyWithoutCondition> deletes;
public ClientWriteRequest() {
}
public static ClientWriteRequest ofWrites(List<ClientTupleKey> writes) {
return (new ClientWriteRequest()).writes(writes);
}
public ClientWriteRequest writes(List<ClientTupleKey> writes) {
this.writes = writes;
return this;
}
public List<ClientTupleKey> getWrites() {
return this.writes;
}
public static ClientWriteRequest ofDeletes(List<ClientTupleKeyWithoutCondition> deletes) {
return (new ClientWriteRequest()).deletes(deletes);
}
public ClientWriteRequest deletes(List<ClientTupleKeyWithoutCondition> deletes) {
this.deletes = deletes;
return this;
}
public List<ClientTupleKeyWithoutCondition> getDeletes() {
return this.deletes;
}
}
Expectation
The arguments of the delete api must have the same type as the arguments of the write api.
Reproduction
ClientWriteRequest client = new ClientWriteRequest();
List<ClientTupleKey> tuples = new ArrayList<ClientTupleKey>();
tuples.add(new ClientTupleKey()
.user("parent_group:" + event.getEventUserId())
.relation("assignee")
._object("group:" + event.getEventUserId()));
tuples.add(new ClientTupleKey()
.user("member_group:" + event.getEventUserId())
.relation("assignee")
._object("group:" + event.getEventUserId()));
if(event.isEventUserChildOfObject()){
tuples.add(new ClientTupleKey()
.user("parent_group:" + event.getEventUserId())
.relation("parent")
._object("parent_group:" + event.getEventObjectId()));
tuples.add(new ClientTupleKey()
.user("member_group:" + event.getEventObjectId())
.relation("member")
._object("member_group:" + event.getEventUserId()));
}
if(event.isWriteOperation()) {
client.writes(tuples);
}
else if(event.isDeleteOperation()) {
client.deletes(tuples);
}
OpenFGA SDK version
0.5.0
OpenFGA version
1.5.7
SDK Configuration
Logs
No response
References
No response
Checklist
Description
I am using an object I created with the ClientTupleKey type for both write operation and delete operation, but I encounter a type error for delete operation.
Expectation
The arguments of the delete api must have the same type as the arguments of the write api.
Reproduction
OpenFGA SDK version
0.5.0
OpenFGA version
1.5.7
SDK Configuration
Logs
No response
References
No response