1919import com .google .api .core .ApiFuture ;
2020import com .google .api .core .ApiFutures ;
2121import com .google .api .gax .core .BackgroundResource ;
22+ import com .google .api .gax .httpjson .longrunning .OperationsClient ;
2223import com .google .api .gax .longrunning .OperationFuture ;
2324import com .google .api .gax .paging .AbstractFixedSizeCollection ;
2425import com .google .api .gax .paging .AbstractPage ;
3031import com .google .cloud .batch .v1 .stub .BatchServiceStubSettings ;
3132import com .google .common .util .concurrent .MoreExecutors ;
3233import com .google .longrunning .Operation ;
33- import com .google .longrunning .OperationsClient ;
3434import com .google .protobuf .Empty ;
3535import java .io .IOException ;
3636import java .util .List ;
3939
4040// AUTO-GENERATED DOCUMENTATION AND CLASS.
4141/**
42- * Service Description: Google Cloud Batch Service. The service manages user submitted batch jobs
43- * and allocates Google Compute Engine VM instances to run the jobs.
42+ * Service Description: Google Batch Service. The service manages user submitted batch jobs and
43+ * allocates Google Compute Engine VM instances to run the jobs.
4444 *
4545 * <p>This class provides the ability to make remote calls to the backing service through method
4646 * calls that map to API methods. Sample code to get started:
104104 * BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
105105 * }</pre>
106106 *
107+ * <p>To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
108+ * the wire:
109+ *
110+ * <pre>{@code
111+ * // This snippet has been automatically generated for illustrative purposes only.
112+ * // It may require modifications to work in your environment.
113+ * BatchServiceSettings batchServiceSettings =
114+ * BatchServiceSettings.newBuilder()
115+ * .setTransportChannelProvider(
116+ * BatchServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
117+ * .build();
118+ * BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
119+ * }</pre>
120+ *
107121 * <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
108122 */
109123@ Generated ("by gapic-generator-java" )
110124public class BatchServiceClient implements BackgroundResource {
111125 private final BatchServiceSettings settings ;
112126 private final BatchServiceStub stub ;
113- private final OperationsClient operationsClient ;
127+ private final OperationsClient httpJsonOperationsClient ;
128+ private final com .google .longrunning .OperationsClient operationsClient ;
114129
115130 /** Constructs an instance of BatchServiceClient with default settings. */
116131 public static final BatchServiceClient create () throws IOException {
@@ -141,13 +156,17 @@ public static final BatchServiceClient create(BatchServiceStub stub) {
141156 protected BatchServiceClient (BatchServiceSettings settings ) throws IOException {
142157 this .settings = settings ;
143158 this .stub = ((BatchServiceStubSettings ) settings .getStubSettings ()).createStub ();
144- this .operationsClient = OperationsClient .create (this .stub .getOperationsStub ());
159+ this .operationsClient =
160+ com .google .longrunning .OperationsClient .create (this .stub .getOperationsStub ());
161+ this .httpJsonOperationsClient = OperationsClient .create (this .stub .getHttpJsonOperationsStub ());
145162 }
146163
147164 protected BatchServiceClient (BatchServiceStub stub ) {
148165 this .settings = null ;
149166 this .stub = stub ;
150- this .operationsClient = OperationsClient .create (this .stub .getOperationsStub ());
167+ this .operationsClient =
168+ com .google .longrunning .OperationsClient .create (this .stub .getOperationsStub ());
169+ this .httpJsonOperationsClient = OperationsClient .create (this .stub .getHttpJsonOperationsStub ());
151170 }
152171
153172 public final BatchServiceSettings getSettings () {
@@ -162,10 +181,18 @@ public BatchServiceStub getStub() {
162181 * Returns the OperationsClient that can be used to query the status of a long-running operation
163182 * returned by another API method call.
164183 */
165- public final OperationsClient getOperationsClient () {
184+ public final com . google . longrunning . OperationsClient getOperationsClient () {
166185 return operationsClient ;
167186 }
168187
188+ /**
189+ * Returns the OperationsClient that can be used to query the status of a long-running operation
190+ * returned by another API method call.
191+ */
192+ public final OperationsClient getHttpJsonOperationsClient () {
193+ return httpJsonOperationsClient ;
194+ }
195+
169196 // AUTO-GENERATED DOCUMENTATION AND METHOD.
170197 /**
171198 * Create a Job.
@@ -183,8 +210,8 @@ public final OperationsClient getOperationsClient() {
183210 * }
184211 * }</pre>
185212 *
186- * @param parent Required. The parent resource name where the Job will be created. Format :
187- * projects/{project}/locations/{location}
213+ * @param parent Required. The parent resource name where the Job will be created. Pattern :
214+ * " projects/{project}/locations/{location}"
188215 * @param job Required. The Job to create.
189216 * @param jobId ID used to uniquely identify the Job within its parent scope. This field should
190217 * contain at most 63 characters. Only alphanumeric characters or '-' are accepted. The '-'
@@ -221,8 +248,8 @@ public final Job createJob(LocationName parent, Job job, String jobId) {
221248 * }
222249 * }</pre>
223250 *
224- * @param parent Required. The parent resource name where the Job will be created. Format :
225- * projects/{project}/locations/{location}
251+ * @param parent Required. The parent resource name where the Job will be created. Pattern :
252+ * " projects/{project}/locations/{location}"
226253 * @param job Required. The Job to create.
227254 * @param jobId ID used to uniquely identify the Job within its parent scope. This field should
228255 * contain at most 63 characters. Only alphanumeric characters or '-' are accepted. The '-'
@@ -495,7 +522,7 @@ public final UnaryCallable<DeleteJobRequest, Operation> deleteJobCallable() {
495522
496523 // AUTO-GENERATED DOCUMENTATION AND METHOD.
497524 /**
498- * List all Jobs for a project.
525+ * List all Jobs for a project within a region .
499526 *
500527 * <p>Sample code:
501528 *
@@ -520,7 +547,7 @@ public final ListJobsPagedResponse listJobs(String parent) {
520547
521548 // AUTO-GENERATED DOCUMENTATION AND METHOD.
522549 /**
523- * List all Jobs for a project.
550+ * List all Jobs for a project within a region .
524551 *
525552 * <p>Sample code:
526553 *
@@ -550,7 +577,7 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
550577
551578 // AUTO-GENERATED DOCUMENTATION AND METHOD.
552579 /**
553- * List all Jobs for a project.
580+ * List all Jobs for a project within a region .
554581 *
555582 * <p>Sample code:
556583 *
@@ -579,7 +606,7 @@ public final UnaryCallable<ListJobsRequest, ListJobsPagedResponse> listJobsPaged
579606
580607 // AUTO-GENERATED DOCUMENTATION AND METHOD.
581608 /**
582- * List all Jobs for a project.
609+ * List all Jobs for a project within a region .
583610 *
584611 * <p>Sample code:
585612 *
@@ -731,7 +758,8 @@ public final UnaryCallable<GetTaskRequest, Task> getTaskCallable() {
731758 * }
732759 * }</pre>
733760 *
734- * @param parent Required. Path of the TaskGroup from which Tasks are being requested.
761+ * @param parent Required. Name of a TaskGroup from which Tasks are being requested. Pattern:
762+ * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
735763 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
736764 */
737765 public final ListTasksPagedResponse listTasks (TaskGroupName parent ) {
@@ -758,7 +786,8 @@ public final ListTasksPagedResponse listTasks(TaskGroupName parent) {
758786 * }
759787 * }</pre>
760788 *
761- * @param parent Required. Path of the TaskGroup from which Tasks are being requested.
789+ * @param parent Required. Name of a TaskGroup from which Tasks are being requested. Pattern:
790+ * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
762791 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
763792 */
764793 public final ListTasksPagedResponse listTasks (String parent ) {
0 commit comments