Skip to content

Commit

Permalink
add return values to delete, undelete, and setIamPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Kannan committed Nov 3, 2015
1 parent 766716f commit 0f292cb
Showing 1 changed file with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ public enum Permission {
SET_IAM_POLICY
}

public enum DeleteResult {
SUCCESS,
ALREADY_DELETED
}

public enum UndeleteResult {
SUCCESS,
DELETE_IN_PROGRESS,
GONE
}

public enum SetIamPolicyResult {
SUCCESS,
ETAG_NOT_MATCH
}

class Tuple<X, Y> {
private final X x;
private final Y y;
Expand Down Expand Up @@ -98,19 +114,19 @@ public int pageSize() {

Project create(Project project) throws ResourceManagerException;

void delete(String projectId) throws ResourceManagerException;
DeleteResult delete(String projectId) throws ResourceManagerException;

Project get(String projectId) throws ResourceManagerException;

Tuple<String, Iterable<Project>> list(ListOptions listOptions) throws ResourceManagerException;

void undelete(String projectId) throws ResourceManagerException;
UndeleteResult undelete(String projectId) throws ResourceManagerException;

Project update(Project project) throws ResourceManagerException;

Policy getIamPolicy(String projectId) throws ResourceManagerException;

void setIamPolicy(String projectId, Policy policy) throws ResourceManagerException;
SetIamPolicyResult setIamPolicy(String projectId, Policy policy) throws ResourceManagerException;

List<Boolean> hasPermissions(String projectId, List<Permission> permissions)
throws ResourceManagerException;
Expand Down

0 comments on commit 0f292cb

Please sign in to comment.