Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [batch] support order_by in ListJobs and ListTasks requests #9359

Merged
merged 8 commits into from
May 12, 2023
10 changes: 5 additions & 5 deletions java-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.11.0</version>
<version>26.14.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-batch</artifactId>
<version>0.15.0</version>
<version>0.17.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-batch:0.15.0'
implementation 'com.google.cloud:google-cloud-batch:0.17.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-batch" % "0.15.0"
libraryDependencies += "com.google.cloud" % "google-cloud-batch" % "0.17.0"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-batch.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.14.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.17.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ public final ListJobsPagedResponse listJobs(String parent) {
* ListJobsRequest.newBuilder()
* .setParent("parent-995424086")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down Expand Up @@ -649,6 +650,7 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
* ListJobsRequest.newBuilder()
* .setParent("parent-995424086")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down Expand Up @@ -681,6 +683,7 @@ public final UnaryCallable<ListJobsRequest, ListJobsPagedResponse> listJobsPaged
* ListJobsRequest.newBuilder()
* .setParent("parent-995424086")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down Expand Up @@ -894,6 +897,7 @@ public final ListTasksPagedResponse listTasks(String parent) {
* .setParent(
* TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString())
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down Expand Up @@ -928,6 +932,7 @@ public final ListTasksPagedResponse listTasks(ListTasksRequest request) {
* .setParent(
* TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString())
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down Expand Up @@ -961,6 +966,7 @@ public final UnaryCallable<ListTasksRequest, ListTasksPagedResponse> listTasksPa
* .setParent(
* TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString())
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
ProtoRestSerializer<ListJobsRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
Expand Down Expand Up @@ -278,6 +279,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
ProtoRestSerializer<ListTasksRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
Expand Down Expand Up @@ -423,16 +425,6 @@ protected HttpJsonBatchServiceStub(
callableFactory,
typeRegistry,
ImmutableMap.<String, HttpRule>builder()
.put(
"google.longrunning.Operations.CancelOperation",
HttpRule.newBuilder()
.setPost("/v1alpha/{name=projects/*/locations/*/operations/*}:cancel")
.build())
.put(
"google.longrunning.Operations.DeleteOperation",
HttpRule.newBuilder()
.setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}")
.build())
.put(
"google.longrunning.Operations.GetOperation",
HttpRule.newBuilder()
Expand Down