Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

feat: add fields for tracking reachable status of resources in list methods #3

Merged
merged 2 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,6 @@ public final void cancelWorkflowInvocation(CancelWorkflowInvocationRequest reque
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* for (WorkflowInvocationAction element :
* dataformClient.queryWorkflowInvocationActions(request).iterateAll()) {
Expand Down Expand Up @@ -3317,7 +3316,6 @@ public final QueryWorkflowInvocationActionsPagedResponse queryWorkflowInvocation
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture<WorkflowInvocationAction> future =
* dataformClient.queryWorkflowInvocationActionsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -3352,7 +3350,6 @@ public final QueryWorkflowInvocationActionsPagedResponse queryWorkflowInvocation
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* QueryWorkflowInvocationActionsResponse response =
Expand Down Expand Up @@ -3529,7 +3526,10 @@ public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
* try (DataformClient dataformClient = DataformClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource(
* CompilationResultName.of(
* "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
Expand Down Expand Up @@ -3558,7 +3558,10 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* try (DataformClient dataformClient = DataformClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource(
* CompilationResultName.of(
* "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,6 @@ public class HttpJsonDataformStub extends DataformStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<QueryWorkflowInvocationActionsRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
return fields;
Expand Down Expand Up @@ -1496,7 +1495,8 @@ public class HttpJsonDataformStub extends DataformStub {
return fields;
})
.setAdditionalPaths(
"/v1alpha2/{resource=projects/*/locations/*/repositories/*/workspaces/*}:setIamPolicy")
"/v1alpha2/{resource=projects/*/locations/*/repositories/*/workspaces/*}:setIamPolicy",
"/v1alpha2/{resource=projects/*/locations/*/repositories/*/compilationResults/*}:setIamPolicy")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,6 @@ public void queryWorkflowInvocationActionsTest() throws Exception {
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();

QueryWorkflowInvocationActionsPagedResponse pagedListResponse =
Expand Down Expand Up @@ -2726,7 +2725,6 @@ public void queryWorkflowInvocationActionsExceptionTest() throws Exception {
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
client.queryWorkflowInvocationActions(request);
Assert.fail("No exception raised");
Expand Down Expand Up @@ -2864,7 +2862,10 @@ public void setIamPolicyTest() throws Exception {

SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setResource(
CompilationResultName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down Expand Up @@ -2897,7 +2898,10 @@ public void setIamPolicyExceptionTest() throws Exception {
try {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setResource(
CompilationResultName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2433,7 +2433,6 @@ public void queryWorkflowInvocationActionsTest() throws Exception {
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();

QueryWorkflowInvocationActionsPagedResponse pagedListResponse =
Expand All @@ -2453,7 +2452,6 @@ public void queryWorkflowInvocationActionsTest() throws Exception {
Assert.assertEquals(request.getName(), actualRequest.getName());
Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -2474,7 +2472,6 @@ public void queryWorkflowInvocationActionsExceptionTest() throws Exception {
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
client.queryWorkflowInvocationActions(request);
Assert.fail("No exception raised");
Expand Down Expand Up @@ -2597,7 +2594,10 @@ public void setIamPolicyTest() throws Exception {

SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setResource(
CompilationResultName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down Expand Up @@ -2626,7 +2626,10 @@ public void setIamPolicyExceptionTest() throws Exception {
try {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setResource(
CompilationResultName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down
Loading