Skip to content

Commit 3687cb1

Browse files
author
Ajay Kannan
committed
Fixes to the ResourceManagerRpc layer, and also add resource manager to pom files
spi api fixes
1 parent 4899c27 commit 3687cb1

3 files changed

Lines changed: 36 additions & 4 deletions

File tree

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

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,41 @@ public Y y() {
4646
}
4747
}
4848

49+
public class ListOptions {
50+
private List<String> filters;
51+
private String pageToken;
52+
53+
private static final ListOptions DEFAULT_INSTANCE = new ListOptions(null, null);
54+
55+
ListOptions(List<String> filters, String pageToken) {
56+
this.filters = filters;
57+
this.pageToken = pageToken;
58+
}
59+
60+
public static ListOptions getDefaultInstance() {
61+
return DEFAULT_INSTANCE;
62+
}
63+
64+
public static ListOptions createListOption(List<String> filters, String pageToken) {
65+
return new ListOptions(filters, pageToken);
66+
}
67+
68+
public String pageToken() {
69+
return pageToken;
70+
}
71+
72+
public List<String> filters() {
73+
return filters;
74+
}
75+
}
76+
4977
Project create(Project project) throws ResourceManagerException;
5078

5179
void delete(String projectId) throws ResourceManagerException;
5280

5381
Project get(String projectId) throws ResourceManagerException;
5482

55-
Tuple<String, Iterable<Project>> list() throws ResourceManagerException;
56-
57-
Tuple<String, Iterable<Project>> list(String filter) throws ResourceManagerException;
83+
Tuple<String, Iterable<Project>> list(ListOptions listOptions) throws ResourceManagerException;
5884

5985
void undelete(String projectId) throws ResourceManagerException;
6086

@@ -64,6 +90,6 @@ public Y y() {
6490

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

67-
List<String> testIamPermissions(String projectId, List<String> permissions)
93+
boolean hasPermissions(String projectId, List<String> permissions)
6894
throws ResourceManagerException;
6995
}

gcloud-java/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<artifactId>gcloud-java-datastore</artifactId>
2525
<version>${project.version}</version>
2626
</dependency>
27+
<dependency>
28+
<groupId>${project.groupId}</groupId>
29+
<artifactId>gcloud-java-resourcemanager</artifactId>
30+
<version>${project.version}</version>
31+
</dependency>
2732
<dependency>
2833
<groupId>${project.groupId}</groupId>
2934
<artifactId>gcloud-java-storage</artifactId>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<modules>
6969
<module>gcloud-java-core</module>
7070
<module>gcloud-java-datastore</module>
71+
<module>gcloud-java-resourcemanager</module>
7172
<module>gcloud-java-storage</module>
7273
<module>gcloud-java</module>
7374
<module>gcloud-java-examples</module>

0 commit comments

Comments
 (0)