Skip to content

Commit 5a3dfb4

Browse files
author
Ajay Kannan
committed
add return values to delete and undelete
1 parent 766716f commit 5a3dfb4

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

gcloud-java-resourcemanager/src/main/java/com/google/gcloud/spi/ResourceManagerRpc.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ public enum Permission {
3838
SET_IAM_POLICY
3939
}
4040

41+
public enum DeleteResult {
42+
SUCCESS,
43+
ALREADY_DELETED
44+
}
45+
46+
public enum UndeleteResult {
47+
SUCCESS,
48+
DELETE_IN_PROGRESS,
49+
GONE
50+
}
51+
4152
class Tuple<X, Y> {
4253
private final X x;
4354
private final Y y;
@@ -98,13 +109,13 @@ public int pageSize() {
98109

99110
Project create(Project project) throws ResourceManagerException;
100111

101-
void delete(String projectId) throws ResourceManagerException;
112+
DeleteResult delete(String projectId) throws ResourceManagerException;
102113

103114
Project get(String projectId) throws ResourceManagerException;
104115

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

107-
void undelete(String projectId) throws ResourceManagerException;
118+
UndeleteResult undelete(String projectId) throws ResourceManagerException;
108119

109120
Project update(Project project) throws ResourceManagerException;
110121

0 commit comments

Comments
 (0)