-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(client): change naming of tuple key classes
- Loading branch information
1 parent
58c2993
commit 17e8f04
Showing
11 changed files
with
164 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 0 additions & 76 deletions
76
src/main/java/dev/openfga/sdk/api/client/ClientTupleKeyWithCondition.java
This file was deleted.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
src/main/java/dev/openfga/sdk/api/client/ClientTupleKeyWithoutCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* OpenFGA | ||
* A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar. | ||
* | ||
* The version of the OpenAPI document: 0.1 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
package dev.openfga.sdk.api.client; | ||
|
||
import dev.openfga.sdk.api.model.TupleKeyWithoutCondition; | ||
import dev.openfga.sdk.api.model.WriteRequestDeletes; | ||
import java.util.Collection; | ||
import java.util.stream.Collectors; | ||
|
||
public class ClientTupleKeyWithoutCondition { | ||
private String user; | ||
private String relation; | ||
private String _object; | ||
|
||
public TupleKeyWithoutCondition asTupleKeyWithoutCondition() { | ||
return new TupleKeyWithoutCondition().user(user).relation(relation)._object(_object); | ||
} | ||
|
||
public static WriteRequestDeletes asWriteRequestDeletes(Collection<ClientTupleKeyWithoutCondition> tupleKeys) { | ||
return new WriteRequestDeletes() | ||
.tupleKeys(tupleKeys.stream() | ||
.map(ClientTupleKeyWithoutCondition::asTupleKeyWithoutCondition) | ||
.collect(Collectors.toList())); | ||
} | ||
|
||
public ClientTupleKeyWithoutCondition _object(String _object) { | ||
this._object = _object; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get _object | ||
* @return _object | ||
**/ | ||
public String getObject() { | ||
return _object; | ||
} | ||
|
||
public ClientTupleKeyWithoutCondition relation(String relation) { | ||
this.relation = relation; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get relation | ||
* @return relation | ||
**/ | ||
public String getRelation() { | ||
return relation; | ||
} | ||
|
||
public ClientTupleKeyWithoutCondition user(String user) { | ||
this.user = user; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get user | ||
* @return user | ||
**/ | ||
public String getUser() { | ||
return user; | ||
} | ||
|
||
/** | ||
* Adds a condition to the tuple key. | ||
* @param condition a {@link ClientRelationshipCondition} | ||
* @return a new {@link ClientTupleKey} with this {@link ClientTupleKeyWithoutCondition}'s | ||
* user, relation, and object, and the passed condition. | ||
*/ | ||
public ClientTupleKey condition(ClientRelationshipCondition condition) { | ||
return new ClientTupleKey() | ||
.user(user) | ||
.relation(relation) | ||
._object(_object) | ||
.condition(condition); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.