• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.google.cloud.aiplatform.v1;
18 
19 import com.google.api.core.ApiFuture;
20 import com.google.api.core.ApiFutures;
21 import com.google.api.gax.core.BackgroundResource;
22 import com.google.api.gax.longrunning.OperationFuture;
23 import com.google.api.gax.paging.AbstractFixedSizeCollection;
24 import com.google.api.gax.paging.AbstractPage;
25 import com.google.api.gax.paging.AbstractPagedListResponse;
26 import com.google.api.gax.rpc.OperationCallable;
27 import com.google.api.gax.rpc.PageContext;
28 import com.google.api.gax.rpc.UnaryCallable;
29 import com.google.cloud.aiplatform.v1.stub.JobServiceStub;
30 import com.google.cloud.aiplatform.v1.stub.JobServiceStubSettings;
31 import com.google.cloud.location.GetLocationRequest;
32 import com.google.cloud.location.ListLocationsRequest;
33 import com.google.cloud.location.ListLocationsResponse;
34 import com.google.cloud.location.Location;
35 import com.google.common.util.concurrent.MoreExecutors;
36 import com.google.iam.v1.GetIamPolicyRequest;
37 import com.google.iam.v1.Policy;
38 import com.google.iam.v1.SetIamPolicyRequest;
39 import com.google.iam.v1.TestIamPermissionsRequest;
40 import com.google.iam.v1.TestIamPermissionsResponse;
41 import com.google.longrunning.Operation;
42 import com.google.longrunning.OperationsClient;
43 import com.google.protobuf.Empty;
44 import com.google.protobuf.FieldMask;
45 import java.io.IOException;
46 import java.util.List;
47 import java.util.concurrent.TimeUnit;
48 import javax.annotation.Generated;
49 
50 // AUTO-GENERATED DOCUMENTATION AND CLASS.
51 /**
52  * Service Description: A service for creating and managing Vertex AI's jobs.
53  *
54  * <p>This class provides the ability to make remote calls to the backing service through method
55  * calls that map to API methods. Sample code to get started:
56  *
57  * <pre>{@code
58  * // This snippet has been automatically generated and should be regarded as a code template only.
59  * // It will require modifications to work:
60  * // - It may require correct/in-range values for request initialization.
61  * // - It may require specifying regional endpoints when creating the service client as shown in
62  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
63  * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
64  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
65  *   CustomJob customJob = CustomJob.newBuilder().build();
66  *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
67  * }
68  * }</pre>
69  *
70  * <p>Note: close() needs to be called on the JobServiceClient object to clean up resources such as
71  * threads. In the example above, try-with-resources is used, which automatically calls close().
72  *
73  * <p>The surface of this class includes several types of Java methods for each of the API's
74  * methods:
75  *
76  * <ol>
77  *   <li>A "flattened" method. With this type of method, the fields of the request type have been
78  *       converted into function parameters. It may be the case that not all fields are available as
79  *       parameters, and not every API method will have a flattened method entry point.
80  *   <li>A "request object" method. This type of method only takes one parameter, a request object,
81  *       which must be constructed before the call. Not every API method will have a request object
82  *       method.
83  *   <li>A "callable" method. This type of method takes no parameters and returns an immutable API
84  *       callable object, which can be used to initiate calls to the service.
85  * </ol>
86  *
87  * <p>See the individual methods for example code.
88  *
89  * <p>Many parameters require resource names to be formatted in a particular way. To assist with
90  * these names, this class includes a format method for each type of name, and additionally a parse
91  * method to extract the individual identifiers contained within names that are returned.
92  *
93  * <p>This class can be customized by passing in a custom instance of JobServiceSettings to
94  * create(). For example:
95  *
96  * <p>To customize credentials:
97  *
98  * <pre>{@code
99  * // This snippet has been automatically generated and should be regarded as a code template only.
100  * // It will require modifications to work:
101  * // - It may require correct/in-range values for request initialization.
102  * // - It may require specifying regional endpoints when creating the service client as shown in
103  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
104  * JobServiceSettings jobServiceSettings =
105  *     JobServiceSettings.newBuilder()
106  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
107  *         .build();
108  * JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings);
109  * }</pre>
110  *
111  * <p>To customize the endpoint:
112  *
113  * <pre>{@code
114  * // This snippet has been automatically generated and should be regarded as a code template only.
115  * // It will require modifications to work:
116  * // - It may require correct/in-range values for request initialization.
117  * // - It may require specifying regional endpoints when creating the service client as shown in
118  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
119  * JobServiceSettings jobServiceSettings =
120  *     JobServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
121  * JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings);
122  * }</pre>
123  *
124  * <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
125  */
126 @Generated("by gapic-generator-java")
127 public class JobServiceClient implements BackgroundResource {
128   private final JobServiceSettings settings;
129   private final JobServiceStub stub;
130   private final OperationsClient operationsClient;
131 
132   /** Constructs an instance of JobServiceClient with default settings. */
create()133   public static final JobServiceClient create() throws IOException {
134     return create(JobServiceSettings.newBuilder().build());
135   }
136 
137   /**
138    * Constructs an instance of JobServiceClient, using the given settings. The channels are created
139    * based on the settings passed in, or defaults for any settings that are not set.
140    */
create(JobServiceSettings settings)141   public static final JobServiceClient create(JobServiceSettings settings) throws IOException {
142     return new JobServiceClient(settings);
143   }
144 
145   /**
146    * Constructs an instance of JobServiceClient, using the given stub for making calls. This is for
147    * advanced usage - prefer using create(JobServiceSettings).
148    */
create(JobServiceStub stub)149   public static final JobServiceClient create(JobServiceStub stub) {
150     return new JobServiceClient(stub);
151   }
152 
153   /**
154    * Constructs an instance of JobServiceClient, using the given settings. This is protected so that
155    * it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
156    */
JobServiceClient(JobServiceSettings settings)157   protected JobServiceClient(JobServiceSettings settings) throws IOException {
158     this.settings = settings;
159     this.stub = ((JobServiceStubSettings) settings.getStubSettings()).createStub();
160     this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
161   }
162 
JobServiceClient(JobServiceStub stub)163   protected JobServiceClient(JobServiceStub stub) {
164     this.settings = null;
165     this.stub = stub;
166     this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
167   }
168 
getSettings()169   public final JobServiceSettings getSettings() {
170     return settings;
171   }
172 
getStub()173   public JobServiceStub getStub() {
174     return stub;
175   }
176 
177   /**
178    * Returns the OperationsClient that can be used to query the status of a long-running operation
179    * returned by another API method call.
180    */
getOperationsClient()181   public final OperationsClient getOperationsClient() {
182     return operationsClient;
183   }
184 
185   // AUTO-GENERATED DOCUMENTATION AND METHOD.
186   /**
187    * Creates a CustomJob. A created CustomJob right away will be attempted to be run.
188    *
189    * <p>Sample code:
190    *
191    * <pre>{@code
192    * // This snippet has been automatically generated and should be regarded as a code template only.
193    * // It will require modifications to work:
194    * // - It may require correct/in-range values for request initialization.
195    * // - It may require specifying regional endpoints when creating the service client as shown in
196    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
197    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
198    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
199    *   CustomJob customJob = CustomJob.newBuilder().build();
200    *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
201    * }
202    * }</pre>
203    *
204    * @param parent Required. The resource name of the Location to create the CustomJob in. Format:
205    *     `projects/{project}/locations/{location}`
206    * @param customJob Required. The CustomJob to create.
207    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
208    */
createCustomJob(LocationName parent, CustomJob customJob)209   public final CustomJob createCustomJob(LocationName parent, CustomJob customJob) {
210     CreateCustomJobRequest request =
211         CreateCustomJobRequest.newBuilder()
212             .setParent(parent == null ? null : parent.toString())
213             .setCustomJob(customJob)
214             .build();
215     return createCustomJob(request);
216   }
217 
218   // AUTO-GENERATED DOCUMENTATION AND METHOD.
219   /**
220    * Creates a CustomJob. A created CustomJob right away will be attempted to be run.
221    *
222    * <p>Sample code:
223    *
224    * <pre>{@code
225    * // This snippet has been automatically generated and should be regarded as a code template only.
226    * // It will require modifications to work:
227    * // - It may require correct/in-range values for request initialization.
228    * // - It may require specifying regional endpoints when creating the service client as shown in
229    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
230    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
231    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
232    *   CustomJob customJob = CustomJob.newBuilder().build();
233    *   CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
234    * }
235    * }</pre>
236    *
237    * @param parent Required. The resource name of the Location to create the CustomJob in. Format:
238    *     `projects/{project}/locations/{location}`
239    * @param customJob Required. The CustomJob to create.
240    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
241    */
createCustomJob(String parent, CustomJob customJob)242   public final CustomJob createCustomJob(String parent, CustomJob customJob) {
243     CreateCustomJobRequest request =
244         CreateCustomJobRequest.newBuilder().setParent(parent).setCustomJob(customJob).build();
245     return createCustomJob(request);
246   }
247 
248   // AUTO-GENERATED DOCUMENTATION AND METHOD.
249   /**
250    * Creates a CustomJob. A created CustomJob right away will be attempted to be run.
251    *
252    * <p>Sample code:
253    *
254    * <pre>{@code
255    * // This snippet has been automatically generated and should be regarded as a code template only.
256    * // It will require modifications to work:
257    * // - It may require correct/in-range values for request initialization.
258    * // - It may require specifying regional endpoints when creating the service client as shown in
259    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
260    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
261    *   CreateCustomJobRequest request =
262    *       CreateCustomJobRequest.newBuilder()
263    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
264    *           .setCustomJob(CustomJob.newBuilder().build())
265    *           .build();
266    *   CustomJob response = jobServiceClient.createCustomJob(request);
267    * }
268    * }</pre>
269    *
270    * @param request The request object containing all of the parameters for the API call.
271    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
272    */
createCustomJob(CreateCustomJobRequest request)273   public final CustomJob createCustomJob(CreateCustomJobRequest request) {
274     return createCustomJobCallable().call(request);
275   }
276 
277   // AUTO-GENERATED DOCUMENTATION AND METHOD.
278   /**
279    * Creates a CustomJob. A created CustomJob right away will be attempted to be run.
280    *
281    * <p>Sample code:
282    *
283    * <pre>{@code
284    * // This snippet has been automatically generated and should be regarded as a code template only.
285    * // It will require modifications to work:
286    * // - It may require correct/in-range values for request initialization.
287    * // - It may require specifying regional endpoints when creating the service client as shown in
288    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
289    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
290    *   CreateCustomJobRequest request =
291    *       CreateCustomJobRequest.newBuilder()
292    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
293    *           .setCustomJob(CustomJob.newBuilder().build())
294    *           .build();
295    *   ApiFuture<CustomJob> future = jobServiceClient.createCustomJobCallable().futureCall(request);
296    *   // Do something.
297    *   CustomJob response = future.get();
298    * }
299    * }</pre>
300    */
createCustomJobCallable()301   public final UnaryCallable<CreateCustomJobRequest, CustomJob> createCustomJobCallable() {
302     return stub.createCustomJobCallable();
303   }
304 
305   // AUTO-GENERATED DOCUMENTATION AND METHOD.
306   /**
307    * Gets a CustomJob.
308    *
309    * <p>Sample code:
310    *
311    * <pre>{@code
312    * // This snippet has been automatically generated and should be regarded as a code template only.
313    * // It will require modifications to work:
314    * // - It may require correct/in-range values for request initialization.
315    * // - It may require specifying regional endpoints when creating the service client as shown in
316    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
317    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
318    *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
319    *   CustomJob response = jobServiceClient.getCustomJob(name);
320    * }
321    * }</pre>
322    *
323    * @param name Required. The name of the CustomJob resource. Format:
324    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
325    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
326    */
getCustomJob(CustomJobName name)327   public final CustomJob getCustomJob(CustomJobName name) {
328     GetCustomJobRequest request =
329         GetCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
330     return getCustomJob(request);
331   }
332 
333   // AUTO-GENERATED DOCUMENTATION AND METHOD.
334   /**
335    * Gets a CustomJob.
336    *
337    * <p>Sample code:
338    *
339    * <pre>{@code
340    * // This snippet has been automatically generated and should be regarded as a code template only.
341    * // It will require modifications to work:
342    * // - It may require correct/in-range values for request initialization.
343    * // - It may require specifying regional endpoints when creating the service client as shown in
344    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
345    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
346    *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
347    *   CustomJob response = jobServiceClient.getCustomJob(name);
348    * }
349    * }</pre>
350    *
351    * @param name Required. The name of the CustomJob resource. Format:
352    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
353    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
354    */
getCustomJob(String name)355   public final CustomJob getCustomJob(String name) {
356     GetCustomJobRequest request = GetCustomJobRequest.newBuilder().setName(name).build();
357     return getCustomJob(request);
358   }
359 
360   // AUTO-GENERATED DOCUMENTATION AND METHOD.
361   /**
362    * Gets a CustomJob.
363    *
364    * <p>Sample code:
365    *
366    * <pre>{@code
367    * // This snippet has been automatically generated and should be regarded as a code template only.
368    * // It will require modifications to work:
369    * // - It may require correct/in-range values for request initialization.
370    * // - It may require specifying regional endpoints when creating the service client as shown in
371    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
372    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
373    *   GetCustomJobRequest request =
374    *       GetCustomJobRequest.newBuilder()
375    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
376    *           .build();
377    *   CustomJob response = jobServiceClient.getCustomJob(request);
378    * }
379    * }</pre>
380    *
381    * @param request The request object containing all of the parameters for the API call.
382    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
383    */
getCustomJob(GetCustomJobRequest request)384   public final CustomJob getCustomJob(GetCustomJobRequest request) {
385     return getCustomJobCallable().call(request);
386   }
387 
388   // AUTO-GENERATED DOCUMENTATION AND METHOD.
389   /**
390    * Gets a CustomJob.
391    *
392    * <p>Sample code:
393    *
394    * <pre>{@code
395    * // This snippet has been automatically generated and should be regarded as a code template only.
396    * // It will require modifications to work:
397    * // - It may require correct/in-range values for request initialization.
398    * // - It may require specifying regional endpoints when creating the service client as shown in
399    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
400    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
401    *   GetCustomJobRequest request =
402    *       GetCustomJobRequest.newBuilder()
403    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
404    *           .build();
405    *   ApiFuture<CustomJob> future = jobServiceClient.getCustomJobCallable().futureCall(request);
406    *   // Do something.
407    *   CustomJob response = future.get();
408    * }
409    * }</pre>
410    */
getCustomJobCallable()411   public final UnaryCallable<GetCustomJobRequest, CustomJob> getCustomJobCallable() {
412     return stub.getCustomJobCallable();
413   }
414 
415   // AUTO-GENERATED DOCUMENTATION AND METHOD.
416   /**
417    * Lists CustomJobs in a Location.
418    *
419    * <p>Sample code:
420    *
421    * <pre>{@code
422    * // This snippet has been automatically generated and should be regarded as a code template only.
423    * // It will require modifications to work:
424    * // - It may require correct/in-range values for request initialization.
425    * // - It may require specifying regional endpoints when creating the service client as shown in
426    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
427    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
428    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
429    *   for (CustomJob element : jobServiceClient.listCustomJobs(parent).iterateAll()) {
430    *     // doThingsWith(element);
431    *   }
432    * }
433    * }</pre>
434    *
435    * @param parent Required. The resource name of the Location to list the CustomJobs from. Format:
436    *     `projects/{project}/locations/{location}`
437    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
438    */
listCustomJobs(LocationName parent)439   public final ListCustomJobsPagedResponse listCustomJobs(LocationName parent) {
440     ListCustomJobsRequest request =
441         ListCustomJobsRequest.newBuilder()
442             .setParent(parent == null ? null : parent.toString())
443             .build();
444     return listCustomJobs(request);
445   }
446 
447   // AUTO-GENERATED DOCUMENTATION AND METHOD.
448   /**
449    * Lists CustomJobs in a Location.
450    *
451    * <p>Sample code:
452    *
453    * <pre>{@code
454    * // This snippet has been automatically generated and should be regarded as a code template only.
455    * // It will require modifications to work:
456    * // - It may require correct/in-range values for request initialization.
457    * // - It may require specifying regional endpoints when creating the service client as shown in
458    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
459    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
460    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
461    *   for (CustomJob element : jobServiceClient.listCustomJobs(parent).iterateAll()) {
462    *     // doThingsWith(element);
463    *   }
464    * }
465    * }</pre>
466    *
467    * @param parent Required. The resource name of the Location to list the CustomJobs from. Format:
468    *     `projects/{project}/locations/{location}`
469    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
470    */
listCustomJobs(String parent)471   public final ListCustomJobsPagedResponse listCustomJobs(String parent) {
472     ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder().setParent(parent).build();
473     return listCustomJobs(request);
474   }
475 
476   // AUTO-GENERATED DOCUMENTATION AND METHOD.
477   /**
478    * Lists CustomJobs in a Location.
479    *
480    * <p>Sample code:
481    *
482    * <pre>{@code
483    * // This snippet has been automatically generated and should be regarded as a code template only.
484    * // It will require modifications to work:
485    * // - It may require correct/in-range values for request initialization.
486    * // - It may require specifying regional endpoints when creating the service client as shown in
487    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
488    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
489    *   ListCustomJobsRequest request =
490    *       ListCustomJobsRequest.newBuilder()
491    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
492    *           .setFilter("filter-1274492040")
493    *           .setPageSize(883849137)
494    *           .setPageToken("pageToken873572522")
495    *           .setReadMask(FieldMask.newBuilder().build())
496    *           .build();
497    *   for (CustomJob element : jobServiceClient.listCustomJobs(request).iterateAll()) {
498    *     // doThingsWith(element);
499    *   }
500    * }
501    * }</pre>
502    *
503    * @param request The request object containing all of the parameters for the API call.
504    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
505    */
listCustomJobs(ListCustomJobsRequest request)506   public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest request) {
507     return listCustomJobsPagedCallable().call(request);
508   }
509 
510   // AUTO-GENERATED DOCUMENTATION AND METHOD.
511   /**
512    * Lists CustomJobs in a Location.
513    *
514    * <p>Sample code:
515    *
516    * <pre>{@code
517    * // This snippet has been automatically generated and should be regarded as a code template only.
518    * // It will require modifications to work:
519    * // - It may require correct/in-range values for request initialization.
520    * // - It may require specifying regional endpoints when creating the service client as shown in
521    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
522    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
523    *   ListCustomJobsRequest request =
524    *       ListCustomJobsRequest.newBuilder()
525    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
526    *           .setFilter("filter-1274492040")
527    *           .setPageSize(883849137)
528    *           .setPageToken("pageToken873572522")
529    *           .setReadMask(FieldMask.newBuilder().build())
530    *           .build();
531    *   ApiFuture<CustomJob> future =
532    *       jobServiceClient.listCustomJobsPagedCallable().futureCall(request);
533    *   // Do something.
534    *   for (CustomJob element : future.get().iterateAll()) {
535    *     // doThingsWith(element);
536    *   }
537    * }
538    * }</pre>
539    */
540   public final UnaryCallable<ListCustomJobsRequest, ListCustomJobsPagedResponse>
listCustomJobsPagedCallable()541       listCustomJobsPagedCallable() {
542     return stub.listCustomJobsPagedCallable();
543   }
544 
545   // AUTO-GENERATED DOCUMENTATION AND METHOD.
546   /**
547    * Lists CustomJobs in a Location.
548    *
549    * <p>Sample code:
550    *
551    * <pre>{@code
552    * // This snippet has been automatically generated and should be regarded as a code template only.
553    * // It will require modifications to work:
554    * // - It may require correct/in-range values for request initialization.
555    * // - It may require specifying regional endpoints when creating the service client as shown in
556    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
557    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
558    *   ListCustomJobsRequest request =
559    *       ListCustomJobsRequest.newBuilder()
560    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
561    *           .setFilter("filter-1274492040")
562    *           .setPageSize(883849137)
563    *           .setPageToken("pageToken873572522")
564    *           .setReadMask(FieldMask.newBuilder().build())
565    *           .build();
566    *   while (true) {
567    *     ListCustomJobsResponse response = jobServiceClient.listCustomJobsCallable().call(request);
568    *     for (CustomJob element : response.getCustomJobsList()) {
569    *       // doThingsWith(element);
570    *     }
571    *     String nextPageToken = response.getNextPageToken();
572    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
573    *       request = request.toBuilder().setPageToken(nextPageToken).build();
574    *     } else {
575    *       break;
576    *     }
577    *   }
578    * }
579    * }</pre>
580    */
581   public final UnaryCallable<ListCustomJobsRequest, ListCustomJobsResponse>
listCustomJobsCallable()582       listCustomJobsCallable() {
583     return stub.listCustomJobsCallable();
584   }
585 
586   // AUTO-GENERATED DOCUMENTATION AND METHOD.
587   /**
588    * Deletes a CustomJob.
589    *
590    * <p>Sample code:
591    *
592    * <pre>{@code
593    * // This snippet has been automatically generated and should be regarded as a code template only.
594    * // It will require modifications to work:
595    * // - It may require correct/in-range values for request initialization.
596    * // - It may require specifying regional endpoints when creating the service client as shown in
597    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
598    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
599    *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
600    *   jobServiceClient.deleteCustomJobAsync(name).get();
601    * }
602    * }</pre>
603    *
604    * @param name Required. The name of the CustomJob resource to be deleted. Format:
605    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
606    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
607    */
deleteCustomJobAsync( CustomJobName name)608   public final OperationFuture<Empty, DeleteOperationMetadata> deleteCustomJobAsync(
609       CustomJobName name) {
610     DeleteCustomJobRequest request =
611         DeleteCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
612     return deleteCustomJobAsync(request);
613   }
614 
615   // AUTO-GENERATED DOCUMENTATION AND METHOD.
616   /**
617    * Deletes a CustomJob.
618    *
619    * <p>Sample code:
620    *
621    * <pre>{@code
622    * // This snippet has been automatically generated and should be regarded as a code template only.
623    * // It will require modifications to work:
624    * // - It may require correct/in-range values for request initialization.
625    * // - It may require specifying regional endpoints when creating the service client as shown in
626    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
627    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
628    *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
629    *   jobServiceClient.deleteCustomJobAsync(name).get();
630    * }
631    * }</pre>
632    *
633    * @param name Required. The name of the CustomJob resource to be deleted. Format:
634    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
635    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
636    */
deleteCustomJobAsync(String name)637   public final OperationFuture<Empty, DeleteOperationMetadata> deleteCustomJobAsync(String name) {
638     DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder().setName(name).build();
639     return deleteCustomJobAsync(request);
640   }
641 
642   // AUTO-GENERATED DOCUMENTATION AND METHOD.
643   /**
644    * Deletes a CustomJob.
645    *
646    * <p>Sample code:
647    *
648    * <pre>{@code
649    * // This snippet has been automatically generated and should be regarded as a code template only.
650    * // It will require modifications to work:
651    * // - It may require correct/in-range values for request initialization.
652    * // - It may require specifying regional endpoints when creating the service client as shown in
653    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
654    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
655    *   DeleteCustomJobRequest request =
656    *       DeleteCustomJobRequest.newBuilder()
657    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
658    *           .build();
659    *   jobServiceClient.deleteCustomJobAsync(request).get();
660    * }
661    * }</pre>
662    *
663    * @param request The request object containing all of the parameters for the API call.
664    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
665    */
deleteCustomJobAsync( DeleteCustomJobRequest request)666   public final OperationFuture<Empty, DeleteOperationMetadata> deleteCustomJobAsync(
667       DeleteCustomJobRequest request) {
668     return deleteCustomJobOperationCallable().futureCall(request);
669   }
670 
671   // AUTO-GENERATED DOCUMENTATION AND METHOD.
672   /**
673    * Deletes a CustomJob.
674    *
675    * <p>Sample code:
676    *
677    * <pre>{@code
678    * // This snippet has been automatically generated and should be regarded as a code template only.
679    * // It will require modifications to work:
680    * // - It may require correct/in-range values for request initialization.
681    * // - It may require specifying regional endpoints when creating the service client as shown in
682    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
683    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
684    *   DeleteCustomJobRequest request =
685    *       DeleteCustomJobRequest.newBuilder()
686    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
687    *           .build();
688    *   OperationFuture<Empty, DeleteOperationMetadata> future =
689    *       jobServiceClient.deleteCustomJobOperationCallable().futureCall(request);
690    *   // Do something.
691    *   future.get();
692    * }
693    * }</pre>
694    */
695   public final OperationCallable<DeleteCustomJobRequest, Empty, DeleteOperationMetadata>
deleteCustomJobOperationCallable()696       deleteCustomJobOperationCallable() {
697     return stub.deleteCustomJobOperationCallable();
698   }
699 
700   // AUTO-GENERATED DOCUMENTATION AND METHOD.
701   /**
702    * Deletes a CustomJob.
703    *
704    * <p>Sample code:
705    *
706    * <pre>{@code
707    * // This snippet has been automatically generated and should be regarded as a code template only.
708    * // It will require modifications to work:
709    * // - It may require correct/in-range values for request initialization.
710    * // - It may require specifying regional endpoints when creating the service client as shown in
711    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
712    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
713    *   DeleteCustomJobRequest request =
714    *       DeleteCustomJobRequest.newBuilder()
715    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
716    *           .build();
717    *   ApiFuture<Operation> future = jobServiceClient.deleteCustomJobCallable().futureCall(request);
718    *   // Do something.
719    *   future.get();
720    * }
721    * }</pre>
722    */
deleteCustomJobCallable()723   public final UnaryCallable<DeleteCustomJobRequest, Operation> deleteCustomJobCallable() {
724     return stub.deleteCustomJobCallable();
725   }
726 
727   // AUTO-GENERATED DOCUMENTATION AND METHOD.
728   /**
729    * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best
730    * effort to cancel the job, but success is not guaranteed. Clients can use
731    * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods
732    * to check whether the cancellation succeeded or whether the job completed despite cancellation.
733    * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a
734    * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a
735    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
736    * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.
737    *
738    * <p>Sample code:
739    *
740    * <pre>{@code
741    * // This snippet has been automatically generated and should be regarded as a code template only.
742    * // It will require modifications to work:
743    * // - It may require correct/in-range values for request initialization.
744    * // - It may require specifying regional endpoints when creating the service client as shown in
745    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
746    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
747    *   CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
748    *   jobServiceClient.cancelCustomJob(name);
749    * }
750    * }</pre>
751    *
752    * @param name Required. The name of the CustomJob to cancel. Format:
753    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
754    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
755    */
cancelCustomJob(CustomJobName name)756   public final void cancelCustomJob(CustomJobName name) {
757     CancelCustomJobRequest request =
758         CancelCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
759     cancelCustomJob(request);
760   }
761 
762   // AUTO-GENERATED DOCUMENTATION AND METHOD.
763   /**
764    * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best
765    * effort to cancel the job, but success is not guaranteed. Clients can use
766    * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods
767    * to check whether the cancellation succeeded or whether the job completed despite cancellation.
768    * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a
769    * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a
770    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
771    * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.
772    *
773    * <p>Sample code:
774    *
775    * <pre>{@code
776    * // This snippet has been automatically generated and should be regarded as a code template only.
777    * // It will require modifications to work:
778    * // - It may require correct/in-range values for request initialization.
779    * // - It may require specifying regional endpoints when creating the service client as shown in
780    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
781    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
782    *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
783    *   jobServiceClient.cancelCustomJob(name);
784    * }
785    * }</pre>
786    *
787    * @param name Required. The name of the CustomJob to cancel. Format:
788    *     `projects/{project}/locations/{location}/customJobs/{custom_job}`
789    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
790    */
cancelCustomJob(String name)791   public final void cancelCustomJob(String name) {
792     CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder().setName(name).build();
793     cancelCustomJob(request);
794   }
795 
796   // AUTO-GENERATED DOCUMENTATION AND METHOD.
797   /**
798    * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best
799    * effort to cancel the job, but success is not guaranteed. Clients can use
800    * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods
801    * to check whether the cancellation succeeded or whether the job completed despite cancellation.
802    * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a
803    * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a
804    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
805    * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.
806    *
807    * <p>Sample code:
808    *
809    * <pre>{@code
810    * // This snippet has been automatically generated and should be regarded as a code template only.
811    * // It will require modifications to work:
812    * // - It may require correct/in-range values for request initialization.
813    * // - It may require specifying regional endpoints when creating the service client as shown in
814    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
815    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
816    *   CancelCustomJobRequest request =
817    *       CancelCustomJobRequest.newBuilder()
818    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
819    *           .build();
820    *   jobServiceClient.cancelCustomJob(request);
821    * }
822    * }</pre>
823    *
824    * @param request The request object containing all of the parameters for the API call.
825    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
826    */
cancelCustomJob(CancelCustomJobRequest request)827   public final void cancelCustomJob(CancelCustomJobRequest request) {
828     cancelCustomJobCallable().call(request);
829   }
830 
831   // AUTO-GENERATED DOCUMENTATION AND METHOD.
832   /**
833    * Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best
834    * effort to cancel the job, but success is not guaranteed. Clients can use
835    * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods
836    * to check whether the cancellation succeeded or whether the job completed despite cancellation.
837    * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a
838    * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a
839    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
840    * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.
841    *
842    * <p>Sample code:
843    *
844    * <pre>{@code
845    * // This snippet has been automatically generated and should be regarded as a code template only.
846    * // It will require modifications to work:
847    * // - It may require correct/in-range values for request initialization.
848    * // - It may require specifying regional endpoints when creating the service client as shown in
849    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
850    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
851    *   CancelCustomJobRequest request =
852    *       CancelCustomJobRequest.newBuilder()
853    *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
854    *           .build();
855    *   ApiFuture<Empty> future = jobServiceClient.cancelCustomJobCallable().futureCall(request);
856    *   // Do something.
857    *   future.get();
858    * }
859    * }</pre>
860    */
cancelCustomJobCallable()861   public final UnaryCallable<CancelCustomJobRequest, Empty> cancelCustomJobCallable() {
862     return stub.cancelCustomJobCallable();
863   }
864 
865   // AUTO-GENERATED DOCUMENTATION AND METHOD.
866   /**
867    * Creates a DataLabelingJob.
868    *
869    * <p>Sample code:
870    *
871    * <pre>{@code
872    * // This snippet has been automatically generated and should be regarded as a code template only.
873    * // It will require modifications to work:
874    * // - It may require correct/in-range values for request initialization.
875    * // - It may require specifying regional endpoints when creating the service client as shown in
876    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
877    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
878    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
879    *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
880    *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent, dataLabelingJob);
881    * }
882    * }</pre>
883    *
884    * @param parent Required. The parent of the DataLabelingJob. Format:
885    *     `projects/{project}/locations/{location}`
886    * @param dataLabelingJob Required. The DataLabelingJob to create.
887    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
888    */
createDataLabelingJob( LocationName parent, DataLabelingJob dataLabelingJob)889   public final DataLabelingJob createDataLabelingJob(
890       LocationName parent, DataLabelingJob dataLabelingJob) {
891     CreateDataLabelingJobRequest request =
892         CreateDataLabelingJobRequest.newBuilder()
893             .setParent(parent == null ? null : parent.toString())
894             .setDataLabelingJob(dataLabelingJob)
895             .build();
896     return createDataLabelingJob(request);
897   }
898 
899   // AUTO-GENERATED DOCUMENTATION AND METHOD.
900   /**
901    * Creates a DataLabelingJob.
902    *
903    * <p>Sample code:
904    *
905    * <pre>{@code
906    * // This snippet has been automatically generated and should be regarded as a code template only.
907    * // It will require modifications to work:
908    * // - It may require correct/in-range values for request initialization.
909    * // - It may require specifying regional endpoints when creating the service client as shown in
910    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
911    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
912    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
913    *   DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build();
914    *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent, dataLabelingJob);
915    * }
916    * }</pre>
917    *
918    * @param parent Required. The parent of the DataLabelingJob. Format:
919    *     `projects/{project}/locations/{location}`
920    * @param dataLabelingJob Required. The DataLabelingJob to create.
921    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
922    */
createDataLabelingJob( String parent, DataLabelingJob dataLabelingJob)923   public final DataLabelingJob createDataLabelingJob(
924       String parent, DataLabelingJob dataLabelingJob) {
925     CreateDataLabelingJobRequest request =
926         CreateDataLabelingJobRequest.newBuilder()
927             .setParent(parent)
928             .setDataLabelingJob(dataLabelingJob)
929             .build();
930     return createDataLabelingJob(request);
931   }
932 
933   // AUTO-GENERATED DOCUMENTATION AND METHOD.
934   /**
935    * Creates a DataLabelingJob.
936    *
937    * <p>Sample code:
938    *
939    * <pre>{@code
940    * // This snippet has been automatically generated and should be regarded as a code template only.
941    * // It will require modifications to work:
942    * // - It may require correct/in-range values for request initialization.
943    * // - It may require specifying regional endpoints when creating the service client as shown in
944    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
945    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
946    *   CreateDataLabelingJobRequest request =
947    *       CreateDataLabelingJobRequest.newBuilder()
948    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
949    *           .setDataLabelingJob(DataLabelingJob.newBuilder().build())
950    *           .build();
951    *   DataLabelingJob response = jobServiceClient.createDataLabelingJob(request);
952    * }
953    * }</pre>
954    *
955    * @param request The request object containing all of the parameters for the API call.
956    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
957    */
createDataLabelingJob(CreateDataLabelingJobRequest request)958   public final DataLabelingJob createDataLabelingJob(CreateDataLabelingJobRequest request) {
959     return createDataLabelingJobCallable().call(request);
960   }
961 
962   // AUTO-GENERATED DOCUMENTATION AND METHOD.
963   /**
964    * Creates a DataLabelingJob.
965    *
966    * <p>Sample code:
967    *
968    * <pre>{@code
969    * // This snippet has been automatically generated and should be regarded as a code template only.
970    * // It will require modifications to work:
971    * // - It may require correct/in-range values for request initialization.
972    * // - It may require specifying regional endpoints when creating the service client as shown in
973    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
974    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
975    *   CreateDataLabelingJobRequest request =
976    *       CreateDataLabelingJobRequest.newBuilder()
977    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
978    *           .setDataLabelingJob(DataLabelingJob.newBuilder().build())
979    *           .build();
980    *   ApiFuture<DataLabelingJob> future =
981    *       jobServiceClient.createDataLabelingJobCallable().futureCall(request);
982    *   // Do something.
983    *   DataLabelingJob response = future.get();
984    * }
985    * }</pre>
986    */
987   public final UnaryCallable<CreateDataLabelingJobRequest, DataLabelingJob>
createDataLabelingJobCallable()988       createDataLabelingJobCallable() {
989     return stub.createDataLabelingJobCallable();
990   }
991 
992   // AUTO-GENERATED DOCUMENTATION AND METHOD.
993   /**
994    * Gets a DataLabelingJob.
995    *
996    * <p>Sample code:
997    *
998    * <pre>{@code
999    * // This snippet has been automatically generated and should be regarded as a code template only.
1000    * // It will require modifications to work:
1001    * // - It may require correct/in-range values for request initialization.
1002    * // - It may require specifying regional endpoints when creating the service client as shown in
1003    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1004    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1005    *   DataLabelingJobName name =
1006    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
1007    *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(name);
1008    * }
1009    * }</pre>
1010    *
1011    * @param name Required. The name of the DataLabelingJob. Format:
1012    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1013    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1014    */
getDataLabelingJob(DataLabelingJobName name)1015   public final DataLabelingJob getDataLabelingJob(DataLabelingJobName name) {
1016     GetDataLabelingJobRequest request =
1017         GetDataLabelingJobRequest.newBuilder()
1018             .setName(name == null ? null : name.toString())
1019             .build();
1020     return getDataLabelingJob(request);
1021   }
1022 
1023   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1024   /**
1025    * Gets a DataLabelingJob.
1026    *
1027    * <p>Sample code:
1028    *
1029    * <pre>{@code
1030    * // This snippet has been automatically generated and should be regarded as a code template only.
1031    * // It will require modifications to work:
1032    * // - It may require correct/in-range values for request initialization.
1033    * // - It may require specifying regional endpoints when creating the service client as shown in
1034    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1035    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1036    *   String name =
1037    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
1038    *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(name);
1039    * }
1040    * }</pre>
1041    *
1042    * @param name Required. The name of the DataLabelingJob. Format:
1043    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1044    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1045    */
getDataLabelingJob(String name)1046   public final DataLabelingJob getDataLabelingJob(String name) {
1047     GetDataLabelingJobRequest request =
1048         GetDataLabelingJobRequest.newBuilder().setName(name).build();
1049     return getDataLabelingJob(request);
1050   }
1051 
1052   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1053   /**
1054    * Gets a DataLabelingJob.
1055    *
1056    * <p>Sample code:
1057    *
1058    * <pre>{@code
1059    * // This snippet has been automatically generated and should be regarded as a code template only.
1060    * // It will require modifications to work:
1061    * // - It may require correct/in-range values for request initialization.
1062    * // - It may require specifying regional endpoints when creating the service client as shown in
1063    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1064    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1065    *   GetDataLabelingJobRequest request =
1066    *       GetDataLabelingJobRequest.newBuilder()
1067    *           .setName(
1068    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1069    *                   .toString())
1070    *           .build();
1071    *   DataLabelingJob response = jobServiceClient.getDataLabelingJob(request);
1072    * }
1073    * }</pre>
1074    *
1075    * @param request The request object containing all of the parameters for the API call.
1076    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1077    */
getDataLabelingJob(GetDataLabelingJobRequest request)1078   public final DataLabelingJob getDataLabelingJob(GetDataLabelingJobRequest request) {
1079     return getDataLabelingJobCallable().call(request);
1080   }
1081 
1082   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1083   /**
1084    * Gets a DataLabelingJob.
1085    *
1086    * <p>Sample code:
1087    *
1088    * <pre>{@code
1089    * // This snippet has been automatically generated and should be regarded as a code template only.
1090    * // It will require modifications to work:
1091    * // - It may require correct/in-range values for request initialization.
1092    * // - It may require specifying regional endpoints when creating the service client as shown in
1093    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1094    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1095    *   GetDataLabelingJobRequest request =
1096    *       GetDataLabelingJobRequest.newBuilder()
1097    *           .setName(
1098    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1099    *                   .toString())
1100    *           .build();
1101    *   ApiFuture<DataLabelingJob> future =
1102    *       jobServiceClient.getDataLabelingJobCallable().futureCall(request);
1103    *   // Do something.
1104    *   DataLabelingJob response = future.get();
1105    * }
1106    * }</pre>
1107    */
1108   public final UnaryCallable<GetDataLabelingJobRequest, DataLabelingJob>
getDataLabelingJobCallable()1109       getDataLabelingJobCallable() {
1110     return stub.getDataLabelingJobCallable();
1111   }
1112 
1113   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1114   /**
1115    * Lists DataLabelingJobs in a Location.
1116    *
1117    * <p>Sample code:
1118    *
1119    * <pre>{@code
1120    * // This snippet has been automatically generated and should be regarded as a code template only.
1121    * // It will require modifications to work:
1122    * // - It may require correct/in-range values for request initialization.
1123    * // - It may require specifying regional endpoints when creating the service client as shown in
1124    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1125    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1126    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1127    *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent).iterateAll()) {
1128    *     // doThingsWith(element);
1129    *   }
1130    * }
1131    * }</pre>
1132    *
1133    * @param parent Required. The parent of the DataLabelingJob. Format:
1134    *     `projects/{project}/locations/{location}`
1135    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1136    */
listDataLabelingJobs(LocationName parent)1137   public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(LocationName parent) {
1138     ListDataLabelingJobsRequest request =
1139         ListDataLabelingJobsRequest.newBuilder()
1140             .setParent(parent == null ? null : parent.toString())
1141             .build();
1142     return listDataLabelingJobs(request);
1143   }
1144 
1145   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1146   /**
1147    * Lists DataLabelingJobs in a Location.
1148    *
1149    * <p>Sample code:
1150    *
1151    * <pre>{@code
1152    * // This snippet has been automatically generated and should be regarded as a code template only.
1153    * // It will require modifications to work:
1154    * // - It may require correct/in-range values for request initialization.
1155    * // - It may require specifying regional endpoints when creating the service client as shown in
1156    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1157    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1158    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1159    *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent).iterateAll()) {
1160    *     // doThingsWith(element);
1161    *   }
1162    * }
1163    * }</pre>
1164    *
1165    * @param parent Required. The parent of the DataLabelingJob. Format:
1166    *     `projects/{project}/locations/{location}`
1167    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1168    */
listDataLabelingJobs(String parent)1169   public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(String parent) {
1170     ListDataLabelingJobsRequest request =
1171         ListDataLabelingJobsRequest.newBuilder().setParent(parent).build();
1172     return listDataLabelingJobs(request);
1173   }
1174 
1175   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1176   /**
1177    * Lists DataLabelingJobs in a Location.
1178    *
1179    * <p>Sample code:
1180    *
1181    * <pre>{@code
1182    * // This snippet has been automatically generated and should be regarded as a code template only.
1183    * // It will require modifications to work:
1184    * // - It may require correct/in-range values for request initialization.
1185    * // - It may require specifying regional endpoints when creating the service client as shown in
1186    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1187    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1188    *   ListDataLabelingJobsRequest request =
1189    *       ListDataLabelingJobsRequest.newBuilder()
1190    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1191    *           .setFilter("filter-1274492040")
1192    *           .setPageSize(883849137)
1193    *           .setPageToken("pageToken873572522")
1194    *           .setReadMask(FieldMask.newBuilder().build())
1195    *           .setOrderBy("orderBy-1207110587")
1196    *           .build();
1197    *   for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(request).iterateAll()) {
1198    *     // doThingsWith(element);
1199    *   }
1200    * }
1201    * }</pre>
1202    *
1203    * @param request The request object containing all of the parameters for the API call.
1204    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1205    */
listDataLabelingJobs( ListDataLabelingJobsRequest request)1206   public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(
1207       ListDataLabelingJobsRequest request) {
1208     return listDataLabelingJobsPagedCallable().call(request);
1209   }
1210 
1211   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1212   /**
1213    * Lists DataLabelingJobs in a Location.
1214    *
1215    * <p>Sample code:
1216    *
1217    * <pre>{@code
1218    * // This snippet has been automatically generated and should be regarded as a code template only.
1219    * // It will require modifications to work:
1220    * // - It may require correct/in-range values for request initialization.
1221    * // - It may require specifying regional endpoints when creating the service client as shown in
1222    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1223    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1224    *   ListDataLabelingJobsRequest request =
1225    *       ListDataLabelingJobsRequest.newBuilder()
1226    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1227    *           .setFilter("filter-1274492040")
1228    *           .setPageSize(883849137)
1229    *           .setPageToken("pageToken873572522")
1230    *           .setReadMask(FieldMask.newBuilder().build())
1231    *           .setOrderBy("orderBy-1207110587")
1232    *           .build();
1233    *   ApiFuture<DataLabelingJob> future =
1234    *       jobServiceClient.listDataLabelingJobsPagedCallable().futureCall(request);
1235    *   // Do something.
1236    *   for (DataLabelingJob element : future.get().iterateAll()) {
1237    *     // doThingsWith(element);
1238    *   }
1239    * }
1240    * }</pre>
1241    */
1242   public final UnaryCallable<ListDataLabelingJobsRequest, ListDataLabelingJobsPagedResponse>
listDataLabelingJobsPagedCallable()1243       listDataLabelingJobsPagedCallable() {
1244     return stub.listDataLabelingJobsPagedCallable();
1245   }
1246 
1247   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1248   /**
1249    * Lists DataLabelingJobs in a Location.
1250    *
1251    * <p>Sample code:
1252    *
1253    * <pre>{@code
1254    * // This snippet has been automatically generated and should be regarded as a code template only.
1255    * // It will require modifications to work:
1256    * // - It may require correct/in-range values for request initialization.
1257    * // - It may require specifying regional endpoints when creating the service client as shown in
1258    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1259    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1260    *   ListDataLabelingJobsRequest request =
1261    *       ListDataLabelingJobsRequest.newBuilder()
1262    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1263    *           .setFilter("filter-1274492040")
1264    *           .setPageSize(883849137)
1265    *           .setPageToken("pageToken873572522")
1266    *           .setReadMask(FieldMask.newBuilder().build())
1267    *           .setOrderBy("orderBy-1207110587")
1268    *           .build();
1269    *   while (true) {
1270    *     ListDataLabelingJobsResponse response =
1271    *         jobServiceClient.listDataLabelingJobsCallable().call(request);
1272    *     for (DataLabelingJob element : response.getDataLabelingJobsList()) {
1273    *       // doThingsWith(element);
1274    *     }
1275    *     String nextPageToken = response.getNextPageToken();
1276    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1277    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1278    *     } else {
1279    *       break;
1280    *     }
1281    *   }
1282    * }
1283    * }</pre>
1284    */
1285   public final UnaryCallable<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse>
listDataLabelingJobsCallable()1286       listDataLabelingJobsCallable() {
1287     return stub.listDataLabelingJobsCallable();
1288   }
1289 
1290   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1291   /**
1292    * Deletes a DataLabelingJob.
1293    *
1294    * <p>Sample code:
1295    *
1296    * <pre>{@code
1297    * // This snippet has been automatically generated and should be regarded as a code template only.
1298    * // It will require modifications to work:
1299    * // - It may require correct/in-range values for request initialization.
1300    * // - It may require specifying regional endpoints when creating the service client as shown in
1301    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1302    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1303    *   DataLabelingJobName name =
1304    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
1305    *   jobServiceClient.deleteDataLabelingJobAsync(name).get();
1306    * }
1307    * }</pre>
1308    *
1309    * @param name Required. The name of the DataLabelingJob to be deleted. Format:
1310    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1311    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1312    */
deleteDataLabelingJobAsync( DataLabelingJobName name)1313   public final OperationFuture<Empty, DeleteOperationMetadata> deleteDataLabelingJobAsync(
1314       DataLabelingJobName name) {
1315     DeleteDataLabelingJobRequest request =
1316         DeleteDataLabelingJobRequest.newBuilder()
1317             .setName(name == null ? null : name.toString())
1318             .build();
1319     return deleteDataLabelingJobAsync(request);
1320   }
1321 
1322   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1323   /**
1324    * Deletes a DataLabelingJob.
1325    *
1326    * <p>Sample code:
1327    *
1328    * <pre>{@code
1329    * // This snippet has been automatically generated and should be regarded as a code template only.
1330    * // It will require modifications to work:
1331    * // - It may require correct/in-range values for request initialization.
1332    * // - It may require specifying regional endpoints when creating the service client as shown in
1333    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1334    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1335    *   String name =
1336    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
1337    *   jobServiceClient.deleteDataLabelingJobAsync(name).get();
1338    * }
1339    * }</pre>
1340    *
1341    * @param name Required. The name of the DataLabelingJob to be deleted. Format:
1342    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1343    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1344    */
deleteDataLabelingJobAsync( String name)1345   public final OperationFuture<Empty, DeleteOperationMetadata> deleteDataLabelingJobAsync(
1346       String name) {
1347     DeleteDataLabelingJobRequest request =
1348         DeleteDataLabelingJobRequest.newBuilder().setName(name).build();
1349     return deleteDataLabelingJobAsync(request);
1350   }
1351 
1352   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1353   /**
1354    * Deletes a DataLabelingJob.
1355    *
1356    * <p>Sample code:
1357    *
1358    * <pre>{@code
1359    * // This snippet has been automatically generated and should be regarded as a code template only.
1360    * // It will require modifications to work:
1361    * // - It may require correct/in-range values for request initialization.
1362    * // - It may require specifying regional endpoints when creating the service client as shown in
1363    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1364    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1365    *   DeleteDataLabelingJobRequest request =
1366    *       DeleteDataLabelingJobRequest.newBuilder()
1367    *           .setName(
1368    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1369    *                   .toString())
1370    *           .build();
1371    *   jobServiceClient.deleteDataLabelingJobAsync(request).get();
1372    * }
1373    * }</pre>
1374    *
1375    * @param request The request object containing all of the parameters for the API call.
1376    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1377    */
deleteDataLabelingJobAsync( DeleteDataLabelingJobRequest request)1378   public final OperationFuture<Empty, DeleteOperationMetadata> deleteDataLabelingJobAsync(
1379       DeleteDataLabelingJobRequest request) {
1380     return deleteDataLabelingJobOperationCallable().futureCall(request);
1381   }
1382 
1383   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1384   /**
1385    * Deletes a DataLabelingJob.
1386    *
1387    * <p>Sample code:
1388    *
1389    * <pre>{@code
1390    * // This snippet has been automatically generated and should be regarded as a code template only.
1391    * // It will require modifications to work:
1392    * // - It may require correct/in-range values for request initialization.
1393    * // - It may require specifying regional endpoints when creating the service client as shown in
1394    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1395    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1396    *   DeleteDataLabelingJobRequest request =
1397    *       DeleteDataLabelingJobRequest.newBuilder()
1398    *           .setName(
1399    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1400    *                   .toString())
1401    *           .build();
1402    *   OperationFuture<Empty, DeleteOperationMetadata> future =
1403    *       jobServiceClient.deleteDataLabelingJobOperationCallable().futureCall(request);
1404    *   // Do something.
1405    *   future.get();
1406    * }
1407    * }</pre>
1408    */
1409   public final OperationCallable<DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata>
deleteDataLabelingJobOperationCallable()1410       deleteDataLabelingJobOperationCallable() {
1411     return stub.deleteDataLabelingJobOperationCallable();
1412   }
1413 
1414   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1415   /**
1416    * Deletes a DataLabelingJob.
1417    *
1418    * <p>Sample code:
1419    *
1420    * <pre>{@code
1421    * // This snippet has been automatically generated and should be regarded as a code template only.
1422    * // It will require modifications to work:
1423    * // - It may require correct/in-range values for request initialization.
1424    * // - It may require specifying regional endpoints when creating the service client as shown in
1425    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1426    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1427    *   DeleteDataLabelingJobRequest request =
1428    *       DeleteDataLabelingJobRequest.newBuilder()
1429    *           .setName(
1430    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1431    *                   .toString())
1432    *           .build();
1433    *   ApiFuture<Operation> future =
1434    *       jobServiceClient.deleteDataLabelingJobCallable().futureCall(request);
1435    *   // Do something.
1436    *   future.get();
1437    * }
1438    * }</pre>
1439    */
1440   public final UnaryCallable<DeleteDataLabelingJobRequest, Operation>
deleteDataLabelingJobCallable()1441       deleteDataLabelingJobCallable() {
1442     return stub.deleteDataLabelingJobCallable();
1443   }
1444 
1445   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1446   /**
1447    * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
1448    *
1449    * <p>Sample code:
1450    *
1451    * <pre>{@code
1452    * // This snippet has been automatically generated and should be regarded as a code template only.
1453    * // It will require modifications to work:
1454    * // - It may require correct/in-range values for request initialization.
1455    * // - It may require specifying regional endpoints when creating the service client as shown in
1456    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1457    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1458    *   DataLabelingJobName name =
1459    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
1460    *   jobServiceClient.cancelDataLabelingJob(name);
1461    * }
1462    * }</pre>
1463    *
1464    * @param name Required. The name of the DataLabelingJob. Format:
1465    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1466    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1467    */
cancelDataLabelingJob(DataLabelingJobName name)1468   public final void cancelDataLabelingJob(DataLabelingJobName name) {
1469     CancelDataLabelingJobRequest request =
1470         CancelDataLabelingJobRequest.newBuilder()
1471             .setName(name == null ? null : name.toString())
1472             .build();
1473     cancelDataLabelingJob(request);
1474   }
1475 
1476   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1477   /**
1478    * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
1479    *
1480    * <p>Sample code:
1481    *
1482    * <pre>{@code
1483    * // This snippet has been automatically generated and should be regarded as a code template only.
1484    * // It will require modifications to work:
1485    * // - It may require correct/in-range values for request initialization.
1486    * // - It may require specifying regional endpoints when creating the service client as shown in
1487    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1488    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1489    *   String name =
1490    *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
1491    *   jobServiceClient.cancelDataLabelingJob(name);
1492    * }
1493    * }</pre>
1494    *
1495    * @param name Required. The name of the DataLabelingJob. Format:
1496    *     `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1497    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1498    */
cancelDataLabelingJob(String name)1499   public final void cancelDataLabelingJob(String name) {
1500     CancelDataLabelingJobRequest request =
1501         CancelDataLabelingJobRequest.newBuilder().setName(name).build();
1502     cancelDataLabelingJob(request);
1503   }
1504 
1505   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1506   /**
1507    * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
1508    *
1509    * <p>Sample code:
1510    *
1511    * <pre>{@code
1512    * // This snippet has been automatically generated and should be regarded as a code template only.
1513    * // It will require modifications to work:
1514    * // - It may require correct/in-range values for request initialization.
1515    * // - It may require specifying regional endpoints when creating the service client as shown in
1516    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1517    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1518    *   CancelDataLabelingJobRequest request =
1519    *       CancelDataLabelingJobRequest.newBuilder()
1520    *           .setName(
1521    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1522    *                   .toString())
1523    *           .build();
1524    *   jobServiceClient.cancelDataLabelingJob(request);
1525    * }
1526    * }</pre>
1527    *
1528    * @param request The request object containing all of the parameters for the API call.
1529    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1530    */
cancelDataLabelingJob(CancelDataLabelingJobRequest request)1531   public final void cancelDataLabelingJob(CancelDataLabelingJobRequest request) {
1532     cancelDataLabelingJobCallable().call(request);
1533   }
1534 
1535   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1536   /**
1537    * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
1538    *
1539    * <p>Sample code:
1540    *
1541    * <pre>{@code
1542    * // This snippet has been automatically generated and should be regarded as a code template only.
1543    * // It will require modifications to work:
1544    * // - It may require correct/in-range values for request initialization.
1545    * // - It may require specifying regional endpoints when creating the service client as shown in
1546    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1547    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1548    *   CancelDataLabelingJobRequest request =
1549    *       CancelDataLabelingJobRequest.newBuilder()
1550    *           .setName(
1551    *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
1552    *                   .toString())
1553    *           .build();
1554    *   ApiFuture<Empty> future =
1555    *       jobServiceClient.cancelDataLabelingJobCallable().futureCall(request);
1556    *   // Do something.
1557    *   future.get();
1558    * }
1559    * }</pre>
1560    */
cancelDataLabelingJobCallable()1561   public final UnaryCallable<CancelDataLabelingJobRequest, Empty> cancelDataLabelingJobCallable() {
1562     return stub.cancelDataLabelingJobCallable();
1563   }
1564 
1565   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1566   /**
1567    * Creates a HyperparameterTuningJob
1568    *
1569    * <p>Sample code:
1570    *
1571    * <pre>{@code
1572    * // This snippet has been automatically generated and should be regarded as a code template only.
1573    * // It will require modifications to work:
1574    * // - It may require correct/in-range values for request initialization.
1575    * // - It may require specifying regional endpoints when creating the service client as shown in
1576    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1577    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1578    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1579    *   HyperparameterTuningJob hyperparameterTuningJob =
1580    *       HyperparameterTuningJob.newBuilder().build();
1581    *   HyperparameterTuningJob response =
1582    *       jobServiceClient.createHyperparameterTuningJob(parent, hyperparameterTuningJob);
1583    * }
1584    * }</pre>
1585    *
1586    * @param parent Required. The resource name of the Location to create the HyperparameterTuningJob
1587    *     in. Format: `projects/{project}/locations/{location}`
1588    * @param hyperparameterTuningJob Required. The HyperparameterTuningJob to create.
1589    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1590    */
createHyperparameterTuningJob( LocationName parent, HyperparameterTuningJob hyperparameterTuningJob)1591   public final HyperparameterTuningJob createHyperparameterTuningJob(
1592       LocationName parent, HyperparameterTuningJob hyperparameterTuningJob) {
1593     CreateHyperparameterTuningJobRequest request =
1594         CreateHyperparameterTuningJobRequest.newBuilder()
1595             .setParent(parent == null ? null : parent.toString())
1596             .setHyperparameterTuningJob(hyperparameterTuningJob)
1597             .build();
1598     return createHyperparameterTuningJob(request);
1599   }
1600 
1601   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1602   /**
1603    * Creates a HyperparameterTuningJob
1604    *
1605    * <p>Sample code:
1606    *
1607    * <pre>{@code
1608    * // This snippet has been automatically generated and should be regarded as a code template only.
1609    * // It will require modifications to work:
1610    * // - It may require correct/in-range values for request initialization.
1611    * // - It may require specifying regional endpoints when creating the service client as shown in
1612    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1613    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1614    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1615    *   HyperparameterTuningJob hyperparameterTuningJob =
1616    *       HyperparameterTuningJob.newBuilder().build();
1617    *   HyperparameterTuningJob response =
1618    *       jobServiceClient.createHyperparameterTuningJob(parent, hyperparameterTuningJob);
1619    * }
1620    * }</pre>
1621    *
1622    * @param parent Required. The resource name of the Location to create the HyperparameterTuningJob
1623    *     in. Format: `projects/{project}/locations/{location}`
1624    * @param hyperparameterTuningJob Required. The HyperparameterTuningJob to create.
1625    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1626    */
createHyperparameterTuningJob( String parent, HyperparameterTuningJob hyperparameterTuningJob)1627   public final HyperparameterTuningJob createHyperparameterTuningJob(
1628       String parent, HyperparameterTuningJob hyperparameterTuningJob) {
1629     CreateHyperparameterTuningJobRequest request =
1630         CreateHyperparameterTuningJobRequest.newBuilder()
1631             .setParent(parent)
1632             .setHyperparameterTuningJob(hyperparameterTuningJob)
1633             .build();
1634     return createHyperparameterTuningJob(request);
1635   }
1636 
1637   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1638   /**
1639    * Creates a HyperparameterTuningJob
1640    *
1641    * <p>Sample code:
1642    *
1643    * <pre>{@code
1644    * // This snippet has been automatically generated and should be regarded as a code template only.
1645    * // It will require modifications to work:
1646    * // - It may require correct/in-range values for request initialization.
1647    * // - It may require specifying regional endpoints when creating the service client as shown in
1648    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1649    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1650    *   CreateHyperparameterTuningJobRequest request =
1651    *       CreateHyperparameterTuningJobRequest.newBuilder()
1652    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1653    *           .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build())
1654    *           .build();
1655    *   HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(request);
1656    * }
1657    * }</pre>
1658    *
1659    * @param request The request object containing all of the parameters for the API call.
1660    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1661    */
createHyperparameterTuningJob( CreateHyperparameterTuningJobRequest request)1662   public final HyperparameterTuningJob createHyperparameterTuningJob(
1663       CreateHyperparameterTuningJobRequest request) {
1664     return createHyperparameterTuningJobCallable().call(request);
1665   }
1666 
1667   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1668   /**
1669    * Creates a HyperparameterTuningJob
1670    *
1671    * <p>Sample code:
1672    *
1673    * <pre>{@code
1674    * // This snippet has been automatically generated and should be regarded as a code template only.
1675    * // It will require modifications to work:
1676    * // - It may require correct/in-range values for request initialization.
1677    * // - It may require specifying regional endpoints when creating the service client as shown in
1678    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1679    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1680    *   CreateHyperparameterTuningJobRequest request =
1681    *       CreateHyperparameterTuningJobRequest.newBuilder()
1682    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1683    *           .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build())
1684    *           .build();
1685    *   ApiFuture<HyperparameterTuningJob> future =
1686    *       jobServiceClient.createHyperparameterTuningJobCallable().futureCall(request);
1687    *   // Do something.
1688    *   HyperparameterTuningJob response = future.get();
1689    * }
1690    * }</pre>
1691    */
1692   public final UnaryCallable<CreateHyperparameterTuningJobRequest, HyperparameterTuningJob>
createHyperparameterTuningJobCallable()1693       createHyperparameterTuningJobCallable() {
1694     return stub.createHyperparameterTuningJobCallable();
1695   }
1696 
1697   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1698   /**
1699    * Gets a HyperparameterTuningJob
1700    *
1701    * <p>Sample code:
1702    *
1703    * <pre>{@code
1704    * // This snippet has been automatically generated and should be regarded as a code template only.
1705    * // It will require modifications to work:
1706    * // - It may require correct/in-range values for request initialization.
1707    * // - It may require specifying regional endpoints when creating the service client as shown in
1708    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1709    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1710    *   HyperparameterTuningJobName name =
1711    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
1712    *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name);
1713    * }
1714    * }</pre>
1715    *
1716    * @param name Required. The name of the HyperparameterTuningJob resource. Format:
1717    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
1718    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1719    */
getHyperparameterTuningJob( HyperparameterTuningJobName name)1720   public final HyperparameterTuningJob getHyperparameterTuningJob(
1721       HyperparameterTuningJobName name) {
1722     GetHyperparameterTuningJobRequest request =
1723         GetHyperparameterTuningJobRequest.newBuilder()
1724             .setName(name == null ? null : name.toString())
1725             .build();
1726     return getHyperparameterTuningJob(request);
1727   }
1728 
1729   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1730   /**
1731    * Gets a HyperparameterTuningJob
1732    *
1733    * <p>Sample code:
1734    *
1735    * <pre>{@code
1736    * // This snippet has been automatically generated and should be regarded as a code template only.
1737    * // It will require modifications to work:
1738    * // - It may require correct/in-range values for request initialization.
1739    * // - It may require specifying regional endpoints when creating the service client as shown in
1740    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1741    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1742    *   String name =
1743    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
1744    *           .toString();
1745    *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name);
1746    * }
1747    * }</pre>
1748    *
1749    * @param name Required. The name of the HyperparameterTuningJob resource. Format:
1750    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
1751    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1752    */
getHyperparameterTuningJob(String name)1753   public final HyperparameterTuningJob getHyperparameterTuningJob(String name) {
1754     GetHyperparameterTuningJobRequest request =
1755         GetHyperparameterTuningJobRequest.newBuilder().setName(name).build();
1756     return getHyperparameterTuningJob(request);
1757   }
1758 
1759   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1760   /**
1761    * Gets a HyperparameterTuningJob
1762    *
1763    * <p>Sample code:
1764    *
1765    * <pre>{@code
1766    * // This snippet has been automatically generated and should be regarded as a code template only.
1767    * // It will require modifications to work:
1768    * // - It may require correct/in-range values for request initialization.
1769    * // - It may require specifying regional endpoints when creating the service client as shown in
1770    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1771    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1772    *   GetHyperparameterTuningJobRequest request =
1773    *       GetHyperparameterTuningJobRequest.newBuilder()
1774    *           .setName(
1775    *               HyperparameterTuningJobName.of(
1776    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
1777    *                   .toString())
1778    *           .build();
1779    *   HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(request);
1780    * }
1781    * }</pre>
1782    *
1783    * @param request The request object containing all of the parameters for the API call.
1784    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1785    */
getHyperparameterTuningJob( GetHyperparameterTuningJobRequest request)1786   public final HyperparameterTuningJob getHyperparameterTuningJob(
1787       GetHyperparameterTuningJobRequest request) {
1788     return getHyperparameterTuningJobCallable().call(request);
1789   }
1790 
1791   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1792   /**
1793    * Gets a HyperparameterTuningJob
1794    *
1795    * <p>Sample code:
1796    *
1797    * <pre>{@code
1798    * // This snippet has been automatically generated and should be regarded as a code template only.
1799    * // It will require modifications to work:
1800    * // - It may require correct/in-range values for request initialization.
1801    * // - It may require specifying regional endpoints when creating the service client as shown in
1802    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1803    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1804    *   GetHyperparameterTuningJobRequest request =
1805    *       GetHyperparameterTuningJobRequest.newBuilder()
1806    *           .setName(
1807    *               HyperparameterTuningJobName.of(
1808    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
1809    *                   .toString())
1810    *           .build();
1811    *   ApiFuture<HyperparameterTuningJob> future =
1812    *       jobServiceClient.getHyperparameterTuningJobCallable().futureCall(request);
1813    *   // Do something.
1814    *   HyperparameterTuningJob response = future.get();
1815    * }
1816    * }</pre>
1817    */
1818   public final UnaryCallable<GetHyperparameterTuningJobRequest, HyperparameterTuningJob>
getHyperparameterTuningJobCallable()1819       getHyperparameterTuningJobCallable() {
1820     return stub.getHyperparameterTuningJobCallable();
1821   }
1822 
1823   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1824   /**
1825    * Lists HyperparameterTuningJobs in a Location.
1826    *
1827    * <p>Sample code:
1828    *
1829    * <pre>{@code
1830    * // This snippet has been automatically generated and should be regarded as a code template only.
1831    * // It will require modifications to work:
1832    * // - It may require correct/in-range values for request initialization.
1833    * // - It may require specifying regional endpoints when creating the service client as shown in
1834    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1835    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1836    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1837    *   for (HyperparameterTuningJob element :
1838    *       jobServiceClient.listHyperparameterTuningJobs(parent).iterateAll()) {
1839    *     // doThingsWith(element);
1840    *   }
1841    * }
1842    * }</pre>
1843    *
1844    * @param parent Required. The resource name of the Location to list the HyperparameterTuningJobs
1845    *     from. Format: `projects/{project}/locations/{location}`
1846    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1847    */
listHyperparameterTuningJobs( LocationName parent)1848   public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(
1849       LocationName parent) {
1850     ListHyperparameterTuningJobsRequest request =
1851         ListHyperparameterTuningJobsRequest.newBuilder()
1852             .setParent(parent == null ? null : parent.toString())
1853             .build();
1854     return listHyperparameterTuningJobs(request);
1855   }
1856 
1857   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1858   /**
1859    * Lists HyperparameterTuningJobs in a Location.
1860    *
1861    * <p>Sample code:
1862    *
1863    * <pre>{@code
1864    * // This snippet has been automatically generated and should be regarded as a code template only.
1865    * // It will require modifications to work:
1866    * // - It may require correct/in-range values for request initialization.
1867    * // - It may require specifying regional endpoints when creating the service client as shown in
1868    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1869    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1870    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1871    *   for (HyperparameterTuningJob element :
1872    *       jobServiceClient.listHyperparameterTuningJobs(parent).iterateAll()) {
1873    *     // doThingsWith(element);
1874    *   }
1875    * }
1876    * }</pre>
1877    *
1878    * @param parent Required. The resource name of the Location to list the HyperparameterTuningJobs
1879    *     from. Format: `projects/{project}/locations/{location}`
1880    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1881    */
listHyperparameterTuningJobs( String parent)1882   public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(
1883       String parent) {
1884     ListHyperparameterTuningJobsRequest request =
1885         ListHyperparameterTuningJobsRequest.newBuilder().setParent(parent).build();
1886     return listHyperparameterTuningJobs(request);
1887   }
1888 
1889   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1890   /**
1891    * Lists HyperparameterTuningJobs in a Location.
1892    *
1893    * <p>Sample code:
1894    *
1895    * <pre>{@code
1896    * // This snippet has been automatically generated and should be regarded as a code template only.
1897    * // It will require modifications to work:
1898    * // - It may require correct/in-range values for request initialization.
1899    * // - It may require specifying regional endpoints when creating the service client as shown in
1900    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1901    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1902    *   ListHyperparameterTuningJobsRequest request =
1903    *       ListHyperparameterTuningJobsRequest.newBuilder()
1904    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1905    *           .setFilter("filter-1274492040")
1906    *           .setPageSize(883849137)
1907    *           .setPageToken("pageToken873572522")
1908    *           .setReadMask(FieldMask.newBuilder().build())
1909    *           .build();
1910    *   for (HyperparameterTuningJob element :
1911    *       jobServiceClient.listHyperparameterTuningJobs(request).iterateAll()) {
1912    *     // doThingsWith(element);
1913    *   }
1914    * }
1915    * }</pre>
1916    *
1917    * @param request The request object containing all of the parameters for the API call.
1918    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1919    */
listHyperparameterTuningJobs( ListHyperparameterTuningJobsRequest request)1920   public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(
1921       ListHyperparameterTuningJobsRequest request) {
1922     return listHyperparameterTuningJobsPagedCallable().call(request);
1923   }
1924 
1925   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1926   /**
1927    * Lists HyperparameterTuningJobs in a Location.
1928    *
1929    * <p>Sample code:
1930    *
1931    * <pre>{@code
1932    * // This snippet has been automatically generated and should be regarded as a code template only.
1933    * // It will require modifications to work:
1934    * // - It may require correct/in-range values for request initialization.
1935    * // - It may require specifying regional endpoints when creating the service client as shown in
1936    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1937    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1938    *   ListHyperparameterTuningJobsRequest request =
1939    *       ListHyperparameterTuningJobsRequest.newBuilder()
1940    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1941    *           .setFilter("filter-1274492040")
1942    *           .setPageSize(883849137)
1943    *           .setPageToken("pageToken873572522")
1944    *           .setReadMask(FieldMask.newBuilder().build())
1945    *           .build();
1946    *   ApiFuture<HyperparameterTuningJob> future =
1947    *       jobServiceClient.listHyperparameterTuningJobsPagedCallable().futureCall(request);
1948    *   // Do something.
1949    *   for (HyperparameterTuningJob element : future.get().iterateAll()) {
1950    *     // doThingsWith(element);
1951    *   }
1952    * }
1953    * }</pre>
1954    */
1955   public final UnaryCallable<
1956           ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse>
listHyperparameterTuningJobsPagedCallable()1957       listHyperparameterTuningJobsPagedCallable() {
1958     return stub.listHyperparameterTuningJobsPagedCallable();
1959   }
1960 
1961   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1962   /**
1963    * Lists HyperparameterTuningJobs in a Location.
1964    *
1965    * <p>Sample code:
1966    *
1967    * <pre>{@code
1968    * // This snippet has been automatically generated and should be regarded as a code template only.
1969    * // It will require modifications to work:
1970    * // - It may require correct/in-range values for request initialization.
1971    * // - It may require specifying regional endpoints when creating the service client as shown in
1972    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1973    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
1974    *   ListHyperparameterTuningJobsRequest request =
1975    *       ListHyperparameterTuningJobsRequest.newBuilder()
1976    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1977    *           .setFilter("filter-1274492040")
1978    *           .setPageSize(883849137)
1979    *           .setPageToken("pageToken873572522")
1980    *           .setReadMask(FieldMask.newBuilder().build())
1981    *           .build();
1982    *   while (true) {
1983    *     ListHyperparameterTuningJobsResponse response =
1984    *         jobServiceClient.listHyperparameterTuningJobsCallable().call(request);
1985    *     for (HyperparameterTuningJob element : response.getHyperparameterTuningJobsList()) {
1986    *       // doThingsWith(element);
1987    *     }
1988    *     String nextPageToken = response.getNextPageToken();
1989    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1990    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1991    *     } else {
1992    *       break;
1993    *     }
1994    *   }
1995    * }
1996    * }</pre>
1997    */
1998   public final UnaryCallable<
1999           ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse>
listHyperparameterTuningJobsCallable()2000       listHyperparameterTuningJobsCallable() {
2001     return stub.listHyperparameterTuningJobsCallable();
2002   }
2003 
2004   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2005   /**
2006    * Deletes a HyperparameterTuningJob.
2007    *
2008    * <p>Sample code:
2009    *
2010    * <pre>{@code
2011    * // This snippet has been automatically generated and should be regarded as a code template only.
2012    * // It will require modifications to work:
2013    * // - It may require correct/in-range values for request initialization.
2014    * // - It may require specifying regional endpoints when creating the service client as shown in
2015    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2016    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2017    *   HyperparameterTuningJobName name =
2018    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
2019    *   jobServiceClient.deleteHyperparameterTuningJobAsync(name).get();
2020    * }
2021    * }</pre>
2022    *
2023    * @param name Required. The name of the HyperparameterTuningJob resource to be deleted. Format:
2024    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
2025    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2026    */
deleteHyperparameterTuningJobAsync( HyperparameterTuningJobName name)2027   public final OperationFuture<Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(
2028       HyperparameterTuningJobName name) {
2029     DeleteHyperparameterTuningJobRequest request =
2030         DeleteHyperparameterTuningJobRequest.newBuilder()
2031             .setName(name == null ? null : name.toString())
2032             .build();
2033     return deleteHyperparameterTuningJobAsync(request);
2034   }
2035 
2036   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2037   /**
2038    * Deletes a HyperparameterTuningJob.
2039    *
2040    * <p>Sample code:
2041    *
2042    * <pre>{@code
2043    * // This snippet has been automatically generated and should be regarded as a code template only.
2044    * // It will require modifications to work:
2045    * // - It may require correct/in-range values for request initialization.
2046    * // - It may require specifying regional endpoints when creating the service client as shown in
2047    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2048    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2049    *   String name =
2050    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2051    *           .toString();
2052    *   jobServiceClient.deleteHyperparameterTuningJobAsync(name).get();
2053    * }
2054    * }</pre>
2055    *
2056    * @param name Required. The name of the HyperparameterTuningJob resource to be deleted. Format:
2057    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
2058    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2059    */
deleteHyperparameterTuningJobAsync( String name)2060   public final OperationFuture<Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(
2061       String name) {
2062     DeleteHyperparameterTuningJobRequest request =
2063         DeleteHyperparameterTuningJobRequest.newBuilder().setName(name).build();
2064     return deleteHyperparameterTuningJobAsync(request);
2065   }
2066 
2067   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2068   /**
2069    * Deletes a HyperparameterTuningJob.
2070    *
2071    * <p>Sample code:
2072    *
2073    * <pre>{@code
2074    * // This snippet has been automatically generated and should be regarded as a code template only.
2075    * // It will require modifications to work:
2076    * // - It may require correct/in-range values for request initialization.
2077    * // - It may require specifying regional endpoints when creating the service client as shown in
2078    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2079    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2080    *   DeleteHyperparameterTuningJobRequest request =
2081    *       DeleteHyperparameterTuningJobRequest.newBuilder()
2082    *           .setName(
2083    *               HyperparameterTuningJobName.of(
2084    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2085    *                   .toString())
2086    *           .build();
2087    *   jobServiceClient.deleteHyperparameterTuningJobAsync(request).get();
2088    * }
2089    * }</pre>
2090    *
2091    * @param request The request object containing all of the parameters for the API call.
2092    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2093    */
deleteHyperparameterTuningJobAsync( DeleteHyperparameterTuningJobRequest request)2094   public final OperationFuture<Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(
2095       DeleteHyperparameterTuningJobRequest request) {
2096     return deleteHyperparameterTuningJobOperationCallable().futureCall(request);
2097   }
2098 
2099   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2100   /**
2101    * Deletes a HyperparameterTuningJob.
2102    *
2103    * <p>Sample code:
2104    *
2105    * <pre>{@code
2106    * // This snippet has been automatically generated and should be regarded as a code template only.
2107    * // It will require modifications to work:
2108    * // - It may require correct/in-range values for request initialization.
2109    * // - It may require specifying regional endpoints when creating the service client as shown in
2110    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2111    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2112    *   DeleteHyperparameterTuningJobRequest request =
2113    *       DeleteHyperparameterTuningJobRequest.newBuilder()
2114    *           .setName(
2115    *               HyperparameterTuningJobName.of(
2116    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2117    *                   .toString())
2118    *           .build();
2119    *   OperationFuture<Empty, DeleteOperationMetadata> future =
2120    *       jobServiceClient.deleteHyperparameterTuningJobOperationCallable().futureCall(request);
2121    *   // Do something.
2122    *   future.get();
2123    * }
2124    * }</pre>
2125    */
2126   public final OperationCallable<
2127           DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata>
deleteHyperparameterTuningJobOperationCallable()2128       deleteHyperparameterTuningJobOperationCallable() {
2129     return stub.deleteHyperparameterTuningJobOperationCallable();
2130   }
2131 
2132   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2133   /**
2134    * Deletes a HyperparameterTuningJob.
2135    *
2136    * <p>Sample code:
2137    *
2138    * <pre>{@code
2139    * // This snippet has been automatically generated and should be regarded as a code template only.
2140    * // It will require modifications to work:
2141    * // - It may require correct/in-range values for request initialization.
2142    * // - It may require specifying regional endpoints when creating the service client as shown in
2143    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2144    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2145    *   DeleteHyperparameterTuningJobRequest request =
2146    *       DeleteHyperparameterTuningJobRequest.newBuilder()
2147    *           .setName(
2148    *               HyperparameterTuningJobName.of(
2149    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2150    *                   .toString())
2151    *           .build();
2152    *   ApiFuture<Operation> future =
2153    *       jobServiceClient.deleteHyperparameterTuningJobCallable().futureCall(request);
2154    *   // Do something.
2155    *   future.get();
2156    * }
2157    * }</pre>
2158    */
2159   public final UnaryCallable<DeleteHyperparameterTuningJobRequest, Operation>
deleteHyperparameterTuningJobCallable()2160       deleteHyperparameterTuningJobCallable() {
2161     return stub.deleteHyperparameterTuningJobCallable();
2162   }
2163 
2164   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2165   /**
2166    * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the
2167    * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not
2168    * guaranteed. Clients can use
2169    * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]
2170    * or other methods to check whether the cancellation succeeded or whether the job completed
2171    * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted;
2172    * instead it becomes a job with a
2173    * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value
2174    * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2175    * `Code.CANCELLED`, and
2176    * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is
2177    * set to `CANCELLED`.
2178    *
2179    * <p>Sample code:
2180    *
2181    * <pre>{@code
2182    * // This snippet has been automatically generated and should be regarded as a code template only.
2183    * // It will require modifications to work:
2184    * // - It may require correct/in-range values for request initialization.
2185    * // - It may require specifying regional endpoints when creating the service client as shown in
2186    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2187    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2188    *   HyperparameterTuningJobName name =
2189    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
2190    *   jobServiceClient.cancelHyperparameterTuningJob(name);
2191    * }
2192    * }</pre>
2193    *
2194    * @param name Required. The name of the HyperparameterTuningJob to cancel. Format:
2195    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
2196    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2197    */
cancelHyperparameterTuningJob(HyperparameterTuningJobName name)2198   public final void cancelHyperparameterTuningJob(HyperparameterTuningJobName name) {
2199     CancelHyperparameterTuningJobRequest request =
2200         CancelHyperparameterTuningJobRequest.newBuilder()
2201             .setName(name == null ? null : name.toString())
2202             .build();
2203     cancelHyperparameterTuningJob(request);
2204   }
2205 
2206   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2207   /**
2208    * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the
2209    * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not
2210    * guaranteed. Clients can use
2211    * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]
2212    * or other methods to check whether the cancellation succeeded or whether the job completed
2213    * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted;
2214    * instead it becomes a job with a
2215    * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value
2216    * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2217    * `Code.CANCELLED`, and
2218    * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is
2219    * set to `CANCELLED`.
2220    *
2221    * <p>Sample code:
2222    *
2223    * <pre>{@code
2224    * // This snippet has been automatically generated and should be regarded as a code template only.
2225    * // It will require modifications to work:
2226    * // - It may require correct/in-range values for request initialization.
2227    * // - It may require specifying regional endpoints when creating the service client as shown in
2228    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2229    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2230    *   String name =
2231    *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2232    *           .toString();
2233    *   jobServiceClient.cancelHyperparameterTuningJob(name);
2234    * }
2235    * }</pre>
2236    *
2237    * @param name Required. The name of the HyperparameterTuningJob to cancel. Format:
2238    *     `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
2239    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2240    */
cancelHyperparameterTuningJob(String name)2241   public final void cancelHyperparameterTuningJob(String name) {
2242     CancelHyperparameterTuningJobRequest request =
2243         CancelHyperparameterTuningJobRequest.newBuilder().setName(name).build();
2244     cancelHyperparameterTuningJob(request);
2245   }
2246 
2247   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2248   /**
2249    * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the
2250    * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not
2251    * guaranteed. Clients can use
2252    * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]
2253    * or other methods to check whether the cancellation succeeded or whether the job completed
2254    * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted;
2255    * instead it becomes a job with a
2256    * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value
2257    * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2258    * `Code.CANCELLED`, and
2259    * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is
2260    * set to `CANCELLED`.
2261    *
2262    * <p>Sample code:
2263    *
2264    * <pre>{@code
2265    * // This snippet has been automatically generated and should be regarded as a code template only.
2266    * // It will require modifications to work:
2267    * // - It may require correct/in-range values for request initialization.
2268    * // - It may require specifying regional endpoints when creating the service client as shown in
2269    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2270    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2271    *   CancelHyperparameterTuningJobRequest request =
2272    *       CancelHyperparameterTuningJobRequest.newBuilder()
2273    *           .setName(
2274    *               HyperparameterTuningJobName.of(
2275    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2276    *                   .toString())
2277    *           .build();
2278    *   jobServiceClient.cancelHyperparameterTuningJob(request);
2279    * }
2280    * }</pre>
2281    *
2282    * @param request The request object containing all of the parameters for the API call.
2283    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2284    */
cancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest request)2285   public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest request) {
2286     cancelHyperparameterTuningJobCallable().call(request);
2287   }
2288 
2289   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2290   /**
2291    * Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the
2292    * HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not
2293    * guaranteed. Clients can use
2294    * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]
2295    * or other methods to check whether the cancellation succeeded or whether the job completed
2296    * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted;
2297    * instead it becomes a job with a
2298    * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value
2299    * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2300    * `Code.CANCELLED`, and
2301    * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is
2302    * set to `CANCELLED`.
2303    *
2304    * <p>Sample code:
2305    *
2306    * <pre>{@code
2307    * // This snippet has been automatically generated and should be regarded as a code template only.
2308    * // It will require modifications to work:
2309    * // - It may require correct/in-range values for request initialization.
2310    * // - It may require specifying regional endpoints when creating the service client as shown in
2311    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2312    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2313    *   CancelHyperparameterTuningJobRequest request =
2314    *       CancelHyperparameterTuningJobRequest.newBuilder()
2315    *           .setName(
2316    *               HyperparameterTuningJobName.of(
2317    *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
2318    *                   .toString())
2319    *           .build();
2320    *   ApiFuture<Empty> future =
2321    *       jobServiceClient.cancelHyperparameterTuningJobCallable().futureCall(request);
2322    *   // Do something.
2323    *   future.get();
2324    * }
2325    * }</pre>
2326    */
2327   public final UnaryCallable<CancelHyperparameterTuningJobRequest, Empty>
cancelHyperparameterTuningJobCallable()2328       cancelHyperparameterTuningJobCallable() {
2329     return stub.cancelHyperparameterTuningJobCallable();
2330   }
2331 
2332   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2333   /**
2334    * Creates a NasJob
2335    *
2336    * <p>Sample code:
2337    *
2338    * <pre>{@code
2339    * // This snippet has been automatically generated and should be regarded as a code template only.
2340    * // It will require modifications to work:
2341    * // - It may require correct/in-range values for request initialization.
2342    * // - It may require specifying regional endpoints when creating the service client as shown in
2343    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2344    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2345    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
2346    *   NasJob nasJob = NasJob.newBuilder().build();
2347    *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
2348    * }
2349    * }</pre>
2350    *
2351    * @param parent Required. The resource name of the Location to create the NasJob in. Format:
2352    *     `projects/{project}/locations/{location}`
2353    * @param nasJob Required. The NasJob to create.
2354    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2355    */
createNasJob(LocationName parent, NasJob nasJob)2356   public final NasJob createNasJob(LocationName parent, NasJob nasJob) {
2357     CreateNasJobRequest request =
2358         CreateNasJobRequest.newBuilder()
2359             .setParent(parent == null ? null : parent.toString())
2360             .setNasJob(nasJob)
2361             .build();
2362     return createNasJob(request);
2363   }
2364 
2365   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2366   /**
2367    * Creates a NasJob
2368    *
2369    * <p>Sample code:
2370    *
2371    * <pre>{@code
2372    * // This snippet has been automatically generated and should be regarded as a code template only.
2373    * // It will require modifications to work:
2374    * // - It may require correct/in-range values for request initialization.
2375    * // - It may require specifying regional endpoints when creating the service client as shown in
2376    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2377    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2378    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
2379    *   NasJob nasJob = NasJob.newBuilder().build();
2380    *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
2381    * }
2382    * }</pre>
2383    *
2384    * @param parent Required. The resource name of the Location to create the NasJob in. Format:
2385    *     `projects/{project}/locations/{location}`
2386    * @param nasJob Required. The NasJob to create.
2387    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2388    */
createNasJob(String parent, NasJob nasJob)2389   public final NasJob createNasJob(String parent, NasJob nasJob) {
2390     CreateNasJobRequest request =
2391         CreateNasJobRequest.newBuilder().setParent(parent).setNasJob(nasJob).build();
2392     return createNasJob(request);
2393   }
2394 
2395   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2396   /**
2397    * Creates a NasJob
2398    *
2399    * <p>Sample code:
2400    *
2401    * <pre>{@code
2402    * // This snippet has been automatically generated and should be regarded as a code template only.
2403    * // It will require modifications to work:
2404    * // - It may require correct/in-range values for request initialization.
2405    * // - It may require specifying regional endpoints when creating the service client as shown in
2406    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2407    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2408    *   CreateNasJobRequest request =
2409    *       CreateNasJobRequest.newBuilder()
2410    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2411    *           .setNasJob(NasJob.newBuilder().build())
2412    *           .build();
2413    *   NasJob response = jobServiceClient.createNasJob(request);
2414    * }
2415    * }</pre>
2416    *
2417    * @param request The request object containing all of the parameters for the API call.
2418    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2419    */
createNasJob(CreateNasJobRequest request)2420   public final NasJob createNasJob(CreateNasJobRequest request) {
2421     return createNasJobCallable().call(request);
2422   }
2423 
2424   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2425   /**
2426    * Creates a NasJob
2427    *
2428    * <p>Sample code:
2429    *
2430    * <pre>{@code
2431    * // This snippet has been automatically generated and should be regarded as a code template only.
2432    * // It will require modifications to work:
2433    * // - It may require correct/in-range values for request initialization.
2434    * // - It may require specifying regional endpoints when creating the service client as shown in
2435    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2436    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2437    *   CreateNasJobRequest request =
2438    *       CreateNasJobRequest.newBuilder()
2439    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2440    *           .setNasJob(NasJob.newBuilder().build())
2441    *           .build();
2442    *   ApiFuture<NasJob> future = jobServiceClient.createNasJobCallable().futureCall(request);
2443    *   // Do something.
2444    *   NasJob response = future.get();
2445    * }
2446    * }</pre>
2447    */
createNasJobCallable()2448   public final UnaryCallable<CreateNasJobRequest, NasJob> createNasJobCallable() {
2449     return stub.createNasJobCallable();
2450   }
2451 
2452   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2453   /**
2454    * Gets a NasJob
2455    *
2456    * <p>Sample code:
2457    *
2458    * <pre>{@code
2459    * // This snippet has been automatically generated and should be regarded as a code template only.
2460    * // It will require modifications to work:
2461    * // - It may require correct/in-range values for request initialization.
2462    * // - It may require specifying regional endpoints when creating the service client as shown in
2463    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2464    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2465    *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
2466    *   NasJob response = jobServiceClient.getNasJob(name);
2467    * }
2468    * }</pre>
2469    *
2470    * @param name Required. The name of the NasJob resource. Format:
2471    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2472    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2473    */
getNasJob(NasJobName name)2474   public final NasJob getNasJob(NasJobName name) {
2475     GetNasJobRequest request =
2476         GetNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
2477     return getNasJob(request);
2478   }
2479 
2480   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2481   /**
2482    * Gets a NasJob
2483    *
2484    * <p>Sample code:
2485    *
2486    * <pre>{@code
2487    * // This snippet has been automatically generated and should be regarded as a code template only.
2488    * // It will require modifications to work:
2489    * // - It may require correct/in-range values for request initialization.
2490    * // - It may require specifying regional endpoints when creating the service client as shown in
2491    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2492    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2493    *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
2494    *   NasJob response = jobServiceClient.getNasJob(name);
2495    * }
2496    * }</pre>
2497    *
2498    * @param name Required. The name of the NasJob resource. Format:
2499    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2500    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2501    */
getNasJob(String name)2502   public final NasJob getNasJob(String name) {
2503     GetNasJobRequest request = GetNasJobRequest.newBuilder().setName(name).build();
2504     return getNasJob(request);
2505   }
2506 
2507   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2508   /**
2509    * Gets a NasJob
2510    *
2511    * <p>Sample code:
2512    *
2513    * <pre>{@code
2514    * // This snippet has been automatically generated and should be regarded as a code template only.
2515    * // It will require modifications to work:
2516    * // - It may require correct/in-range values for request initialization.
2517    * // - It may require specifying regional endpoints when creating the service client as shown in
2518    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2519    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2520    *   GetNasJobRequest request =
2521    *       GetNasJobRequest.newBuilder()
2522    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2523    *           .build();
2524    *   NasJob response = jobServiceClient.getNasJob(request);
2525    * }
2526    * }</pre>
2527    *
2528    * @param request The request object containing all of the parameters for the API call.
2529    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2530    */
getNasJob(GetNasJobRequest request)2531   public final NasJob getNasJob(GetNasJobRequest request) {
2532     return getNasJobCallable().call(request);
2533   }
2534 
2535   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2536   /**
2537    * Gets a NasJob
2538    *
2539    * <p>Sample code:
2540    *
2541    * <pre>{@code
2542    * // This snippet has been automatically generated and should be regarded as a code template only.
2543    * // It will require modifications to work:
2544    * // - It may require correct/in-range values for request initialization.
2545    * // - It may require specifying regional endpoints when creating the service client as shown in
2546    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2547    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2548    *   GetNasJobRequest request =
2549    *       GetNasJobRequest.newBuilder()
2550    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2551    *           .build();
2552    *   ApiFuture<NasJob> future = jobServiceClient.getNasJobCallable().futureCall(request);
2553    *   // Do something.
2554    *   NasJob response = future.get();
2555    * }
2556    * }</pre>
2557    */
getNasJobCallable()2558   public final UnaryCallable<GetNasJobRequest, NasJob> getNasJobCallable() {
2559     return stub.getNasJobCallable();
2560   }
2561 
2562   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2563   /**
2564    * Lists NasJobs in a Location.
2565    *
2566    * <p>Sample code:
2567    *
2568    * <pre>{@code
2569    * // This snippet has been automatically generated and should be regarded as a code template only.
2570    * // It will require modifications to work:
2571    * // - It may require correct/in-range values for request initialization.
2572    * // - It may require specifying regional endpoints when creating the service client as shown in
2573    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2574    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2575    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
2576    *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
2577    *     // doThingsWith(element);
2578    *   }
2579    * }
2580    * }</pre>
2581    *
2582    * @param parent Required. The resource name of the Location to list the NasJobs from. Format:
2583    *     `projects/{project}/locations/{location}`
2584    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2585    */
listNasJobs(LocationName parent)2586   public final ListNasJobsPagedResponse listNasJobs(LocationName parent) {
2587     ListNasJobsRequest request =
2588         ListNasJobsRequest.newBuilder()
2589             .setParent(parent == null ? null : parent.toString())
2590             .build();
2591     return listNasJobs(request);
2592   }
2593 
2594   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2595   /**
2596    * Lists NasJobs in a Location.
2597    *
2598    * <p>Sample code:
2599    *
2600    * <pre>{@code
2601    * // This snippet has been automatically generated and should be regarded as a code template only.
2602    * // It will require modifications to work:
2603    * // - It may require correct/in-range values for request initialization.
2604    * // - It may require specifying regional endpoints when creating the service client as shown in
2605    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2606    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2607    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
2608    *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
2609    *     // doThingsWith(element);
2610    *   }
2611    * }
2612    * }</pre>
2613    *
2614    * @param parent Required. The resource name of the Location to list the NasJobs from. Format:
2615    *     `projects/{project}/locations/{location}`
2616    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2617    */
listNasJobs(String parent)2618   public final ListNasJobsPagedResponse listNasJobs(String parent) {
2619     ListNasJobsRequest request = ListNasJobsRequest.newBuilder().setParent(parent).build();
2620     return listNasJobs(request);
2621   }
2622 
2623   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2624   /**
2625    * Lists NasJobs in a Location.
2626    *
2627    * <p>Sample code:
2628    *
2629    * <pre>{@code
2630    * // This snippet has been automatically generated and should be regarded as a code template only.
2631    * // It will require modifications to work:
2632    * // - It may require correct/in-range values for request initialization.
2633    * // - It may require specifying regional endpoints when creating the service client as shown in
2634    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2635    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2636    *   ListNasJobsRequest request =
2637    *       ListNasJobsRequest.newBuilder()
2638    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2639    *           .setFilter("filter-1274492040")
2640    *           .setPageSize(883849137)
2641    *           .setPageToken("pageToken873572522")
2642    *           .setReadMask(FieldMask.newBuilder().build())
2643    *           .build();
2644    *   for (NasJob element : jobServiceClient.listNasJobs(request).iterateAll()) {
2645    *     // doThingsWith(element);
2646    *   }
2647    * }
2648    * }</pre>
2649    *
2650    * @param request The request object containing all of the parameters for the API call.
2651    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2652    */
listNasJobs(ListNasJobsRequest request)2653   public final ListNasJobsPagedResponse listNasJobs(ListNasJobsRequest request) {
2654     return listNasJobsPagedCallable().call(request);
2655   }
2656 
2657   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2658   /**
2659    * Lists NasJobs in a Location.
2660    *
2661    * <p>Sample code:
2662    *
2663    * <pre>{@code
2664    * // This snippet has been automatically generated and should be regarded as a code template only.
2665    * // It will require modifications to work:
2666    * // - It may require correct/in-range values for request initialization.
2667    * // - It may require specifying regional endpoints when creating the service client as shown in
2668    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2669    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2670    *   ListNasJobsRequest request =
2671    *       ListNasJobsRequest.newBuilder()
2672    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2673    *           .setFilter("filter-1274492040")
2674    *           .setPageSize(883849137)
2675    *           .setPageToken("pageToken873572522")
2676    *           .setReadMask(FieldMask.newBuilder().build())
2677    *           .build();
2678    *   ApiFuture<NasJob> future = jobServiceClient.listNasJobsPagedCallable().futureCall(request);
2679    *   // Do something.
2680    *   for (NasJob element : future.get().iterateAll()) {
2681    *     // doThingsWith(element);
2682    *   }
2683    * }
2684    * }</pre>
2685    */
2686   public final UnaryCallable<ListNasJobsRequest, ListNasJobsPagedResponse>
listNasJobsPagedCallable()2687       listNasJobsPagedCallable() {
2688     return stub.listNasJobsPagedCallable();
2689   }
2690 
2691   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2692   /**
2693    * Lists NasJobs in a Location.
2694    *
2695    * <p>Sample code:
2696    *
2697    * <pre>{@code
2698    * // This snippet has been automatically generated and should be regarded as a code template only.
2699    * // It will require modifications to work:
2700    * // - It may require correct/in-range values for request initialization.
2701    * // - It may require specifying regional endpoints when creating the service client as shown in
2702    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2703    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2704    *   ListNasJobsRequest request =
2705    *       ListNasJobsRequest.newBuilder()
2706    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2707    *           .setFilter("filter-1274492040")
2708    *           .setPageSize(883849137)
2709    *           .setPageToken("pageToken873572522")
2710    *           .setReadMask(FieldMask.newBuilder().build())
2711    *           .build();
2712    *   while (true) {
2713    *     ListNasJobsResponse response = jobServiceClient.listNasJobsCallable().call(request);
2714    *     for (NasJob element : response.getNasJobsList()) {
2715    *       // doThingsWith(element);
2716    *     }
2717    *     String nextPageToken = response.getNextPageToken();
2718    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
2719    *       request = request.toBuilder().setPageToken(nextPageToken).build();
2720    *     } else {
2721    *       break;
2722    *     }
2723    *   }
2724    * }
2725    * }</pre>
2726    */
listNasJobsCallable()2727   public final UnaryCallable<ListNasJobsRequest, ListNasJobsResponse> listNasJobsCallable() {
2728     return stub.listNasJobsCallable();
2729   }
2730 
2731   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2732   /**
2733    * Deletes a NasJob.
2734    *
2735    * <p>Sample code:
2736    *
2737    * <pre>{@code
2738    * // This snippet has been automatically generated and should be regarded as a code template only.
2739    * // It will require modifications to work:
2740    * // - It may require correct/in-range values for request initialization.
2741    * // - It may require specifying regional endpoints when creating the service client as shown in
2742    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2743    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2744    *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
2745    *   jobServiceClient.deleteNasJobAsync(name).get();
2746    * }
2747    * }</pre>
2748    *
2749    * @param name Required. The name of the NasJob resource to be deleted. Format:
2750    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2751    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2752    */
deleteNasJobAsync(NasJobName name)2753   public final OperationFuture<Empty, DeleteOperationMetadata> deleteNasJobAsync(NasJobName name) {
2754     DeleteNasJobRequest request =
2755         DeleteNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
2756     return deleteNasJobAsync(request);
2757   }
2758 
2759   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2760   /**
2761    * Deletes a NasJob.
2762    *
2763    * <p>Sample code:
2764    *
2765    * <pre>{@code
2766    * // This snippet has been automatically generated and should be regarded as a code template only.
2767    * // It will require modifications to work:
2768    * // - It may require correct/in-range values for request initialization.
2769    * // - It may require specifying regional endpoints when creating the service client as shown in
2770    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2771    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2772    *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
2773    *   jobServiceClient.deleteNasJobAsync(name).get();
2774    * }
2775    * }</pre>
2776    *
2777    * @param name Required. The name of the NasJob resource to be deleted. Format:
2778    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2779    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2780    */
deleteNasJobAsync(String name)2781   public final OperationFuture<Empty, DeleteOperationMetadata> deleteNasJobAsync(String name) {
2782     DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder().setName(name).build();
2783     return deleteNasJobAsync(request);
2784   }
2785 
2786   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2787   /**
2788    * Deletes a NasJob.
2789    *
2790    * <p>Sample code:
2791    *
2792    * <pre>{@code
2793    * // This snippet has been automatically generated and should be regarded as a code template only.
2794    * // It will require modifications to work:
2795    * // - It may require correct/in-range values for request initialization.
2796    * // - It may require specifying regional endpoints when creating the service client as shown in
2797    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2798    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2799    *   DeleteNasJobRequest request =
2800    *       DeleteNasJobRequest.newBuilder()
2801    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2802    *           .build();
2803    *   jobServiceClient.deleteNasJobAsync(request).get();
2804    * }
2805    * }</pre>
2806    *
2807    * @param request The request object containing all of the parameters for the API call.
2808    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2809    */
deleteNasJobAsync( DeleteNasJobRequest request)2810   public final OperationFuture<Empty, DeleteOperationMetadata> deleteNasJobAsync(
2811       DeleteNasJobRequest request) {
2812     return deleteNasJobOperationCallable().futureCall(request);
2813   }
2814 
2815   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2816   /**
2817    * Deletes a NasJob.
2818    *
2819    * <p>Sample code:
2820    *
2821    * <pre>{@code
2822    * // This snippet has been automatically generated and should be regarded as a code template only.
2823    * // It will require modifications to work:
2824    * // - It may require correct/in-range values for request initialization.
2825    * // - It may require specifying regional endpoints when creating the service client as shown in
2826    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2827    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2828    *   DeleteNasJobRequest request =
2829    *       DeleteNasJobRequest.newBuilder()
2830    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2831    *           .build();
2832    *   OperationFuture<Empty, DeleteOperationMetadata> future =
2833    *       jobServiceClient.deleteNasJobOperationCallable().futureCall(request);
2834    *   // Do something.
2835    *   future.get();
2836    * }
2837    * }</pre>
2838    */
2839   public final OperationCallable<DeleteNasJobRequest, Empty, DeleteOperationMetadata>
deleteNasJobOperationCallable()2840       deleteNasJobOperationCallable() {
2841     return stub.deleteNasJobOperationCallable();
2842   }
2843 
2844   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2845   /**
2846    * Deletes a NasJob.
2847    *
2848    * <p>Sample code:
2849    *
2850    * <pre>{@code
2851    * // This snippet has been automatically generated and should be regarded as a code template only.
2852    * // It will require modifications to work:
2853    * // - It may require correct/in-range values for request initialization.
2854    * // - It may require specifying regional endpoints when creating the service client as shown in
2855    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2856    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2857    *   DeleteNasJobRequest request =
2858    *       DeleteNasJobRequest.newBuilder()
2859    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2860    *           .build();
2861    *   ApiFuture<Operation> future = jobServiceClient.deleteNasJobCallable().futureCall(request);
2862    *   // Do something.
2863    *   future.get();
2864    * }
2865    * }</pre>
2866    */
deleteNasJobCallable()2867   public final UnaryCallable<DeleteNasJobRequest, Operation> deleteNasJobCallable() {
2868     return stub.deleteNasJobCallable();
2869   }
2870 
2871   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2872   /**
2873    * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best
2874    * effort to cancel the job, but success is not guaranteed. Clients can use
2875    * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to
2876    * check whether the cancellation succeeded or whether the job completed despite cancellation. On
2877    * successful cancellation, the NasJob is not deleted; instead it becomes a job with a
2878    * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
2879    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
2880    * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.
2881    *
2882    * <p>Sample code:
2883    *
2884    * <pre>{@code
2885    * // This snippet has been automatically generated and should be regarded as a code template only.
2886    * // It will require modifications to work:
2887    * // - It may require correct/in-range values for request initialization.
2888    * // - It may require specifying regional endpoints when creating the service client as shown in
2889    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2890    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2891    *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
2892    *   jobServiceClient.cancelNasJob(name);
2893    * }
2894    * }</pre>
2895    *
2896    * @param name Required. The name of the NasJob to cancel. Format:
2897    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2898    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2899    */
cancelNasJob(NasJobName name)2900   public final void cancelNasJob(NasJobName name) {
2901     CancelNasJobRequest request =
2902         CancelNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
2903     cancelNasJob(request);
2904   }
2905 
2906   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2907   /**
2908    * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best
2909    * effort to cancel the job, but success is not guaranteed. Clients can use
2910    * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to
2911    * check whether the cancellation succeeded or whether the job completed despite cancellation. On
2912    * successful cancellation, the NasJob is not deleted; instead it becomes a job with a
2913    * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
2914    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
2915    * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.
2916    *
2917    * <p>Sample code:
2918    *
2919    * <pre>{@code
2920    * // This snippet has been automatically generated and should be regarded as a code template only.
2921    * // It will require modifications to work:
2922    * // - It may require correct/in-range values for request initialization.
2923    * // - It may require specifying regional endpoints when creating the service client as shown in
2924    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2925    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2926    *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
2927    *   jobServiceClient.cancelNasJob(name);
2928    * }
2929    * }</pre>
2930    *
2931    * @param name Required. The name of the NasJob to cancel. Format:
2932    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
2933    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2934    */
cancelNasJob(String name)2935   public final void cancelNasJob(String name) {
2936     CancelNasJobRequest request = CancelNasJobRequest.newBuilder().setName(name).build();
2937     cancelNasJob(request);
2938   }
2939 
2940   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2941   /**
2942    * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best
2943    * effort to cancel the job, but success is not guaranteed. Clients can use
2944    * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to
2945    * check whether the cancellation succeeded or whether the job completed despite cancellation. On
2946    * successful cancellation, the NasJob is not deleted; instead it becomes a job with a
2947    * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
2948    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
2949    * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.
2950    *
2951    * <p>Sample code:
2952    *
2953    * <pre>{@code
2954    * // This snippet has been automatically generated and should be regarded as a code template only.
2955    * // It will require modifications to work:
2956    * // - It may require correct/in-range values for request initialization.
2957    * // - It may require specifying regional endpoints when creating the service client as shown in
2958    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2959    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2960    *   CancelNasJobRequest request =
2961    *       CancelNasJobRequest.newBuilder()
2962    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2963    *           .build();
2964    *   jobServiceClient.cancelNasJob(request);
2965    * }
2966    * }</pre>
2967    *
2968    * @param request The request object containing all of the parameters for the API call.
2969    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2970    */
cancelNasJob(CancelNasJobRequest request)2971   public final void cancelNasJob(CancelNasJobRequest request) {
2972     cancelNasJobCallable().call(request);
2973   }
2974 
2975   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2976   /**
2977    * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best
2978    * effort to cancel the job, but success is not guaranteed. Clients can use
2979    * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to
2980    * check whether the cancellation succeeded or whether the job completed despite cancellation. On
2981    * successful cancellation, the NasJob is not deleted; instead it becomes a job with a
2982    * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
2983    * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and
2984    * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.
2985    *
2986    * <p>Sample code:
2987    *
2988    * <pre>{@code
2989    * // This snippet has been automatically generated and should be regarded as a code template only.
2990    * // It will require modifications to work:
2991    * // - It may require correct/in-range values for request initialization.
2992    * // - It may require specifying regional endpoints when creating the service client as shown in
2993    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2994    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
2995    *   CancelNasJobRequest request =
2996    *       CancelNasJobRequest.newBuilder()
2997    *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
2998    *           .build();
2999    *   ApiFuture<Empty> future = jobServiceClient.cancelNasJobCallable().futureCall(request);
3000    *   // Do something.
3001    *   future.get();
3002    * }
3003    * }</pre>
3004    */
cancelNasJobCallable()3005   public final UnaryCallable<CancelNasJobRequest, Empty> cancelNasJobCallable() {
3006     return stub.cancelNasJobCallable();
3007   }
3008 
3009   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3010   /**
3011    * Gets a NasTrialDetail.
3012    *
3013    * <p>Sample code:
3014    *
3015    * <pre>{@code
3016    * // This snippet has been automatically generated and should be regarded as a code template only.
3017    * // It will require modifications to work:
3018    * // - It may require correct/in-range values for request initialization.
3019    * // - It may require specifying regional endpoints when creating the service client as shown in
3020    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3021    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3022    *   NasTrialDetailName name =
3023    *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]");
3024    *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
3025    * }
3026    * }</pre>
3027    *
3028    * @param name Required. The name of the NasTrialDetail resource. Format:
3029    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
3030    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3031    */
getNasTrialDetail(NasTrialDetailName name)3032   public final NasTrialDetail getNasTrialDetail(NasTrialDetailName name) {
3033     GetNasTrialDetailRequest request =
3034         GetNasTrialDetailRequest.newBuilder()
3035             .setName(name == null ? null : name.toString())
3036             .build();
3037     return getNasTrialDetail(request);
3038   }
3039 
3040   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3041   /**
3042    * Gets a NasTrialDetail.
3043    *
3044    * <p>Sample code:
3045    *
3046    * <pre>{@code
3047    * // This snippet has been automatically generated and should be regarded as a code template only.
3048    * // It will require modifications to work:
3049    * // - It may require correct/in-range values for request initialization.
3050    * // - It may require specifying regional endpoints when creating the service client as shown in
3051    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3052    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3053    *   String name =
3054    *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
3055    *           .toString();
3056    *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
3057    * }
3058    * }</pre>
3059    *
3060    * @param name Required. The name of the NasTrialDetail resource. Format:
3061    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
3062    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3063    */
getNasTrialDetail(String name)3064   public final NasTrialDetail getNasTrialDetail(String name) {
3065     GetNasTrialDetailRequest request = GetNasTrialDetailRequest.newBuilder().setName(name).build();
3066     return getNasTrialDetail(request);
3067   }
3068 
3069   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3070   /**
3071    * Gets a NasTrialDetail.
3072    *
3073    * <p>Sample code:
3074    *
3075    * <pre>{@code
3076    * // This snippet has been automatically generated and should be regarded as a code template only.
3077    * // It will require modifications to work:
3078    * // - It may require correct/in-range values for request initialization.
3079    * // - It may require specifying regional endpoints when creating the service client as shown in
3080    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3081    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3082    *   GetNasTrialDetailRequest request =
3083    *       GetNasTrialDetailRequest.newBuilder()
3084    *           .setName(
3085    *               NasTrialDetailName.of(
3086    *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
3087    *                   .toString())
3088    *           .build();
3089    *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(request);
3090    * }
3091    * }</pre>
3092    *
3093    * @param request The request object containing all of the parameters for the API call.
3094    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3095    */
getNasTrialDetail(GetNasTrialDetailRequest request)3096   public final NasTrialDetail getNasTrialDetail(GetNasTrialDetailRequest request) {
3097     return getNasTrialDetailCallable().call(request);
3098   }
3099 
3100   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3101   /**
3102    * Gets a NasTrialDetail.
3103    *
3104    * <p>Sample code:
3105    *
3106    * <pre>{@code
3107    * // This snippet has been automatically generated and should be regarded as a code template only.
3108    * // It will require modifications to work:
3109    * // - It may require correct/in-range values for request initialization.
3110    * // - It may require specifying regional endpoints when creating the service client as shown in
3111    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3112    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3113    *   GetNasTrialDetailRequest request =
3114    *       GetNasTrialDetailRequest.newBuilder()
3115    *           .setName(
3116    *               NasTrialDetailName.of(
3117    *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
3118    *                   .toString())
3119    *           .build();
3120    *   ApiFuture<NasTrialDetail> future =
3121    *       jobServiceClient.getNasTrialDetailCallable().futureCall(request);
3122    *   // Do something.
3123    *   NasTrialDetail response = future.get();
3124    * }
3125    * }</pre>
3126    */
getNasTrialDetailCallable()3127   public final UnaryCallable<GetNasTrialDetailRequest, NasTrialDetail> getNasTrialDetailCallable() {
3128     return stub.getNasTrialDetailCallable();
3129   }
3130 
3131   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3132   /**
3133    * List top NasTrialDetails of a NasJob.
3134    *
3135    * <p>Sample code:
3136    *
3137    * <pre>{@code
3138    * // This snippet has been automatically generated and should be regarded as a code template only.
3139    * // It will require modifications to work:
3140    * // - It may require correct/in-range values for request initialization.
3141    * // - It may require specifying regional endpoints when creating the service client as shown in
3142    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3143    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3144    *   NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
3145    *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
3146    *     // doThingsWith(element);
3147    *   }
3148    * }
3149    * }</pre>
3150    *
3151    * @param parent Required. The name of the NasJob resource. Format:
3152    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
3153    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3154    */
listNasTrialDetails(NasJobName parent)3155   public final ListNasTrialDetailsPagedResponse listNasTrialDetails(NasJobName parent) {
3156     ListNasTrialDetailsRequest request =
3157         ListNasTrialDetailsRequest.newBuilder()
3158             .setParent(parent == null ? null : parent.toString())
3159             .build();
3160     return listNasTrialDetails(request);
3161   }
3162 
3163   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3164   /**
3165    * List top NasTrialDetails of a NasJob.
3166    *
3167    * <p>Sample code:
3168    *
3169    * <pre>{@code
3170    * // This snippet has been automatically generated and should be regarded as a code template only.
3171    * // It will require modifications to work:
3172    * // - It may require correct/in-range values for request initialization.
3173    * // - It may require specifying regional endpoints when creating the service client as shown in
3174    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3175    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3176    *   String parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
3177    *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
3178    *     // doThingsWith(element);
3179    *   }
3180    * }
3181    * }</pre>
3182    *
3183    * @param parent Required. The name of the NasJob resource. Format:
3184    *     `projects/{project}/locations/{location}/nasJobs/{nas_job}`
3185    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3186    */
listNasTrialDetails(String parent)3187   public final ListNasTrialDetailsPagedResponse listNasTrialDetails(String parent) {
3188     ListNasTrialDetailsRequest request =
3189         ListNasTrialDetailsRequest.newBuilder().setParent(parent).build();
3190     return listNasTrialDetails(request);
3191   }
3192 
3193   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3194   /**
3195    * List top NasTrialDetails of a NasJob.
3196    *
3197    * <p>Sample code:
3198    *
3199    * <pre>{@code
3200    * // This snippet has been automatically generated and should be regarded as a code template only.
3201    * // It will require modifications to work:
3202    * // - It may require correct/in-range values for request initialization.
3203    * // - It may require specifying regional endpoints when creating the service client as shown in
3204    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3205    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3206    *   ListNasTrialDetailsRequest request =
3207    *       ListNasTrialDetailsRequest.newBuilder()
3208    *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
3209    *           .setPageSize(883849137)
3210    *           .setPageToken("pageToken873572522")
3211    *           .build();
3212    *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(request).iterateAll()) {
3213    *     // doThingsWith(element);
3214    *   }
3215    * }
3216    * }</pre>
3217    *
3218    * @param request The request object containing all of the parameters for the API call.
3219    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3220    */
listNasTrialDetails( ListNasTrialDetailsRequest request)3221   public final ListNasTrialDetailsPagedResponse listNasTrialDetails(
3222       ListNasTrialDetailsRequest request) {
3223     return listNasTrialDetailsPagedCallable().call(request);
3224   }
3225 
3226   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3227   /**
3228    * List top NasTrialDetails of a NasJob.
3229    *
3230    * <p>Sample code:
3231    *
3232    * <pre>{@code
3233    * // This snippet has been automatically generated and should be regarded as a code template only.
3234    * // It will require modifications to work:
3235    * // - It may require correct/in-range values for request initialization.
3236    * // - It may require specifying regional endpoints when creating the service client as shown in
3237    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3238    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3239    *   ListNasTrialDetailsRequest request =
3240    *       ListNasTrialDetailsRequest.newBuilder()
3241    *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
3242    *           .setPageSize(883849137)
3243    *           .setPageToken("pageToken873572522")
3244    *           .build();
3245    *   ApiFuture<NasTrialDetail> future =
3246    *       jobServiceClient.listNasTrialDetailsPagedCallable().futureCall(request);
3247    *   // Do something.
3248    *   for (NasTrialDetail element : future.get().iterateAll()) {
3249    *     // doThingsWith(element);
3250    *   }
3251    * }
3252    * }</pre>
3253    */
3254   public final UnaryCallable<ListNasTrialDetailsRequest, ListNasTrialDetailsPagedResponse>
listNasTrialDetailsPagedCallable()3255       listNasTrialDetailsPagedCallable() {
3256     return stub.listNasTrialDetailsPagedCallable();
3257   }
3258 
3259   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3260   /**
3261    * List top NasTrialDetails of a NasJob.
3262    *
3263    * <p>Sample code:
3264    *
3265    * <pre>{@code
3266    * // This snippet has been automatically generated and should be regarded as a code template only.
3267    * // It will require modifications to work:
3268    * // - It may require correct/in-range values for request initialization.
3269    * // - It may require specifying regional endpoints when creating the service client as shown in
3270    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3271    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3272    *   ListNasTrialDetailsRequest request =
3273    *       ListNasTrialDetailsRequest.newBuilder()
3274    *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
3275    *           .setPageSize(883849137)
3276    *           .setPageToken("pageToken873572522")
3277    *           .build();
3278    *   while (true) {
3279    *     ListNasTrialDetailsResponse response =
3280    *         jobServiceClient.listNasTrialDetailsCallable().call(request);
3281    *     for (NasTrialDetail element : response.getNasTrialDetailsList()) {
3282    *       // doThingsWith(element);
3283    *     }
3284    *     String nextPageToken = response.getNextPageToken();
3285    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
3286    *       request = request.toBuilder().setPageToken(nextPageToken).build();
3287    *     } else {
3288    *       break;
3289    *     }
3290    *   }
3291    * }
3292    * }</pre>
3293    */
3294   public final UnaryCallable<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse>
listNasTrialDetailsCallable()3295       listNasTrialDetailsCallable() {
3296     return stub.listNasTrialDetailsCallable();
3297   }
3298 
3299   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3300   /**
3301    * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to
3302    * start.
3303    *
3304    * <p>Sample code:
3305    *
3306    * <pre>{@code
3307    * // This snippet has been automatically generated and should be regarded as a code template only.
3308    * // It will require modifications to work:
3309    * // - It may require correct/in-range values for request initialization.
3310    * // - It may require specifying regional endpoints when creating the service client as shown in
3311    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3312    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3313    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
3314    *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
3315    *   BatchPredictionJob response =
3316    *       jobServiceClient.createBatchPredictionJob(parent, batchPredictionJob);
3317    * }
3318    * }</pre>
3319    *
3320    * @param parent Required. The resource name of the Location to create the BatchPredictionJob in.
3321    *     Format: `projects/{project}/locations/{location}`
3322    * @param batchPredictionJob Required. The BatchPredictionJob to create.
3323    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3324    */
createBatchPredictionJob( LocationName parent, BatchPredictionJob batchPredictionJob)3325   public final BatchPredictionJob createBatchPredictionJob(
3326       LocationName parent, BatchPredictionJob batchPredictionJob) {
3327     CreateBatchPredictionJobRequest request =
3328         CreateBatchPredictionJobRequest.newBuilder()
3329             .setParent(parent == null ? null : parent.toString())
3330             .setBatchPredictionJob(batchPredictionJob)
3331             .build();
3332     return createBatchPredictionJob(request);
3333   }
3334 
3335   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3336   /**
3337    * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to
3338    * start.
3339    *
3340    * <p>Sample code:
3341    *
3342    * <pre>{@code
3343    * // This snippet has been automatically generated and should be regarded as a code template only.
3344    * // It will require modifications to work:
3345    * // - It may require correct/in-range values for request initialization.
3346    * // - It may require specifying regional endpoints when creating the service client as shown in
3347    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3348    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3349    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
3350    *   BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build();
3351    *   BatchPredictionJob response =
3352    *       jobServiceClient.createBatchPredictionJob(parent, batchPredictionJob);
3353    * }
3354    * }</pre>
3355    *
3356    * @param parent Required. The resource name of the Location to create the BatchPredictionJob in.
3357    *     Format: `projects/{project}/locations/{location}`
3358    * @param batchPredictionJob Required. The BatchPredictionJob to create.
3359    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3360    */
createBatchPredictionJob( String parent, BatchPredictionJob batchPredictionJob)3361   public final BatchPredictionJob createBatchPredictionJob(
3362       String parent, BatchPredictionJob batchPredictionJob) {
3363     CreateBatchPredictionJobRequest request =
3364         CreateBatchPredictionJobRequest.newBuilder()
3365             .setParent(parent)
3366             .setBatchPredictionJob(batchPredictionJob)
3367             .build();
3368     return createBatchPredictionJob(request);
3369   }
3370 
3371   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3372   /**
3373    * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to
3374    * start.
3375    *
3376    * <p>Sample code:
3377    *
3378    * <pre>{@code
3379    * // This snippet has been automatically generated and should be regarded as a code template only.
3380    * // It will require modifications to work:
3381    * // - It may require correct/in-range values for request initialization.
3382    * // - It may require specifying regional endpoints when creating the service client as shown in
3383    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3384    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3385    *   CreateBatchPredictionJobRequest request =
3386    *       CreateBatchPredictionJobRequest.newBuilder()
3387    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
3388    *           .setBatchPredictionJob(BatchPredictionJob.newBuilder().build())
3389    *           .build();
3390    *   BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(request);
3391    * }
3392    * }</pre>
3393    *
3394    * @param request The request object containing all of the parameters for the API call.
3395    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3396    */
createBatchPredictionJob( CreateBatchPredictionJobRequest request)3397   public final BatchPredictionJob createBatchPredictionJob(
3398       CreateBatchPredictionJobRequest request) {
3399     return createBatchPredictionJobCallable().call(request);
3400   }
3401 
3402   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3403   /**
3404    * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to
3405    * start.
3406    *
3407    * <p>Sample code:
3408    *
3409    * <pre>{@code
3410    * // This snippet has been automatically generated and should be regarded as a code template only.
3411    * // It will require modifications to work:
3412    * // - It may require correct/in-range values for request initialization.
3413    * // - It may require specifying regional endpoints when creating the service client as shown in
3414    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3415    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3416    *   CreateBatchPredictionJobRequest request =
3417    *       CreateBatchPredictionJobRequest.newBuilder()
3418    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
3419    *           .setBatchPredictionJob(BatchPredictionJob.newBuilder().build())
3420    *           .build();
3421    *   ApiFuture<BatchPredictionJob> future =
3422    *       jobServiceClient.createBatchPredictionJobCallable().futureCall(request);
3423    *   // Do something.
3424    *   BatchPredictionJob response = future.get();
3425    * }
3426    * }</pre>
3427    */
3428   public final UnaryCallable<CreateBatchPredictionJobRequest, BatchPredictionJob>
createBatchPredictionJobCallable()3429       createBatchPredictionJobCallable() {
3430     return stub.createBatchPredictionJobCallable();
3431   }
3432 
3433   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3434   /**
3435    * Gets a BatchPredictionJob
3436    *
3437    * <p>Sample code:
3438    *
3439    * <pre>{@code
3440    * // This snippet has been automatically generated and should be regarded as a code template only.
3441    * // It will require modifications to work:
3442    * // - It may require correct/in-range values for request initialization.
3443    * // - It may require specifying regional endpoints when creating the service client as shown in
3444    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3445    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3446    *   BatchPredictionJobName name =
3447    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
3448    *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name);
3449    * }
3450    * }</pre>
3451    *
3452    * @param name Required. The name of the BatchPredictionJob resource. Format:
3453    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3454    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3455    */
getBatchPredictionJob(BatchPredictionJobName name)3456   public final BatchPredictionJob getBatchPredictionJob(BatchPredictionJobName name) {
3457     GetBatchPredictionJobRequest request =
3458         GetBatchPredictionJobRequest.newBuilder()
3459             .setName(name == null ? null : name.toString())
3460             .build();
3461     return getBatchPredictionJob(request);
3462   }
3463 
3464   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3465   /**
3466    * Gets a BatchPredictionJob
3467    *
3468    * <p>Sample code:
3469    *
3470    * <pre>{@code
3471    * // This snippet has been automatically generated and should be regarded as a code template only.
3472    * // It will require modifications to work:
3473    * // - It may require correct/in-range values for request initialization.
3474    * // - It may require specifying regional endpoints when creating the service client as shown in
3475    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3476    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3477    *   String name =
3478    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
3479    *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name);
3480    * }
3481    * }</pre>
3482    *
3483    * @param name Required. The name of the BatchPredictionJob resource. Format:
3484    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3485    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3486    */
getBatchPredictionJob(String name)3487   public final BatchPredictionJob getBatchPredictionJob(String name) {
3488     GetBatchPredictionJobRequest request =
3489         GetBatchPredictionJobRequest.newBuilder().setName(name).build();
3490     return getBatchPredictionJob(request);
3491   }
3492 
3493   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3494   /**
3495    * Gets a BatchPredictionJob
3496    *
3497    * <p>Sample code:
3498    *
3499    * <pre>{@code
3500    * // This snippet has been automatically generated and should be regarded as a code template only.
3501    * // It will require modifications to work:
3502    * // - It may require correct/in-range values for request initialization.
3503    * // - It may require specifying regional endpoints when creating the service client as shown in
3504    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3505    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3506    *   GetBatchPredictionJobRequest request =
3507    *       GetBatchPredictionJobRequest.newBuilder()
3508    *           .setName(
3509    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3510    *                   .toString())
3511    *           .build();
3512    *   BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(request);
3513    * }
3514    * }</pre>
3515    *
3516    * @param request The request object containing all of the parameters for the API call.
3517    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3518    */
getBatchPredictionJob(GetBatchPredictionJobRequest request)3519   public final BatchPredictionJob getBatchPredictionJob(GetBatchPredictionJobRequest request) {
3520     return getBatchPredictionJobCallable().call(request);
3521   }
3522 
3523   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3524   /**
3525    * Gets a BatchPredictionJob
3526    *
3527    * <p>Sample code:
3528    *
3529    * <pre>{@code
3530    * // This snippet has been automatically generated and should be regarded as a code template only.
3531    * // It will require modifications to work:
3532    * // - It may require correct/in-range values for request initialization.
3533    * // - It may require specifying regional endpoints when creating the service client as shown in
3534    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3535    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3536    *   GetBatchPredictionJobRequest request =
3537    *       GetBatchPredictionJobRequest.newBuilder()
3538    *           .setName(
3539    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3540    *                   .toString())
3541    *           .build();
3542    *   ApiFuture<BatchPredictionJob> future =
3543    *       jobServiceClient.getBatchPredictionJobCallable().futureCall(request);
3544    *   // Do something.
3545    *   BatchPredictionJob response = future.get();
3546    * }
3547    * }</pre>
3548    */
3549   public final UnaryCallable<GetBatchPredictionJobRequest, BatchPredictionJob>
getBatchPredictionJobCallable()3550       getBatchPredictionJobCallable() {
3551     return stub.getBatchPredictionJobCallable();
3552   }
3553 
3554   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3555   /**
3556    * Lists BatchPredictionJobs in a Location.
3557    *
3558    * <p>Sample code:
3559    *
3560    * <pre>{@code
3561    * // This snippet has been automatically generated and should be regarded as a code template only.
3562    * // It will require modifications to work:
3563    * // - It may require correct/in-range values for request initialization.
3564    * // - It may require specifying regional endpoints when creating the service client as shown in
3565    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3566    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3567    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
3568    *   for (BatchPredictionJob element :
3569    *       jobServiceClient.listBatchPredictionJobs(parent).iterateAll()) {
3570    *     // doThingsWith(element);
3571    *   }
3572    * }
3573    * }</pre>
3574    *
3575    * @param parent Required. The resource name of the Location to list the BatchPredictionJobs from.
3576    *     Format: `projects/{project}/locations/{location}`
3577    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3578    */
listBatchPredictionJobs(LocationName parent)3579   public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(LocationName parent) {
3580     ListBatchPredictionJobsRequest request =
3581         ListBatchPredictionJobsRequest.newBuilder()
3582             .setParent(parent == null ? null : parent.toString())
3583             .build();
3584     return listBatchPredictionJobs(request);
3585   }
3586 
3587   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3588   /**
3589    * Lists BatchPredictionJobs in a Location.
3590    *
3591    * <p>Sample code:
3592    *
3593    * <pre>{@code
3594    * // This snippet has been automatically generated and should be regarded as a code template only.
3595    * // It will require modifications to work:
3596    * // - It may require correct/in-range values for request initialization.
3597    * // - It may require specifying regional endpoints when creating the service client as shown in
3598    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3599    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3600    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
3601    *   for (BatchPredictionJob element :
3602    *       jobServiceClient.listBatchPredictionJobs(parent).iterateAll()) {
3603    *     // doThingsWith(element);
3604    *   }
3605    * }
3606    * }</pre>
3607    *
3608    * @param parent Required. The resource name of the Location to list the BatchPredictionJobs from.
3609    *     Format: `projects/{project}/locations/{location}`
3610    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3611    */
listBatchPredictionJobs(String parent)3612   public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(String parent) {
3613     ListBatchPredictionJobsRequest request =
3614         ListBatchPredictionJobsRequest.newBuilder().setParent(parent).build();
3615     return listBatchPredictionJobs(request);
3616   }
3617 
3618   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3619   /**
3620    * Lists BatchPredictionJobs in a Location.
3621    *
3622    * <p>Sample code:
3623    *
3624    * <pre>{@code
3625    * // This snippet has been automatically generated and should be regarded as a code template only.
3626    * // It will require modifications to work:
3627    * // - It may require correct/in-range values for request initialization.
3628    * // - It may require specifying regional endpoints when creating the service client as shown in
3629    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3630    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3631    *   ListBatchPredictionJobsRequest request =
3632    *       ListBatchPredictionJobsRequest.newBuilder()
3633    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
3634    *           .setFilter("filter-1274492040")
3635    *           .setPageSize(883849137)
3636    *           .setPageToken("pageToken873572522")
3637    *           .setReadMask(FieldMask.newBuilder().build())
3638    *           .build();
3639    *   for (BatchPredictionJob element :
3640    *       jobServiceClient.listBatchPredictionJobs(request).iterateAll()) {
3641    *     // doThingsWith(element);
3642    *   }
3643    * }
3644    * }</pre>
3645    *
3646    * @param request The request object containing all of the parameters for the API call.
3647    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3648    */
listBatchPredictionJobs( ListBatchPredictionJobsRequest request)3649   public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(
3650       ListBatchPredictionJobsRequest request) {
3651     return listBatchPredictionJobsPagedCallable().call(request);
3652   }
3653 
3654   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3655   /**
3656    * Lists BatchPredictionJobs in a Location.
3657    *
3658    * <p>Sample code:
3659    *
3660    * <pre>{@code
3661    * // This snippet has been automatically generated and should be regarded as a code template only.
3662    * // It will require modifications to work:
3663    * // - It may require correct/in-range values for request initialization.
3664    * // - It may require specifying regional endpoints when creating the service client as shown in
3665    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3666    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3667    *   ListBatchPredictionJobsRequest request =
3668    *       ListBatchPredictionJobsRequest.newBuilder()
3669    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
3670    *           .setFilter("filter-1274492040")
3671    *           .setPageSize(883849137)
3672    *           .setPageToken("pageToken873572522")
3673    *           .setReadMask(FieldMask.newBuilder().build())
3674    *           .build();
3675    *   ApiFuture<BatchPredictionJob> future =
3676    *       jobServiceClient.listBatchPredictionJobsPagedCallable().futureCall(request);
3677    *   // Do something.
3678    *   for (BatchPredictionJob element : future.get().iterateAll()) {
3679    *     // doThingsWith(element);
3680    *   }
3681    * }
3682    * }</pre>
3683    */
3684   public final UnaryCallable<ListBatchPredictionJobsRequest, ListBatchPredictionJobsPagedResponse>
listBatchPredictionJobsPagedCallable()3685       listBatchPredictionJobsPagedCallable() {
3686     return stub.listBatchPredictionJobsPagedCallable();
3687   }
3688 
3689   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3690   /**
3691    * Lists BatchPredictionJobs in a Location.
3692    *
3693    * <p>Sample code:
3694    *
3695    * <pre>{@code
3696    * // This snippet has been automatically generated and should be regarded as a code template only.
3697    * // It will require modifications to work:
3698    * // - It may require correct/in-range values for request initialization.
3699    * // - It may require specifying regional endpoints when creating the service client as shown in
3700    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3701    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3702    *   ListBatchPredictionJobsRequest request =
3703    *       ListBatchPredictionJobsRequest.newBuilder()
3704    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
3705    *           .setFilter("filter-1274492040")
3706    *           .setPageSize(883849137)
3707    *           .setPageToken("pageToken873572522")
3708    *           .setReadMask(FieldMask.newBuilder().build())
3709    *           .build();
3710    *   while (true) {
3711    *     ListBatchPredictionJobsResponse response =
3712    *         jobServiceClient.listBatchPredictionJobsCallable().call(request);
3713    *     for (BatchPredictionJob element : response.getBatchPredictionJobsList()) {
3714    *       // doThingsWith(element);
3715    *     }
3716    *     String nextPageToken = response.getNextPageToken();
3717    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
3718    *       request = request.toBuilder().setPageToken(nextPageToken).build();
3719    *     } else {
3720    *       break;
3721    *     }
3722    *   }
3723    * }
3724    * }</pre>
3725    */
3726   public final UnaryCallable<ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse>
listBatchPredictionJobsCallable()3727       listBatchPredictionJobsCallable() {
3728     return stub.listBatchPredictionJobsCallable();
3729   }
3730 
3731   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3732   /**
3733    * Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
3734    *
3735    * <p>Sample code:
3736    *
3737    * <pre>{@code
3738    * // This snippet has been automatically generated and should be regarded as a code template only.
3739    * // It will require modifications to work:
3740    * // - It may require correct/in-range values for request initialization.
3741    * // - It may require specifying regional endpoints when creating the service client as shown in
3742    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3743    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3744    *   BatchPredictionJobName name =
3745    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
3746    *   jobServiceClient.deleteBatchPredictionJobAsync(name).get();
3747    * }
3748    * }</pre>
3749    *
3750    * @param name Required. The name of the BatchPredictionJob resource to be deleted. Format:
3751    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3752    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3753    */
deleteBatchPredictionJobAsync( BatchPredictionJobName name)3754   public final OperationFuture<Empty, DeleteOperationMetadata> deleteBatchPredictionJobAsync(
3755       BatchPredictionJobName name) {
3756     DeleteBatchPredictionJobRequest request =
3757         DeleteBatchPredictionJobRequest.newBuilder()
3758             .setName(name == null ? null : name.toString())
3759             .build();
3760     return deleteBatchPredictionJobAsync(request);
3761   }
3762 
3763   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3764   /**
3765    * Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
3766    *
3767    * <p>Sample code:
3768    *
3769    * <pre>{@code
3770    * // This snippet has been automatically generated and should be regarded as a code template only.
3771    * // It will require modifications to work:
3772    * // - It may require correct/in-range values for request initialization.
3773    * // - It may require specifying regional endpoints when creating the service client as shown in
3774    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3775    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3776    *   String name =
3777    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
3778    *   jobServiceClient.deleteBatchPredictionJobAsync(name).get();
3779    * }
3780    * }</pre>
3781    *
3782    * @param name Required. The name of the BatchPredictionJob resource to be deleted. Format:
3783    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3784    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3785    */
deleteBatchPredictionJobAsync( String name)3786   public final OperationFuture<Empty, DeleteOperationMetadata> deleteBatchPredictionJobAsync(
3787       String name) {
3788     DeleteBatchPredictionJobRequest request =
3789         DeleteBatchPredictionJobRequest.newBuilder().setName(name).build();
3790     return deleteBatchPredictionJobAsync(request);
3791   }
3792 
3793   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3794   /**
3795    * Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
3796    *
3797    * <p>Sample code:
3798    *
3799    * <pre>{@code
3800    * // This snippet has been automatically generated and should be regarded as a code template only.
3801    * // It will require modifications to work:
3802    * // - It may require correct/in-range values for request initialization.
3803    * // - It may require specifying regional endpoints when creating the service client as shown in
3804    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3805    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3806    *   DeleteBatchPredictionJobRequest request =
3807    *       DeleteBatchPredictionJobRequest.newBuilder()
3808    *           .setName(
3809    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3810    *                   .toString())
3811    *           .build();
3812    *   jobServiceClient.deleteBatchPredictionJobAsync(request).get();
3813    * }
3814    * }</pre>
3815    *
3816    * @param request The request object containing all of the parameters for the API call.
3817    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3818    */
deleteBatchPredictionJobAsync( DeleteBatchPredictionJobRequest request)3819   public final OperationFuture<Empty, DeleteOperationMetadata> deleteBatchPredictionJobAsync(
3820       DeleteBatchPredictionJobRequest request) {
3821     return deleteBatchPredictionJobOperationCallable().futureCall(request);
3822   }
3823 
3824   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3825   /**
3826    * Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
3827    *
3828    * <p>Sample code:
3829    *
3830    * <pre>{@code
3831    * // This snippet has been automatically generated and should be regarded as a code template only.
3832    * // It will require modifications to work:
3833    * // - It may require correct/in-range values for request initialization.
3834    * // - It may require specifying regional endpoints when creating the service client as shown in
3835    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3836    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3837    *   DeleteBatchPredictionJobRequest request =
3838    *       DeleteBatchPredictionJobRequest.newBuilder()
3839    *           .setName(
3840    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3841    *                   .toString())
3842    *           .build();
3843    *   OperationFuture<Empty, DeleteOperationMetadata> future =
3844    *       jobServiceClient.deleteBatchPredictionJobOperationCallable().futureCall(request);
3845    *   // Do something.
3846    *   future.get();
3847    * }
3848    * }</pre>
3849    */
3850   public final OperationCallable<DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata>
deleteBatchPredictionJobOperationCallable()3851       deleteBatchPredictionJobOperationCallable() {
3852     return stub.deleteBatchPredictionJobOperationCallable();
3853   }
3854 
3855   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3856   /**
3857    * Deletes a BatchPredictionJob. Can only be called on jobs that already finished.
3858    *
3859    * <p>Sample code:
3860    *
3861    * <pre>{@code
3862    * // This snippet has been automatically generated and should be regarded as a code template only.
3863    * // It will require modifications to work:
3864    * // - It may require correct/in-range values for request initialization.
3865    * // - It may require specifying regional endpoints when creating the service client as shown in
3866    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3867    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3868    *   DeleteBatchPredictionJobRequest request =
3869    *       DeleteBatchPredictionJobRequest.newBuilder()
3870    *           .setName(
3871    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3872    *                   .toString())
3873    *           .build();
3874    *   ApiFuture<Operation> future =
3875    *       jobServiceClient.deleteBatchPredictionJobCallable().futureCall(request);
3876    *   // Do something.
3877    *   future.get();
3878    * }
3879    * }</pre>
3880    */
3881   public final UnaryCallable<DeleteBatchPredictionJobRequest, Operation>
deleteBatchPredictionJobCallable()3882       deleteBatchPredictionJobCallable() {
3883     return stub.deleteBatchPredictionJobCallable();
3884   }
3885 
3886   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3887   /**
3888    * Cancels a BatchPredictionJob.
3889    *
3890    * <p>Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort
3891    * to cancel the job, but success is not guaranteed. Clients can use
3892    * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]
3893    * or other methods to check whether the cancellation succeeded or whether the job completed
3894    * despite cancellation. On a successful cancellation, the BatchPredictionJob is not
3895    * deleted;instead its
3896    * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to
3897    * `CANCELLED`. Any files already outputted by the job are not deleted.
3898    *
3899    * <p>Sample code:
3900    *
3901    * <pre>{@code
3902    * // This snippet has been automatically generated and should be regarded as a code template only.
3903    * // It will require modifications to work:
3904    * // - It may require correct/in-range values for request initialization.
3905    * // - It may require specifying regional endpoints when creating the service client as shown in
3906    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3907    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3908    *   BatchPredictionJobName name =
3909    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
3910    *   jobServiceClient.cancelBatchPredictionJob(name);
3911    * }
3912    * }</pre>
3913    *
3914    * @param name Required. The name of the BatchPredictionJob to cancel. Format:
3915    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3916    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3917    */
cancelBatchPredictionJob(BatchPredictionJobName name)3918   public final void cancelBatchPredictionJob(BatchPredictionJobName name) {
3919     CancelBatchPredictionJobRequest request =
3920         CancelBatchPredictionJobRequest.newBuilder()
3921             .setName(name == null ? null : name.toString())
3922             .build();
3923     cancelBatchPredictionJob(request);
3924   }
3925 
3926   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3927   /**
3928    * Cancels a BatchPredictionJob.
3929    *
3930    * <p>Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort
3931    * to cancel the job, but success is not guaranteed. Clients can use
3932    * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]
3933    * or other methods to check whether the cancellation succeeded or whether the job completed
3934    * despite cancellation. On a successful cancellation, the BatchPredictionJob is not
3935    * deleted;instead its
3936    * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to
3937    * `CANCELLED`. Any files already outputted by the job are not deleted.
3938    *
3939    * <p>Sample code:
3940    *
3941    * <pre>{@code
3942    * // This snippet has been automatically generated and should be regarded as a code template only.
3943    * // It will require modifications to work:
3944    * // - It may require correct/in-range values for request initialization.
3945    * // - It may require specifying regional endpoints when creating the service client as shown in
3946    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3947    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3948    *   String name =
3949    *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
3950    *   jobServiceClient.cancelBatchPredictionJob(name);
3951    * }
3952    * }</pre>
3953    *
3954    * @param name Required. The name of the BatchPredictionJob to cancel. Format:
3955    *     `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
3956    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3957    */
cancelBatchPredictionJob(String name)3958   public final void cancelBatchPredictionJob(String name) {
3959     CancelBatchPredictionJobRequest request =
3960         CancelBatchPredictionJobRequest.newBuilder().setName(name).build();
3961     cancelBatchPredictionJob(request);
3962   }
3963 
3964   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3965   /**
3966    * Cancels a BatchPredictionJob.
3967    *
3968    * <p>Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort
3969    * to cancel the job, but success is not guaranteed. Clients can use
3970    * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]
3971    * or other methods to check whether the cancellation succeeded or whether the job completed
3972    * despite cancellation. On a successful cancellation, the BatchPredictionJob is not
3973    * deleted;instead its
3974    * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to
3975    * `CANCELLED`. Any files already outputted by the job are not deleted.
3976    *
3977    * <p>Sample code:
3978    *
3979    * <pre>{@code
3980    * // This snippet has been automatically generated and should be regarded as a code template only.
3981    * // It will require modifications to work:
3982    * // - It may require correct/in-range values for request initialization.
3983    * // - It may require specifying regional endpoints when creating the service client as shown in
3984    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3985    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
3986    *   CancelBatchPredictionJobRequest request =
3987    *       CancelBatchPredictionJobRequest.newBuilder()
3988    *           .setName(
3989    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
3990    *                   .toString())
3991    *           .build();
3992    *   jobServiceClient.cancelBatchPredictionJob(request);
3993    * }
3994    * }</pre>
3995    *
3996    * @param request The request object containing all of the parameters for the API call.
3997    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3998    */
cancelBatchPredictionJob(CancelBatchPredictionJobRequest request)3999   public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest request) {
4000     cancelBatchPredictionJobCallable().call(request);
4001   }
4002 
4003   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4004   /**
4005    * Cancels a BatchPredictionJob.
4006    *
4007    * <p>Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort
4008    * to cancel the job, but success is not guaranteed. Clients can use
4009    * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]
4010    * or other methods to check whether the cancellation succeeded or whether the job completed
4011    * despite cancellation. On a successful cancellation, the BatchPredictionJob is not
4012    * deleted;instead its
4013    * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to
4014    * `CANCELLED`. Any files already outputted by the job are not deleted.
4015    *
4016    * <p>Sample code:
4017    *
4018    * <pre>{@code
4019    * // This snippet has been automatically generated and should be regarded as a code template only.
4020    * // It will require modifications to work:
4021    * // - It may require correct/in-range values for request initialization.
4022    * // - It may require specifying regional endpoints when creating the service client as shown in
4023    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4024    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4025    *   CancelBatchPredictionJobRequest request =
4026    *       CancelBatchPredictionJobRequest.newBuilder()
4027    *           .setName(
4028    *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
4029    *                   .toString())
4030    *           .build();
4031    *   ApiFuture<Empty> future =
4032    *       jobServiceClient.cancelBatchPredictionJobCallable().futureCall(request);
4033    *   // Do something.
4034    *   future.get();
4035    * }
4036    * }</pre>
4037    */
4038   public final UnaryCallable<CancelBatchPredictionJobRequest, Empty>
cancelBatchPredictionJobCallable()4039       cancelBatchPredictionJobCallable() {
4040     return stub.cancelBatchPredictionJobCallable();
4041   }
4042 
4043   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4044   /**
4045    * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
4046    *
4047    * <p>Sample code:
4048    *
4049    * <pre>{@code
4050    * // This snippet has been automatically generated and should be regarded as a code template only.
4051    * // It will require modifications to work:
4052    * // - It may require correct/in-range values for request initialization.
4053    * // - It may require specifying regional endpoints when creating the service client as shown in
4054    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4055    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4056    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
4057    *   ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
4058    *       ModelDeploymentMonitoringJob.newBuilder().build();
4059    *   ModelDeploymentMonitoringJob response =
4060    *       jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob);
4061    * }
4062    * }</pre>
4063    *
4064    * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
4065    *     `projects/{project}/locations/{location}`
4066    * @param modelDeploymentMonitoringJob Required. The ModelDeploymentMonitoringJob to create
4067    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4068    */
createModelDeploymentMonitoringJob( LocationName parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob)4069   public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
4070       LocationName parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) {
4071     CreateModelDeploymentMonitoringJobRequest request =
4072         CreateModelDeploymentMonitoringJobRequest.newBuilder()
4073             .setParent(parent == null ? null : parent.toString())
4074             .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
4075             .build();
4076     return createModelDeploymentMonitoringJob(request);
4077   }
4078 
4079   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4080   /**
4081    * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
4082    *
4083    * <p>Sample code:
4084    *
4085    * <pre>{@code
4086    * // This snippet has been automatically generated and should be regarded as a code template only.
4087    * // It will require modifications to work:
4088    * // - It may require correct/in-range values for request initialization.
4089    * // - It may require specifying regional endpoints when creating the service client as shown in
4090    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4091    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4092    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
4093    *   ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
4094    *       ModelDeploymentMonitoringJob.newBuilder().build();
4095    *   ModelDeploymentMonitoringJob response =
4096    *       jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob);
4097    * }
4098    * }</pre>
4099    *
4100    * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
4101    *     `projects/{project}/locations/{location}`
4102    * @param modelDeploymentMonitoringJob Required. The ModelDeploymentMonitoringJob to create
4103    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4104    */
createModelDeploymentMonitoringJob( String parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob)4105   public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
4106       String parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) {
4107     CreateModelDeploymentMonitoringJobRequest request =
4108         CreateModelDeploymentMonitoringJobRequest.newBuilder()
4109             .setParent(parent)
4110             .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
4111             .build();
4112     return createModelDeploymentMonitoringJob(request);
4113   }
4114 
4115   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4116   /**
4117    * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
4118    *
4119    * <p>Sample code:
4120    *
4121    * <pre>{@code
4122    * // This snippet has been automatically generated and should be regarded as a code template only.
4123    * // It will require modifications to work:
4124    * // - It may require correct/in-range values for request initialization.
4125    * // - It may require specifying regional endpoints when creating the service client as shown in
4126    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4127    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4128    *   CreateModelDeploymentMonitoringJobRequest request =
4129    *       CreateModelDeploymentMonitoringJobRequest.newBuilder()
4130    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
4131    *           .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
4132    *           .build();
4133    *   ModelDeploymentMonitoringJob response =
4134    *       jobServiceClient.createModelDeploymentMonitoringJob(request);
4135    * }
4136    * }</pre>
4137    *
4138    * @param request The request object containing all of the parameters for the API call.
4139    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4140    */
createModelDeploymentMonitoringJob( CreateModelDeploymentMonitoringJobRequest request)4141   public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
4142       CreateModelDeploymentMonitoringJobRequest request) {
4143     return createModelDeploymentMonitoringJobCallable().call(request);
4144   }
4145 
4146   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4147   /**
4148    * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
4149    *
4150    * <p>Sample code:
4151    *
4152    * <pre>{@code
4153    * // This snippet has been automatically generated and should be regarded as a code template only.
4154    * // It will require modifications to work:
4155    * // - It may require correct/in-range values for request initialization.
4156    * // - It may require specifying regional endpoints when creating the service client as shown in
4157    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4158    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4159    *   CreateModelDeploymentMonitoringJobRequest request =
4160    *       CreateModelDeploymentMonitoringJobRequest.newBuilder()
4161    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
4162    *           .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
4163    *           .build();
4164    *   ApiFuture<ModelDeploymentMonitoringJob> future =
4165    *       jobServiceClient.createModelDeploymentMonitoringJobCallable().futureCall(request);
4166    *   // Do something.
4167    *   ModelDeploymentMonitoringJob response = future.get();
4168    * }
4169    * }</pre>
4170    */
4171   public final UnaryCallable<
4172           CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>
createModelDeploymentMonitoringJobCallable()4173       createModelDeploymentMonitoringJobCallable() {
4174     return stub.createModelDeploymentMonitoringJobCallable();
4175   }
4176 
4177   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4178   /**
4179    * Searches Model Monitoring Statistics generated within a given time window.
4180    *
4181    * <p>Sample code:
4182    *
4183    * <pre>{@code
4184    * // This snippet has been automatically generated and should be regarded as a code template only.
4185    * // It will require modifications to work:
4186    * // - It may require correct/in-range values for request initialization.
4187    * // - It may require specifying regional endpoints when creating the service client as shown in
4188    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4189    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4190    *   ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob =
4191    *       ModelDeploymentMonitoringJobName.of(
4192    *           "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
4193    *   String deployedModelId = "deployedModelId-1817547906";
4194    *   for (ModelMonitoringStatsAnomalies element :
4195    *       jobServiceClient
4196    *           .searchModelDeploymentMonitoringStatsAnomalies(
4197    *               modelDeploymentMonitoringJob, deployedModelId)
4198    *           .iterateAll()) {
4199    *     // doThingsWith(element);
4200    *   }
4201    * }
4202    * }</pre>
4203    *
4204    * @param modelDeploymentMonitoringJob Required. ModelDeploymentMonitoring Job resource name.
4205    *     Format:
4206    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4207    * @param deployedModelId Required. The DeployedModel ID of the
4208    *     [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
4209    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4210    */
4211   public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
searchModelDeploymentMonitoringStatsAnomalies( ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob, String deployedModelId)4212       searchModelDeploymentMonitoringStatsAnomalies(
4213           ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob, String deployedModelId) {
4214     SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
4215         SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
4216             .setModelDeploymentMonitoringJob(
4217                 modelDeploymentMonitoringJob == null
4218                     ? null
4219                     : modelDeploymentMonitoringJob.toString())
4220             .setDeployedModelId(deployedModelId)
4221             .build();
4222     return searchModelDeploymentMonitoringStatsAnomalies(request);
4223   }
4224 
4225   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4226   /**
4227    * Searches Model Monitoring Statistics generated within a given time window.
4228    *
4229    * <p>Sample code:
4230    *
4231    * <pre>{@code
4232    * // This snippet has been automatically generated and should be regarded as a code template only.
4233    * // It will require modifications to work:
4234    * // - It may require correct/in-range values for request initialization.
4235    * // - It may require specifying regional endpoints when creating the service client as shown in
4236    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4237    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4238    *   String modelDeploymentMonitoringJob =
4239    *       ModelDeploymentMonitoringJobName.of(
4240    *               "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4241    *           .toString();
4242    *   String deployedModelId = "deployedModelId-1817547906";
4243    *   for (ModelMonitoringStatsAnomalies element :
4244    *       jobServiceClient
4245    *           .searchModelDeploymentMonitoringStatsAnomalies(
4246    *               modelDeploymentMonitoringJob, deployedModelId)
4247    *           .iterateAll()) {
4248    *     // doThingsWith(element);
4249    *   }
4250    * }
4251    * }</pre>
4252    *
4253    * @param modelDeploymentMonitoringJob Required. ModelDeploymentMonitoring Job resource name.
4254    *     Format:
4255    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4256    * @param deployedModelId Required. The DeployedModel ID of the
4257    *     [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
4258    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4259    */
4260   public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
searchModelDeploymentMonitoringStatsAnomalies( String modelDeploymentMonitoringJob, String deployedModelId)4261       searchModelDeploymentMonitoringStatsAnomalies(
4262           String modelDeploymentMonitoringJob, String deployedModelId) {
4263     SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
4264         SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
4265             .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
4266             .setDeployedModelId(deployedModelId)
4267             .build();
4268     return searchModelDeploymentMonitoringStatsAnomalies(request);
4269   }
4270 
4271   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4272   /**
4273    * Searches Model Monitoring Statistics generated within a given time window.
4274    *
4275    * <p>Sample code:
4276    *
4277    * <pre>{@code
4278    * // This snippet has been automatically generated and should be regarded as a code template only.
4279    * // It will require modifications to work:
4280    * // - It may require correct/in-range values for request initialization.
4281    * // - It may require specifying regional endpoints when creating the service client as shown in
4282    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4283    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4284    *   SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
4285    *       SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
4286    *           .setModelDeploymentMonitoringJob(
4287    *               ModelDeploymentMonitoringJobName.of(
4288    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4289    *                   .toString())
4290    *           .setDeployedModelId("deployedModelId-1817547906")
4291    *           .setFeatureDisplayName("featureDisplayName-1741181545")
4292    *           .addAllObjectives(
4293    *               new ArrayList<
4294    *                   SearchModelDeploymentMonitoringStatsAnomaliesRequest
4295    *                       .StatsAnomaliesObjective>())
4296    *           .setPageSize(883849137)
4297    *           .setPageToken("pageToken873572522")
4298    *           .setStartTime(Timestamp.newBuilder().build())
4299    *           .setEndTime(Timestamp.newBuilder().build())
4300    *           .build();
4301    *   for (ModelMonitoringStatsAnomalies element :
4302    *       jobServiceClient.searchModelDeploymentMonitoringStatsAnomalies(request).iterateAll()) {
4303    *     // doThingsWith(element);
4304    *   }
4305    * }
4306    * }</pre>
4307    *
4308    * @param request The request object containing all of the parameters for the API call.
4309    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4310    */
4311   public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
searchModelDeploymentMonitoringStatsAnomalies( SearchModelDeploymentMonitoringStatsAnomaliesRequest request)4312       searchModelDeploymentMonitoringStatsAnomalies(
4313           SearchModelDeploymentMonitoringStatsAnomaliesRequest request) {
4314     return searchModelDeploymentMonitoringStatsAnomaliesPagedCallable().call(request);
4315   }
4316 
4317   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4318   /**
4319    * Searches Model Monitoring Statistics generated within a given time window.
4320    *
4321    * <p>Sample code:
4322    *
4323    * <pre>{@code
4324    * // This snippet has been automatically generated and should be regarded as a code template only.
4325    * // It will require modifications to work:
4326    * // - It may require correct/in-range values for request initialization.
4327    * // - It may require specifying regional endpoints when creating the service client as shown in
4328    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4329    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4330    *   SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
4331    *       SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
4332    *           .setModelDeploymentMonitoringJob(
4333    *               ModelDeploymentMonitoringJobName.of(
4334    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4335    *                   .toString())
4336    *           .setDeployedModelId("deployedModelId-1817547906")
4337    *           .setFeatureDisplayName("featureDisplayName-1741181545")
4338    *           .addAllObjectives(
4339    *               new ArrayList<
4340    *                   SearchModelDeploymentMonitoringStatsAnomaliesRequest
4341    *                       .StatsAnomaliesObjective>())
4342    *           .setPageSize(883849137)
4343    *           .setPageToken("pageToken873572522")
4344    *           .setStartTime(Timestamp.newBuilder().build())
4345    *           .setEndTime(Timestamp.newBuilder().build())
4346    *           .build();
4347    *   ApiFuture<ModelMonitoringStatsAnomalies> future =
4348    *       jobServiceClient
4349    *           .searchModelDeploymentMonitoringStatsAnomaliesPagedCallable()
4350    *           .futureCall(request);
4351    *   // Do something.
4352    *   for (ModelMonitoringStatsAnomalies element : future.get().iterateAll()) {
4353    *     // doThingsWith(element);
4354    *   }
4355    * }
4356    * }</pre>
4357    */
4358   public final UnaryCallable<
4359           SearchModelDeploymentMonitoringStatsAnomaliesRequest,
4360           SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse>
searchModelDeploymentMonitoringStatsAnomaliesPagedCallable()4361       searchModelDeploymentMonitoringStatsAnomaliesPagedCallable() {
4362     return stub.searchModelDeploymentMonitoringStatsAnomaliesPagedCallable();
4363   }
4364 
4365   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4366   /**
4367    * Searches Model Monitoring Statistics generated within a given time window.
4368    *
4369    * <p>Sample code:
4370    *
4371    * <pre>{@code
4372    * // This snippet has been automatically generated and should be regarded as a code template only.
4373    * // It will require modifications to work:
4374    * // - It may require correct/in-range values for request initialization.
4375    * // - It may require specifying regional endpoints when creating the service client as shown in
4376    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4377    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4378    *   SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
4379    *       SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
4380    *           .setModelDeploymentMonitoringJob(
4381    *               ModelDeploymentMonitoringJobName.of(
4382    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4383    *                   .toString())
4384    *           .setDeployedModelId("deployedModelId-1817547906")
4385    *           .setFeatureDisplayName("featureDisplayName-1741181545")
4386    *           .addAllObjectives(
4387    *               new ArrayList<
4388    *                   SearchModelDeploymentMonitoringStatsAnomaliesRequest
4389    *                       .StatsAnomaliesObjective>())
4390    *           .setPageSize(883849137)
4391    *           .setPageToken("pageToken873572522")
4392    *           .setStartTime(Timestamp.newBuilder().build())
4393    *           .setEndTime(Timestamp.newBuilder().build())
4394    *           .build();
4395    *   while (true) {
4396    *     SearchModelDeploymentMonitoringStatsAnomaliesResponse response =
4397    *         jobServiceClient.searchModelDeploymentMonitoringStatsAnomaliesCallable().call(request);
4398    *     for (ModelMonitoringStatsAnomalies element : response.getMonitoringStatsList()) {
4399    *       // doThingsWith(element);
4400    *     }
4401    *     String nextPageToken = response.getNextPageToken();
4402    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
4403    *       request = request.toBuilder().setPageToken(nextPageToken).build();
4404    *     } else {
4405    *       break;
4406    *     }
4407    *   }
4408    * }
4409    * }</pre>
4410    */
4411   public final UnaryCallable<
4412           SearchModelDeploymentMonitoringStatsAnomaliesRequest,
4413           SearchModelDeploymentMonitoringStatsAnomaliesResponse>
searchModelDeploymentMonitoringStatsAnomaliesCallable()4414       searchModelDeploymentMonitoringStatsAnomaliesCallable() {
4415     return stub.searchModelDeploymentMonitoringStatsAnomaliesCallable();
4416   }
4417 
4418   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4419   /**
4420    * Gets a ModelDeploymentMonitoringJob.
4421    *
4422    * <p>Sample code:
4423    *
4424    * <pre>{@code
4425    * // This snippet has been automatically generated and should be regarded as a code template only.
4426    * // It will require modifications to work:
4427    * // - It may require correct/in-range values for request initialization.
4428    * // - It may require specifying regional endpoints when creating the service client as shown in
4429    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4430    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4431    *   ModelDeploymentMonitoringJobName name =
4432    *       ModelDeploymentMonitoringJobName.of(
4433    *           "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
4434    *   ModelDeploymentMonitoringJob response =
4435    *       jobServiceClient.getModelDeploymentMonitoringJob(name);
4436    * }
4437    * }</pre>
4438    *
4439    * @param name Required. The resource name of the ModelDeploymentMonitoringJob. Format:
4440    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4441    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4442    */
getModelDeploymentMonitoringJob( ModelDeploymentMonitoringJobName name)4443   public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(
4444       ModelDeploymentMonitoringJobName name) {
4445     GetModelDeploymentMonitoringJobRequest request =
4446         GetModelDeploymentMonitoringJobRequest.newBuilder()
4447             .setName(name == null ? null : name.toString())
4448             .build();
4449     return getModelDeploymentMonitoringJob(request);
4450   }
4451 
4452   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4453   /**
4454    * Gets a ModelDeploymentMonitoringJob.
4455    *
4456    * <p>Sample code:
4457    *
4458    * <pre>{@code
4459    * // This snippet has been automatically generated and should be regarded as a code template only.
4460    * // It will require modifications to work:
4461    * // - It may require correct/in-range values for request initialization.
4462    * // - It may require specifying regional endpoints when creating the service client as shown in
4463    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4464    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4465    *   String name =
4466    *       ModelDeploymentMonitoringJobName.of(
4467    *               "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4468    *           .toString();
4469    *   ModelDeploymentMonitoringJob response =
4470    *       jobServiceClient.getModelDeploymentMonitoringJob(name);
4471    * }
4472    * }</pre>
4473    *
4474    * @param name Required. The resource name of the ModelDeploymentMonitoringJob. Format:
4475    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4476    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4477    */
getModelDeploymentMonitoringJob(String name)4478   public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(String name) {
4479     GetModelDeploymentMonitoringJobRequest request =
4480         GetModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
4481     return getModelDeploymentMonitoringJob(request);
4482   }
4483 
4484   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4485   /**
4486    * Gets a ModelDeploymentMonitoringJob.
4487    *
4488    * <p>Sample code:
4489    *
4490    * <pre>{@code
4491    * // This snippet has been automatically generated and should be regarded as a code template only.
4492    * // It will require modifications to work:
4493    * // - It may require correct/in-range values for request initialization.
4494    * // - It may require specifying regional endpoints when creating the service client as shown in
4495    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4496    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4497    *   GetModelDeploymentMonitoringJobRequest request =
4498    *       GetModelDeploymentMonitoringJobRequest.newBuilder()
4499    *           .setName(
4500    *               ModelDeploymentMonitoringJobName.of(
4501    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4502    *                   .toString())
4503    *           .build();
4504    *   ModelDeploymentMonitoringJob response =
4505    *       jobServiceClient.getModelDeploymentMonitoringJob(request);
4506    * }
4507    * }</pre>
4508    *
4509    * @param request The request object containing all of the parameters for the API call.
4510    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4511    */
getModelDeploymentMonitoringJob( GetModelDeploymentMonitoringJobRequest request)4512   public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(
4513       GetModelDeploymentMonitoringJobRequest request) {
4514     return getModelDeploymentMonitoringJobCallable().call(request);
4515   }
4516 
4517   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4518   /**
4519    * Gets a ModelDeploymentMonitoringJob.
4520    *
4521    * <p>Sample code:
4522    *
4523    * <pre>{@code
4524    * // This snippet has been automatically generated and should be regarded as a code template only.
4525    * // It will require modifications to work:
4526    * // - It may require correct/in-range values for request initialization.
4527    * // - It may require specifying regional endpoints when creating the service client as shown in
4528    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4529    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4530    *   GetModelDeploymentMonitoringJobRequest request =
4531    *       GetModelDeploymentMonitoringJobRequest.newBuilder()
4532    *           .setName(
4533    *               ModelDeploymentMonitoringJobName.of(
4534    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4535    *                   .toString())
4536    *           .build();
4537    *   ApiFuture<ModelDeploymentMonitoringJob> future =
4538    *       jobServiceClient.getModelDeploymentMonitoringJobCallable().futureCall(request);
4539    *   // Do something.
4540    *   ModelDeploymentMonitoringJob response = future.get();
4541    * }
4542    * }</pre>
4543    */
4544   public final UnaryCallable<GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>
getModelDeploymentMonitoringJobCallable()4545       getModelDeploymentMonitoringJobCallable() {
4546     return stub.getModelDeploymentMonitoringJobCallable();
4547   }
4548 
4549   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4550   /**
4551    * Lists ModelDeploymentMonitoringJobs in a Location.
4552    *
4553    * <p>Sample code:
4554    *
4555    * <pre>{@code
4556    * // This snippet has been automatically generated and should be regarded as a code template only.
4557    * // It will require modifications to work:
4558    * // - It may require correct/in-range values for request initialization.
4559    * // - It may require specifying regional endpoints when creating the service client as shown in
4560    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4561    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4562    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
4563    *   for (ModelDeploymentMonitoringJob element :
4564    *       jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) {
4565    *     // doThingsWith(element);
4566    *   }
4567    * }
4568    * }</pre>
4569    *
4570    * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
4571    *     `projects/{project}/locations/{location}`
4572    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4573    */
listModelDeploymentMonitoringJobs( LocationName parent)4574   public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
4575       LocationName parent) {
4576     ListModelDeploymentMonitoringJobsRequest request =
4577         ListModelDeploymentMonitoringJobsRequest.newBuilder()
4578             .setParent(parent == null ? null : parent.toString())
4579             .build();
4580     return listModelDeploymentMonitoringJobs(request);
4581   }
4582 
4583   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4584   /**
4585    * Lists ModelDeploymentMonitoringJobs in a Location.
4586    *
4587    * <p>Sample code:
4588    *
4589    * <pre>{@code
4590    * // This snippet has been automatically generated and should be regarded as a code template only.
4591    * // It will require modifications to work:
4592    * // - It may require correct/in-range values for request initialization.
4593    * // - It may require specifying regional endpoints when creating the service client as shown in
4594    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4595    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4596    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
4597    *   for (ModelDeploymentMonitoringJob element :
4598    *       jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) {
4599    *     // doThingsWith(element);
4600    *   }
4601    * }
4602    * }</pre>
4603    *
4604    * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
4605    *     `projects/{project}/locations/{location}`
4606    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4607    */
listModelDeploymentMonitoringJobs( String parent)4608   public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
4609       String parent) {
4610     ListModelDeploymentMonitoringJobsRequest request =
4611         ListModelDeploymentMonitoringJobsRequest.newBuilder().setParent(parent).build();
4612     return listModelDeploymentMonitoringJobs(request);
4613   }
4614 
4615   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4616   /**
4617    * Lists ModelDeploymentMonitoringJobs in a Location.
4618    *
4619    * <p>Sample code:
4620    *
4621    * <pre>{@code
4622    * // This snippet has been automatically generated and should be regarded as a code template only.
4623    * // It will require modifications to work:
4624    * // - It may require correct/in-range values for request initialization.
4625    * // - It may require specifying regional endpoints when creating the service client as shown in
4626    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4627    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4628    *   ListModelDeploymentMonitoringJobsRequest request =
4629    *       ListModelDeploymentMonitoringJobsRequest.newBuilder()
4630    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
4631    *           .setFilter("filter-1274492040")
4632    *           .setPageSize(883849137)
4633    *           .setPageToken("pageToken873572522")
4634    *           .setReadMask(FieldMask.newBuilder().build())
4635    *           .build();
4636    *   for (ModelDeploymentMonitoringJob element :
4637    *       jobServiceClient.listModelDeploymentMonitoringJobs(request).iterateAll()) {
4638    *     // doThingsWith(element);
4639    *   }
4640    * }
4641    * }</pre>
4642    *
4643    * @param request The request object containing all of the parameters for the API call.
4644    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4645    */
listModelDeploymentMonitoringJobs( ListModelDeploymentMonitoringJobsRequest request)4646   public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
4647       ListModelDeploymentMonitoringJobsRequest request) {
4648     return listModelDeploymentMonitoringJobsPagedCallable().call(request);
4649   }
4650 
4651   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4652   /**
4653    * Lists ModelDeploymentMonitoringJobs in a Location.
4654    *
4655    * <p>Sample code:
4656    *
4657    * <pre>{@code
4658    * // This snippet has been automatically generated and should be regarded as a code template only.
4659    * // It will require modifications to work:
4660    * // - It may require correct/in-range values for request initialization.
4661    * // - It may require specifying regional endpoints when creating the service client as shown in
4662    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4663    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4664    *   ListModelDeploymentMonitoringJobsRequest request =
4665    *       ListModelDeploymentMonitoringJobsRequest.newBuilder()
4666    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
4667    *           .setFilter("filter-1274492040")
4668    *           .setPageSize(883849137)
4669    *           .setPageToken("pageToken873572522")
4670    *           .setReadMask(FieldMask.newBuilder().build())
4671    *           .build();
4672    *   ApiFuture<ModelDeploymentMonitoringJob> future =
4673    *       jobServiceClient.listModelDeploymentMonitoringJobsPagedCallable().futureCall(request);
4674    *   // Do something.
4675    *   for (ModelDeploymentMonitoringJob element : future.get().iterateAll()) {
4676    *     // doThingsWith(element);
4677    *   }
4678    * }
4679    * }</pre>
4680    */
4681   public final UnaryCallable<
4682           ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsPagedResponse>
listModelDeploymentMonitoringJobsPagedCallable()4683       listModelDeploymentMonitoringJobsPagedCallable() {
4684     return stub.listModelDeploymentMonitoringJobsPagedCallable();
4685   }
4686 
4687   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4688   /**
4689    * Lists ModelDeploymentMonitoringJobs in a Location.
4690    *
4691    * <p>Sample code:
4692    *
4693    * <pre>{@code
4694    * // This snippet has been automatically generated and should be regarded as a code template only.
4695    * // It will require modifications to work:
4696    * // - It may require correct/in-range values for request initialization.
4697    * // - It may require specifying regional endpoints when creating the service client as shown in
4698    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4699    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4700    *   ListModelDeploymentMonitoringJobsRequest request =
4701    *       ListModelDeploymentMonitoringJobsRequest.newBuilder()
4702    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
4703    *           .setFilter("filter-1274492040")
4704    *           .setPageSize(883849137)
4705    *           .setPageToken("pageToken873572522")
4706    *           .setReadMask(FieldMask.newBuilder().build())
4707    *           .build();
4708    *   while (true) {
4709    *     ListModelDeploymentMonitoringJobsResponse response =
4710    *         jobServiceClient.listModelDeploymentMonitoringJobsCallable().call(request);
4711    *     for (ModelDeploymentMonitoringJob element :
4712    *         response.getModelDeploymentMonitoringJobsList()) {
4713    *       // doThingsWith(element);
4714    *     }
4715    *     String nextPageToken = response.getNextPageToken();
4716    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
4717    *       request = request.toBuilder().setPageToken(nextPageToken).build();
4718    *     } else {
4719    *       break;
4720    *     }
4721    *   }
4722    * }
4723    * }</pre>
4724    */
4725   public final UnaryCallable<
4726           ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse>
listModelDeploymentMonitoringJobsCallable()4727       listModelDeploymentMonitoringJobsCallable() {
4728     return stub.listModelDeploymentMonitoringJobsCallable();
4729   }
4730 
4731   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4732   /**
4733    * Updates a ModelDeploymentMonitoringJob.
4734    *
4735    * <p>Sample code:
4736    *
4737    * <pre>{@code
4738    * // This snippet has been automatically generated and should be regarded as a code template only.
4739    * // It will require modifications to work:
4740    * // - It may require correct/in-range values for request initialization.
4741    * // - It may require specifying regional endpoints when creating the service client as shown in
4742    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4743    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4744    *   ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
4745    *       ModelDeploymentMonitoringJob.newBuilder().build();
4746    *   FieldMask updateMask = FieldMask.newBuilder().build();
4747    *   ModelDeploymentMonitoringJob response =
4748    *       jobServiceClient
4749    *           .updateModelDeploymentMonitoringJobAsync(modelDeploymentMonitoringJob, updateMask)
4750    *           .get();
4751    * }
4752    * }</pre>
4753    *
4754    * @param modelDeploymentMonitoringJob Required. The model monitoring configuration which replaces
4755    *     the resource on the server.
4756    * @param updateMask Required. The update mask is used to specify the fields to be overwritten in
4757    *     the ModelDeploymentMonitoringJob resource by the update. The fields specified in the
4758    *     update_mask are relative to the resource, not the full request. A field will be overwritten
4759    *     if it is in the mask. If the user does not provide a mask then only the non-empty fields
4760    *     present in the request will be overwritten. Set the update_mask to `&#42;` to override all
4761    *     fields. For the objective config, the user can either provide the update mask for
4762    *     model_deployment_monitoring_objective_configs or any combination of its nested fields, such
4763    *     as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.
4764    *     <p>Updatable fields:
4765    *     <p>&#42; `display_name` &#42; `model_deployment_monitoring_schedule_config` &#42;
4766    *     `model_monitoring_alert_config` &#42; `logging_sampling_strategy` &#42; `labels` &#42;
4767    *     `log_ttl` &#42; `enable_monitoring_pipeline_logs` . and &#42;
4768    *     `model_deployment_monitoring_objective_configs` . or &#42;
4769    *     `model_deployment_monitoring_objective_configs.objective_config.training_dataset` &#42;
4770    *     `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config`
4771    *     &#42;
4772    *     `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config`
4773    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4774    */
4775   public final OperationFuture<
4776           ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
updateModelDeploymentMonitoringJobAsync( ModelDeploymentMonitoringJob modelDeploymentMonitoringJob, FieldMask updateMask)4777       updateModelDeploymentMonitoringJobAsync(
4778           ModelDeploymentMonitoringJob modelDeploymentMonitoringJob, FieldMask updateMask) {
4779     UpdateModelDeploymentMonitoringJobRequest request =
4780         UpdateModelDeploymentMonitoringJobRequest.newBuilder()
4781             .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
4782             .setUpdateMask(updateMask)
4783             .build();
4784     return updateModelDeploymentMonitoringJobAsync(request);
4785   }
4786 
4787   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4788   /**
4789    * Updates a ModelDeploymentMonitoringJob.
4790    *
4791    * <p>Sample code:
4792    *
4793    * <pre>{@code
4794    * // This snippet has been automatically generated and should be regarded as a code template only.
4795    * // It will require modifications to work:
4796    * // - It may require correct/in-range values for request initialization.
4797    * // - It may require specifying regional endpoints when creating the service client as shown in
4798    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4799    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4800    *   UpdateModelDeploymentMonitoringJobRequest request =
4801    *       UpdateModelDeploymentMonitoringJobRequest.newBuilder()
4802    *           .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
4803    *           .setUpdateMask(FieldMask.newBuilder().build())
4804    *           .build();
4805    *   ModelDeploymentMonitoringJob response =
4806    *       jobServiceClient.updateModelDeploymentMonitoringJobAsync(request).get();
4807    * }
4808    * }</pre>
4809    *
4810    * @param request The request object containing all of the parameters for the API call.
4811    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4812    */
4813   public final OperationFuture<
4814           ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
updateModelDeploymentMonitoringJobAsync(UpdateModelDeploymentMonitoringJobRequest request)4815       updateModelDeploymentMonitoringJobAsync(UpdateModelDeploymentMonitoringJobRequest request) {
4816     return updateModelDeploymentMonitoringJobOperationCallable().futureCall(request);
4817   }
4818 
4819   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4820   /**
4821    * Updates a ModelDeploymentMonitoringJob.
4822    *
4823    * <p>Sample code:
4824    *
4825    * <pre>{@code
4826    * // This snippet has been automatically generated and should be regarded as a code template only.
4827    * // It will require modifications to work:
4828    * // - It may require correct/in-range values for request initialization.
4829    * // - It may require specifying regional endpoints when creating the service client as shown in
4830    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4831    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4832    *   UpdateModelDeploymentMonitoringJobRequest request =
4833    *       UpdateModelDeploymentMonitoringJobRequest.newBuilder()
4834    *           .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
4835    *           .setUpdateMask(FieldMask.newBuilder().build())
4836    *           .build();
4837    *   OperationFuture<
4838    *           ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
4839    *       future =
4840    *           jobServiceClient
4841    *               .updateModelDeploymentMonitoringJobOperationCallable()
4842    *               .futureCall(request);
4843    *   // Do something.
4844    *   ModelDeploymentMonitoringJob response = future.get();
4845    * }
4846    * }</pre>
4847    */
4848   public final OperationCallable<
4849           UpdateModelDeploymentMonitoringJobRequest,
4850           ModelDeploymentMonitoringJob,
4851           UpdateModelDeploymentMonitoringJobOperationMetadata>
updateModelDeploymentMonitoringJobOperationCallable()4852       updateModelDeploymentMonitoringJobOperationCallable() {
4853     return stub.updateModelDeploymentMonitoringJobOperationCallable();
4854   }
4855 
4856   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4857   /**
4858    * Updates a ModelDeploymentMonitoringJob.
4859    *
4860    * <p>Sample code:
4861    *
4862    * <pre>{@code
4863    * // This snippet has been automatically generated and should be regarded as a code template only.
4864    * // It will require modifications to work:
4865    * // - It may require correct/in-range values for request initialization.
4866    * // - It may require specifying regional endpoints when creating the service client as shown in
4867    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4868    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4869    *   UpdateModelDeploymentMonitoringJobRequest request =
4870    *       UpdateModelDeploymentMonitoringJobRequest.newBuilder()
4871    *           .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
4872    *           .setUpdateMask(FieldMask.newBuilder().build())
4873    *           .build();
4874    *   ApiFuture<Operation> future =
4875    *       jobServiceClient.updateModelDeploymentMonitoringJobCallable().futureCall(request);
4876    *   // Do something.
4877    *   Operation response = future.get();
4878    * }
4879    * }</pre>
4880    */
4881   public final UnaryCallable<UpdateModelDeploymentMonitoringJobRequest, Operation>
updateModelDeploymentMonitoringJobCallable()4882       updateModelDeploymentMonitoringJobCallable() {
4883     return stub.updateModelDeploymentMonitoringJobCallable();
4884   }
4885 
4886   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4887   /**
4888    * Deletes a ModelDeploymentMonitoringJob.
4889    *
4890    * <p>Sample code:
4891    *
4892    * <pre>{@code
4893    * // This snippet has been automatically generated and should be regarded as a code template only.
4894    * // It will require modifications to work:
4895    * // - It may require correct/in-range values for request initialization.
4896    * // - It may require specifying regional endpoints when creating the service client as shown in
4897    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4898    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4899    *   ModelDeploymentMonitoringJobName name =
4900    *       ModelDeploymentMonitoringJobName.of(
4901    *           "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
4902    *   jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get();
4903    * }
4904    * }</pre>
4905    *
4906    * @param name Required. The resource name of the model monitoring job to delete. Format:
4907    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4908    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4909    */
4910   public final OperationFuture<Empty, DeleteOperationMetadata>
deleteModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJobName name)4911       deleteModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJobName name) {
4912     DeleteModelDeploymentMonitoringJobRequest request =
4913         DeleteModelDeploymentMonitoringJobRequest.newBuilder()
4914             .setName(name == null ? null : name.toString())
4915             .build();
4916     return deleteModelDeploymentMonitoringJobAsync(request);
4917   }
4918 
4919   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4920   /**
4921    * Deletes a ModelDeploymentMonitoringJob.
4922    *
4923    * <p>Sample code:
4924    *
4925    * <pre>{@code
4926    * // This snippet has been automatically generated and should be regarded as a code template only.
4927    * // It will require modifications to work:
4928    * // - It may require correct/in-range values for request initialization.
4929    * // - It may require specifying regional endpoints when creating the service client as shown in
4930    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4931    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4932    *   String name =
4933    *       ModelDeploymentMonitoringJobName.of(
4934    *               "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4935    *           .toString();
4936    *   jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get();
4937    * }
4938    * }</pre>
4939    *
4940    * @param name Required. The resource name of the model monitoring job to delete. Format:
4941    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
4942    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4943    */
4944   public final OperationFuture<Empty, DeleteOperationMetadata>
deleteModelDeploymentMonitoringJobAsync(String name)4945       deleteModelDeploymentMonitoringJobAsync(String name) {
4946     DeleteModelDeploymentMonitoringJobRequest request =
4947         DeleteModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
4948     return deleteModelDeploymentMonitoringJobAsync(request);
4949   }
4950 
4951   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4952   /**
4953    * Deletes a ModelDeploymentMonitoringJob.
4954    *
4955    * <p>Sample code:
4956    *
4957    * <pre>{@code
4958    * // This snippet has been automatically generated and should be regarded as a code template only.
4959    * // It will require modifications to work:
4960    * // - It may require correct/in-range values for request initialization.
4961    * // - It may require specifying regional endpoints when creating the service client as shown in
4962    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4963    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4964    *   DeleteModelDeploymentMonitoringJobRequest request =
4965    *       DeleteModelDeploymentMonitoringJobRequest.newBuilder()
4966    *           .setName(
4967    *               ModelDeploymentMonitoringJobName.of(
4968    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
4969    *                   .toString())
4970    *           .build();
4971    *   jobServiceClient.deleteModelDeploymentMonitoringJobAsync(request).get();
4972    * }
4973    * }</pre>
4974    *
4975    * @param request The request object containing all of the parameters for the API call.
4976    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4977    */
4978   public final OperationFuture<Empty, DeleteOperationMetadata>
deleteModelDeploymentMonitoringJobAsync(DeleteModelDeploymentMonitoringJobRequest request)4979       deleteModelDeploymentMonitoringJobAsync(DeleteModelDeploymentMonitoringJobRequest request) {
4980     return deleteModelDeploymentMonitoringJobOperationCallable().futureCall(request);
4981   }
4982 
4983   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4984   /**
4985    * Deletes a ModelDeploymentMonitoringJob.
4986    *
4987    * <p>Sample code:
4988    *
4989    * <pre>{@code
4990    * // This snippet has been automatically generated and should be regarded as a code template only.
4991    * // It will require modifications to work:
4992    * // - It may require correct/in-range values for request initialization.
4993    * // - It may require specifying regional endpoints when creating the service client as shown in
4994    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4995    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
4996    *   DeleteModelDeploymentMonitoringJobRequest request =
4997    *       DeleteModelDeploymentMonitoringJobRequest.newBuilder()
4998    *           .setName(
4999    *               ModelDeploymentMonitoringJobName.of(
5000    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5001    *                   .toString())
5002    *           .build();
5003    *   OperationFuture<Empty, DeleteOperationMetadata> future =
5004    *       jobServiceClient
5005    *           .deleteModelDeploymentMonitoringJobOperationCallable()
5006    *           .futureCall(request);
5007    *   // Do something.
5008    *   future.get();
5009    * }
5010    * }</pre>
5011    */
5012   public final OperationCallable<
5013           DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata>
deleteModelDeploymentMonitoringJobOperationCallable()5014       deleteModelDeploymentMonitoringJobOperationCallable() {
5015     return stub.deleteModelDeploymentMonitoringJobOperationCallable();
5016   }
5017 
5018   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5019   /**
5020    * Deletes a ModelDeploymentMonitoringJob.
5021    *
5022    * <p>Sample code:
5023    *
5024    * <pre>{@code
5025    * // This snippet has been automatically generated and should be regarded as a code template only.
5026    * // It will require modifications to work:
5027    * // - It may require correct/in-range values for request initialization.
5028    * // - It may require specifying regional endpoints when creating the service client as shown in
5029    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5030    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5031    *   DeleteModelDeploymentMonitoringJobRequest request =
5032    *       DeleteModelDeploymentMonitoringJobRequest.newBuilder()
5033    *           .setName(
5034    *               ModelDeploymentMonitoringJobName.of(
5035    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5036    *                   .toString())
5037    *           .build();
5038    *   ApiFuture<Operation> future =
5039    *       jobServiceClient.deleteModelDeploymentMonitoringJobCallable().futureCall(request);
5040    *   // Do something.
5041    *   future.get();
5042    * }
5043    * }</pre>
5044    */
5045   public final UnaryCallable<DeleteModelDeploymentMonitoringJobRequest, Operation>
deleteModelDeploymentMonitoringJobCallable()5046       deleteModelDeploymentMonitoringJobCallable() {
5047     return stub.deleteModelDeploymentMonitoringJobCallable();
5048   }
5049 
5050   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5051   /**
5052    * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
5053    * cancel the job. Will mark
5054    * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
5055    * to 'PAUSED'.
5056    *
5057    * <p>Sample code:
5058    *
5059    * <pre>{@code
5060    * // This snippet has been automatically generated and should be regarded as a code template only.
5061    * // It will require modifications to work:
5062    * // - It may require correct/in-range values for request initialization.
5063    * // - It may require specifying regional endpoints when creating the service client as shown in
5064    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5065    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5066    *   ModelDeploymentMonitoringJobName name =
5067    *       ModelDeploymentMonitoringJobName.of(
5068    *           "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
5069    *   jobServiceClient.pauseModelDeploymentMonitoringJob(name);
5070    * }
5071    * }</pre>
5072    *
5073    * @param name Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format:
5074    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
5075    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5076    */
pauseModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name)5077   public final void pauseModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name) {
5078     PauseModelDeploymentMonitoringJobRequest request =
5079         PauseModelDeploymentMonitoringJobRequest.newBuilder()
5080             .setName(name == null ? null : name.toString())
5081             .build();
5082     pauseModelDeploymentMonitoringJob(request);
5083   }
5084 
5085   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5086   /**
5087    * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
5088    * cancel the job. Will mark
5089    * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
5090    * to 'PAUSED'.
5091    *
5092    * <p>Sample code:
5093    *
5094    * <pre>{@code
5095    * // This snippet has been automatically generated and should be regarded as a code template only.
5096    * // It will require modifications to work:
5097    * // - It may require correct/in-range values for request initialization.
5098    * // - It may require specifying regional endpoints when creating the service client as shown in
5099    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5100    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5101    *   String name =
5102    *       ModelDeploymentMonitoringJobName.of(
5103    *               "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5104    *           .toString();
5105    *   jobServiceClient.pauseModelDeploymentMonitoringJob(name);
5106    * }
5107    * }</pre>
5108    *
5109    * @param name Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format:
5110    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
5111    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5112    */
pauseModelDeploymentMonitoringJob(String name)5113   public final void pauseModelDeploymentMonitoringJob(String name) {
5114     PauseModelDeploymentMonitoringJobRequest request =
5115         PauseModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
5116     pauseModelDeploymentMonitoringJob(request);
5117   }
5118 
5119   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5120   /**
5121    * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
5122    * cancel the job. Will mark
5123    * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
5124    * to 'PAUSED'.
5125    *
5126    * <p>Sample code:
5127    *
5128    * <pre>{@code
5129    * // This snippet has been automatically generated and should be regarded as a code template only.
5130    * // It will require modifications to work:
5131    * // - It may require correct/in-range values for request initialization.
5132    * // - It may require specifying regional endpoints when creating the service client as shown in
5133    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5134    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5135    *   PauseModelDeploymentMonitoringJobRequest request =
5136    *       PauseModelDeploymentMonitoringJobRequest.newBuilder()
5137    *           .setName(
5138    *               ModelDeploymentMonitoringJobName.of(
5139    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5140    *                   .toString())
5141    *           .build();
5142    *   jobServiceClient.pauseModelDeploymentMonitoringJob(request);
5143    * }
5144    * }</pre>
5145    *
5146    * @param request The request object containing all of the parameters for the API call.
5147    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5148    */
pauseModelDeploymentMonitoringJob( PauseModelDeploymentMonitoringJobRequest request)5149   public final void pauseModelDeploymentMonitoringJob(
5150       PauseModelDeploymentMonitoringJobRequest request) {
5151     pauseModelDeploymentMonitoringJobCallable().call(request);
5152   }
5153 
5154   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5155   /**
5156    * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
5157    * cancel the job. Will mark
5158    * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
5159    * to 'PAUSED'.
5160    *
5161    * <p>Sample code:
5162    *
5163    * <pre>{@code
5164    * // This snippet has been automatically generated and should be regarded as a code template only.
5165    * // It will require modifications to work:
5166    * // - It may require correct/in-range values for request initialization.
5167    * // - It may require specifying regional endpoints when creating the service client as shown in
5168    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5169    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5170    *   PauseModelDeploymentMonitoringJobRequest request =
5171    *       PauseModelDeploymentMonitoringJobRequest.newBuilder()
5172    *           .setName(
5173    *               ModelDeploymentMonitoringJobName.of(
5174    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5175    *                   .toString())
5176    *           .build();
5177    *   ApiFuture<Empty> future =
5178    *       jobServiceClient.pauseModelDeploymentMonitoringJobCallable().futureCall(request);
5179    *   // Do something.
5180    *   future.get();
5181    * }
5182    * }</pre>
5183    */
5184   public final UnaryCallable<PauseModelDeploymentMonitoringJobRequest, Empty>
pauseModelDeploymentMonitoringJobCallable()5185       pauseModelDeploymentMonitoringJobCallable() {
5186     return stub.pauseModelDeploymentMonitoringJobCallable();
5187   }
5188 
5189   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5190   /**
5191    * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
5192    * deleted ModelDeploymentMonitoringJob can't be resumed.
5193    *
5194    * <p>Sample code:
5195    *
5196    * <pre>{@code
5197    * // This snippet has been automatically generated and should be regarded as a code template only.
5198    * // It will require modifications to work:
5199    * // - It may require correct/in-range values for request initialization.
5200    * // - It may require specifying regional endpoints when creating the service client as shown in
5201    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5202    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5203    *   ModelDeploymentMonitoringJobName name =
5204    *       ModelDeploymentMonitoringJobName.of(
5205    *           "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
5206    *   jobServiceClient.resumeModelDeploymentMonitoringJob(name);
5207    * }
5208    * }</pre>
5209    *
5210    * @param name Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format:
5211    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
5212    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5213    */
resumeModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name)5214   public final void resumeModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name) {
5215     ResumeModelDeploymentMonitoringJobRequest request =
5216         ResumeModelDeploymentMonitoringJobRequest.newBuilder()
5217             .setName(name == null ? null : name.toString())
5218             .build();
5219     resumeModelDeploymentMonitoringJob(request);
5220   }
5221 
5222   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5223   /**
5224    * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
5225    * deleted ModelDeploymentMonitoringJob can't be resumed.
5226    *
5227    * <p>Sample code:
5228    *
5229    * <pre>{@code
5230    * // This snippet has been automatically generated and should be regarded as a code template only.
5231    * // It will require modifications to work:
5232    * // - It may require correct/in-range values for request initialization.
5233    * // - It may require specifying regional endpoints when creating the service client as shown in
5234    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5235    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5236    *   String name =
5237    *       ModelDeploymentMonitoringJobName.of(
5238    *               "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5239    *           .toString();
5240    *   jobServiceClient.resumeModelDeploymentMonitoringJob(name);
5241    * }
5242    * }</pre>
5243    *
5244    * @param name Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format:
5245    *     `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
5246    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5247    */
resumeModelDeploymentMonitoringJob(String name)5248   public final void resumeModelDeploymentMonitoringJob(String name) {
5249     ResumeModelDeploymentMonitoringJobRequest request =
5250         ResumeModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
5251     resumeModelDeploymentMonitoringJob(request);
5252   }
5253 
5254   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5255   /**
5256    * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
5257    * deleted ModelDeploymentMonitoringJob can't be resumed.
5258    *
5259    * <p>Sample code:
5260    *
5261    * <pre>{@code
5262    * // This snippet has been automatically generated and should be regarded as a code template only.
5263    * // It will require modifications to work:
5264    * // - It may require correct/in-range values for request initialization.
5265    * // - It may require specifying regional endpoints when creating the service client as shown in
5266    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5267    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5268    *   ResumeModelDeploymentMonitoringJobRequest request =
5269    *       ResumeModelDeploymentMonitoringJobRequest.newBuilder()
5270    *           .setName(
5271    *               ModelDeploymentMonitoringJobName.of(
5272    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5273    *                   .toString())
5274    *           .build();
5275    *   jobServiceClient.resumeModelDeploymentMonitoringJob(request);
5276    * }
5277    * }</pre>
5278    *
5279    * @param request The request object containing all of the parameters for the API call.
5280    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5281    */
resumeModelDeploymentMonitoringJob( ResumeModelDeploymentMonitoringJobRequest request)5282   public final void resumeModelDeploymentMonitoringJob(
5283       ResumeModelDeploymentMonitoringJobRequest request) {
5284     resumeModelDeploymentMonitoringJobCallable().call(request);
5285   }
5286 
5287   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5288   /**
5289    * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
5290    * deleted ModelDeploymentMonitoringJob can't be resumed.
5291    *
5292    * <p>Sample code:
5293    *
5294    * <pre>{@code
5295    * // This snippet has been automatically generated and should be regarded as a code template only.
5296    * // It will require modifications to work:
5297    * // - It may require correct/in-range values for request initialization.
5298    * // - It may require specifying regional endpoints when creating the service client as shown in
5299    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5300    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5301    *   ResumeModelDeploymentMonitoringJobRequest request =
5302    *       ResumeModelDeploymentMonitoringJobRequest.newBuilder()
5303    *           .setName(
5304    *               ModelDeploymentMonitoringJobName.of(
5305    *                       "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
5306    *                   .toString())
5307    *           .build();
5308    *   ApiFuture<Empty> future =
5309    *       jobServiceClient.resumeModelDeploymentMonitoringJobCallable().futureCall(request);
5310    *   // Do something.
5311    *   future.get();
5312    * }
5313    * }</pre>
5314    */
5315   public final UnaryCallable<ResumeModelDeploymentMonitoringJobRequest, Empty>
resumeModelDeploymentMonitoringJobCallable()5316       resumeModelDeploymentMonitoringJobCallable() {
5317     return stub.resumeModelDeploymentMonitoringJobCallable();
5318   }
5319 
5320   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5321   /**
5322    * Lists information about the supported locations for this service.
5323    *
5324    * <p>Sample code:
5325    *
5326    * <pre>{@code
5327    * // This snippet has been automatically generated and should be regarded as a code template only.
5328    * // It will require modifications to work:
5329    * // - It may require correct/in-range values for request initialization.
5330    * // - It may require specifying regional endpoints when creating the service client as shown in
5331    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5332    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5333    *   ListLocationsRequest request =
5334    *       ListLocationsRequest.newBuilder()
5335    *           .setName("name3373707")
5336    *           .setFilter("filter-1274492040")
5337    *           .setPageSize(883849137)
5338    *           .setPageToken("pageToken873572522")
5339    *           .build();
5340    *   for (Location element : jobServiceClient.listLocations(request).iterateAll()) {
5341    *     // doThingsWith(element);
5342    *   }
5343    * }
5344    * }</pre>
5345    *
5346    * @param request The request object containing all of the parameters for the API call.
5347    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5348    */
listLocations(ListLocationsRequest request)5349   public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
5350     return listLocationsPagedCallable().call(request);
5351   }
5352 
5353   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5354   /**
5355    * Lists information about the supported locations for this service.
5356    *
5357    * <p>Sample code:
5358    *
5359    * <pre>{@code
5360    * // This snippet has been automatically generated and should be regarded as a code template only.
5361    * // It will require modifications to work:
5362    * // - It may require correct/in-range values for request initialization.
5363    * // - It may require specifying regional endpoints when creating the service client as shown in
5364    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5365    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5366    *   ListLocationsRequest request =
5367    *       ListLocationsRequest.newBuilder()
5368    *           .setName("name3373707")
5369    *           .setFilter("filter-1274492040")
5370    *           .setPageSize(883849137)
5371    *           .setPageToken("pageToken873572522")
5372    *           .build();
5373    *   ApiFuture<Location> future =
5374    *       jobServiceClient.listLocationsPagedCallable().futureCall(request);
5375    *   // Do something.
5376    *   for (Location element : future.get().iterateAll()) {
5377    *     // doThingsWith(element);
5378    *   }
5379    * }
5380    * }</pre>
5381    */
5382   public final UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
listLocationsPagedCallable()5383       listLocationsPagedCallable() {
5384     return stub.listLocationsPagedCallable();
5385   }
5386 
5387   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5388   /**
5389    * Lists information about the supported locations for this service.
5390    *
5391    * <p>Sample code:
5392    *
5393    * <pre>{@code
5394    * // This snippet has been automatically generated and should be regarded as a code template only.
5395    * // It will require modifications to work:
5396    * // - It may require correct/in-range values for request initialization.
5397    * // - It may require specifying regional endpoints when creating the service client as shown in
5398    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5399    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5400    *   ListLocationsRequest request =
5401    *       ListLocationsRequest.newBuilder()
5402    *           .setName("name3373707")
5403    *           .setFilter("filter-1274492040")
5404    *           .setPageSize(883849137)
5405    *           .setPageToken("pageToken873572522")
5406    *           .build();
5407    *   while (true) {
5408    *     ListLocationsResponse response = jobServiceClient.listLocationsCallable().call(request);
5409    *     for (Location element : response.getLocationsList()) {
5410    *       // doThingsWith(element);
5411    *     }
5412    *     String nextPageToken = response.getNextPageToken();
5413    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
5414    *       request = request.toBuilder().setPageToken(nextPageToken).build();
5415    *     } else {
5416    *       break;
5417    *     }
5418    *   }
5419    * }
5420    * }</pre>
5421    */
listLocationsCallable()5422   public final UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
5423     return stub.listLocationsCallable();
5424   }
5425 
5426   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5427   /**
5428    * Gets information about a location.
5429    *
5430    * <p>Sample code:
5431    *
5432    * <pre>{@code
5433    * // This snippet has been automatically generated and should be regarded as a code template only.
5434    * // It will require modifications to work:
5435    * // - It may require correct/in-range values for request initialization.
5436    * // - It may require specifying regional endpoints when creating the service client as shown in
5437    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5438    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5439    *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
5440    *   Location response = jobServiceClient.getLocation(request);
5441    * }
5442    * }</pre>
5443    *
5444    * @param request The request object containing all of the parameters for the API call.
5445    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5446    */
getLocation(GetLocationRequest request)5447   public final Location getLocation(GetLocationRequest request) {
5448     return getLocationCallable().call(request);
5449   }
5450 
5451   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5452   /**
5453    * Gets information about a location.
5454    *
5455    * <p>Sample code:
5456    *
5457    * <pre>{@code
5458    * // This snippet has been automatically generated and should be regarded as a code template only.
5459    * // It will require modifications to work:
5460    * // - It may require correct/in-range values for request initialization.
5461    * // - It may require specifying regional endpoints when creating the service client as shown in
5462    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5463    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5464    *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
5465    *   ApiFuture<Location> future = jobServiceClient.getLocationCallable().futureCall(request);
5466    *   // Do something.
5467    *   Location response = future.get();
5468    * }
5469    * }</pre>
5470    */
getLocationCallable()5471   public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
5472     return stub.getLocationCallable();
5473   }
5474 
5475   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5476   /**
5477    * Sets the access control policy on the specified resource. Replacesany existing policy.
5478    *
5479    * <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
5480    *
5481    * <p>Sample code:
5482    *
5483    * <pre>{@code
5484    * // This snippet has been automatically generated and should be regarded as a code template only.
5485    * // It will require modifications to work:
5486    * // - It may require correct/in-range values for request initialization.
5487    * // - It may require specifying regional endpoints when creating the service client as shown in
5488    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5489    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5490    *   SetIamPolicyRequest request =
5491    *       SetIamPolicyRequest.newBuilder()
5492    *           .setResource(
5493    *               EndpointName.ofProjectLocationEndpointName(
5494    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5495    *                   .toString())
5496    *           .setPolicy(Policy.newBuilder().build())
5497    *           .setUpdateMask(FieldMask.newBuilder().build())
5498    *           .build();
5499    *   Policy response = jobServiceClient.setIamPolicy(request);
5500    * }
5501    * }</pre>
5502    *
5503    * @param request The request object containing all of the parameters for the API call.
5504    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5505    */
setIamPolicy(SetIamPolicyRequest request)5506   public final Policy setIamPolicy(SetIamPolicyRequest request) {
5507     return setIamPolicyCallable().call(request);
5508   }
5509 
5510   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5511   /**
5512    * Sets the access control policy on the specified resource. Replacesany existing policy.
5513    *
5514    * <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
5515    *
5516    * <p>Sample code:
5517    *
5518    * <pre>{@code
5519    * // This snippet has been automatically generated and should be regarded as a code template only.
5520    * // It will require modifications to work:
5521    * // - It may require correct/in-range values for request initialization.
5522    * // - It may require specifying regional endpoints when creating the service client as shown in
5523    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5524    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5525    *   SetIamPolicyRequest request =
5526    *       SetIamPolicyRequest.newBuilder()
5527    *           .setResource(
5528    *               EndpointName.ofProjectLocationEndpointName(
5529    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5530    *                   .toString())
5531    *           .setPolicy(Policy.newBuilder().build())
5532    *           .setUpdateMask(FieldMask.newBuilder().build())
5533    *           .build();
5534    *   ApiFuture<Policy> future = jobServiceClient.setIamPolicyCallable().futureCall(request);
5535    *   // Do something.
5536    *   Policy response = future.get();
5537    * }
5538    * }</pre>
5539    */
setIamPolicyCallable()5540   public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
5541     return stub.setIamPolicyCallable();
5542   }
5543 
5544   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5545   /**
5546    * Gets the access control policy for a resource. Returns an empty policyif the resource exists
5547    * and does not have a policy set.
5548    *
5549    * <p>Sample code:
5550    *
5551    * <pre>{@code
5552    * // This snippet has been automatically generated and should be regarded as a code template only.
5553    * // It will require modifications to work:
5554    * // - It may require correct/in-range values for request initialization.
5555    * // - It may require specifying regional endpoints when creating the service client as shown in
5556    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5557    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5558    *   GetIamPolicyRequest request =
5559    *       GetIamPolicyRequest.newBuilder()
5560    *           .setResource(
5561    *               EndpointName.ofProjectLocationEndpointName(
5562    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5563    *                   .toString())
5564    *           .setOptions(GetPolicyOptions.newBuilder().build())
5565    *           .build();
5566    *   Policy response = jobServiceClient.getIamPolicy(request);
5567    * }
5568    * }</pre>
5569    *
5570    * @param request The request object containing all of the parameters for the API call.
5571    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5572    */
getIamPolicy(GetIamPolicyRequest request)5573   public final Policy getIamPolicy(GetIamPolicyRequest request) {
5574     return getIamPolicyCallable().call(request);
5575   }
5576 
5577   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5578   /**
5579    * Gets the access control policy for a resource. Returns an empty policyif the resource exists
5580    * and does not have a policy set.
5581    *
5582    * <p>Sample code:
5583    *
5584    * <pre>{@code
5585    * // This snippet has been automatically generated and should be regarded as a code template only.
5586    * // It will require modifications to work:
5587    * // - It may require correct/in-range values for request initialization.
5588    * // - It may require specifying regional endpoints when creating the service client as shown in
5589    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5590    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5591    *   GetIamPolicyRequest request =
5592    *       GetIamPolicyRequest.newBuilder()
5593    *           .setResource(
5594    *               EndpointName.ofProjectLocationEndpointName(
5595    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5596    *                   .toString())
5597    *           .setOptions(GetPolicyOptions.newBuilder().build())
5598    *           .build();
5599    *   ApiFuture<Policy> future = jobServiceClient.getIamPolicyCallable().futureCall(request);
5600    *   // Do something.
5601    *   Policy response = future.get();
5602    * }
5603    * }</pre>
5604    */
getIamPolicyCallable()5605   public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
5606     return stub.getIamPolicyCallable();
5607   }
5608 
5609   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5610   /**
5611    * Returns permissions that a caller has on the specified resource. If theresource does not exist,
5612    * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
5613    *
5614    * <p>Note: This operation is designed to be used for buildingpermission-aware UIs and
5615    * command-line tools, not for authorizationchecking. This operation may "fail open" without
5616    * warning.
5617    *
5618    * <p>Sample code:
5619    *
5620    * <pre>{@code
5621    * // This snippet has been automatically generated and should be regarded as a code template only.
5622    * // It will require modifications to work:
5623    * // - It may require correct/in-range values for request initialization.
5624    * // - It may require specifying regional endpoints when creating the service client as shown in
5625    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5626    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5627    *   TestIamPermissionsRequest request =
5628    *       TestIamPermissionsRequest.newBuilder()
5629    *           .setResource(
5630    *               EndpointName.ofProjectLocationEndpointName(
5631    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5632    *                   .toString())
5633    *           .addAllPermissions(new ArrayList<String>())
5634    *           .build();
5635    *   TestIamPermissionsResponse response = jobServiceClient.testIamPermissions(request);
5636    * }
5637    * }</pre>
5638    *
5639    * @param request The request object containing all of the parameters for the API call.
5640    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5641    */
testIamPermissions(TestIamPermissionsRequest request)5642   public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
5643     return testIamPermissionsCallable().call(request);
5644   }
5645 
5646   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5647   /**
5648    * Returns permissions that a caller has on the specified resource. If theresource does not exist,
5649    * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
5650    *
5651    * <p>Note: This operation is designed to be used for buildingpermission-aware UIs and
5652    * command-line tools, not for authorizationchecking. This operation may "fail open" without
5653    * warning.
5654    *
5655    * <p>Sample code:
5656    *
5657    * <pre>{@code
5658    * // This snippet has been automatically generated and should be regarded as a code template only.
5659    * // It will require modifications to work:
5660    * // - It may require correct/in-range values for request initialization.
5661    * // - It may require specifying regional endpoints when creating the service client as shown in
5662    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5663    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
5664    *   TestIamPermissionsRequest request =
5665    *       TestIamPermissionsRequest.newBuilder()
5666    *           .setResource(
5667    *               EndpointName.ofProjectLocationEndpointName(
5668    *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
5669    *                   .toString())
5670    *           .addAllPermissions(new ArrayList<String>())
5671    *           .build();
5672    *   ApiFuture<TestIamPermissionsResponse> future =
5673    *       jobServiceClient.testIamPermissionsCallable().futureCall(request);
5674    *   // Do something.
5675    *   TestIamPermissionsResponse response = future.get();
5676    * }
5677    * }</pre>
5678    */
5679   public final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsCallable()5680       testIamPermissionsCallable() {
5681     return stub.testIamPermissionsCallable();
5682   }
5683 
5684   @Override
close()5685   public final void close() {
5686     stub.close();
5687   }
5688 
5689   @Override
shutdown()5690   public void shutdown() {
5691     stub.shutdown();
5692   }
5693 
5694   @Override
isShutdown()5695   public boolean isShutdown() {
5696     return stub.isShutdown();
5697   }
5698 
5699   @Override
isTerminated()5700   public boolean isTerminated() {
5701     return stub.isTerminated();
5702   }
5703 
5704   @Override
shutdownNow()5705   public void shutdownNow() {
5706     stub.shutdownNow();
5707   }
5708 
5709   @Override
awaitTermination(long duration, TimeUnit unit)5710   public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
5711     return stub.awaitTermination(duration, unit);
5712   }
5713 
5714   public static class ListCustomJobsPagedResponse
5715       extends AbstractPagedListResponse<
5716           ListCustomJobsRequest,
5717           ListCustomJobsResponse,
5718           CustomJob,
5719           ListCustomJobsPage,
5720           ListCustomJobsFixedSizeCollection> {
5721 
createAsync( PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context, ApiFuture<ListCustomJobsResponse> futureResponse)5722     public static ApiFuture<ListCustomJobsPagedResponse> createAsync(
5723         PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context,
5724         ApiFuture<ListCustomJobsResponse> futureResponse) {
5725       ApiFuture<ListCustomJobsPage> futurePage =
5726           ListCustomJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
5727       return ApiFutures.transform(
5728           futurePage,
5729           input -> new ListCustomJobsPagedResponse(input),
5730           MoreExecutors.directExecutor());
5731     }
5732 
ListCustomJobsPagedResponse(ListCustomJobsPage page)5733     private ListCustomJobsPagedResponse(ListCustomJobsPage page) {
5734       super(page, ListCustomJobsFixedSizeCollection.createEmptyCollection());
5735     }
5736   }
5737 
5738   public static class ListCustomJobsPage
5739       extends AbstractPage<
5740           ListCustomJobsRequest, ListCustomJobsResponse, CustomJob, ListCustomJobsPage> {
5741 
ListCustomJobsPage( PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context, ListCustomJobsResponse response)5742     private ListCustomJobsPage(
5743         PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context,
5744         ListCustomJobsResponse response) {
5745       super(context, response);
5746     }
5747 
createEmptyPage()5748     private static ListCustomJobsPage createEmptyPage() {
5749       return new ListCustomJobsPage(null, null);
5750     }
5751 
5752     @Override
createPage( PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context, ListCustomJobsResponse response)5753     protected ListCustomJobsPage createPage(
5754         PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context,
5755         ListCustomJobsResponse response) {
5756       return new ListCustomJobsPage(context, response);
5757     }
5758 
5759     @Override
createPageAsync( PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context, ApiFuture<ListCustomJobsResponse> futureResponse)5760     public ApiFuture<ListCustomJobsPage> createPageAsync(
5761         PageContext<ListCustomJobsRequest, ListCustomJobsResponse, CustomJob> context,
5762         ApiFuture<ListCustomJobsResponse> futureResponse) {
5763       return super.createPageAsync(context, futureResponse);
5764     }
5765   }
5766 
5767   public static class ListCustomJobsFixedSizeCollection
5768       extends AbstractFixedSizeCollection<
5769           ListCustomJobsRequest,
5770           ListCustomJobsResponse,
5771           CustomJob,
5772           ListCustomJobsPage,
5773           ListCustomJobsFixedSizeCollection> {
5774 
ListCustomJobsFixedSizeCollection(List<ListCustomJobsPage> pages, int collectionSize)5775     private ListCustomJobsFixedSizeCollection(List<ListCustomJobsPage> pages, int collectionSize) {
5776       super(pages, collectionSize);
5777     }
5778 
createEmptyCollection()5779     private static ListCustomJobsFixedSizeCollection createEmptyCollection() {
5780       return new ListCustomJobsFixedSizeCollection(null, 0);
5781     }
5782 
5783     @Override
createCollection( List<ListCustomJobsPage> pages, int collectionSize)5784     protected ListCustomJobsFixedSizeCollection createCollection(
5785         List<ListCustomJobsPage> pages, int collectionSize) {
5786       return new ListCustomJobsFixedSizeCollection(pages, collectionSize);
5787     }
5788   }
5789 
5790   public static class ListDataLabelingJobsPagedResponse
5791       extends AbstractPagedListResponse<
5792           ListDataLabelingJobsRequest,
5793           ListDataLabelingJobsResponse,
5794           DataLabelingJob,
5795           ListDataLabelingJobsPage,
5796           ListDataLabelingJobsFixedSizeCollection> {
5797 
createAsync( PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> context, ApiFuture<ListDataLabelingJobsResponse> futureResponse)5798     public static ApiFuture<ListDataLabelingJobsPagedResponse> createAsync(
5799         PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob>
5800             context,
5801         ApiFuture<ListDataLabelingJobsResponse> futureResponse) {
5802       ApiFuture<ListDataLabelingJobsPage> futurePage =
5803           ListDataLabelingJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
5804       return ApiFutures.transform(
5805           futurePage,
5806           input -> new ListDataLabelingJobsPagedResponse(input),
5807           MoreExecutors.directExecutor());
5808     }
5809 
ListDataLabelingJobsPagedResponse(ListDataLabelingJobsPage page)5810     private ListDataLabelingJobsPagedResponse(ListDataLabelingJobsPage page) {
5811       super(page, ListDataLabelingJobsFixedSizeCollection.createEmptyCollection());
5812     }
5813   }
5814 
5815   public static class ListDataLabelingJobsPage
5816       extends AbstractPage<
5817           ListDataLabelingJobsRequest,
5818           ListDataLabelingJobsResponse,
5819           DataLabelingJob,
5820           ListDataLabelingJobsPage> {
5821 
ListDataLabelingJobsPage( PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> context, ListDataLabelingJobsResponse response)5822     private ListDataLabelingJobsPage(
5823         PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob>
5824             context,
5825         ListDataLabelingJobsResponse response) {
5826       super(context, response);
5827     }
5828 
createEmptyPage()5829     private static ListDataLabelingJobsPage createEmptyPage() {
5830       return new ListDataLabelingJobsPage(null, null);
5831     }
5832 
5833     @Override
createPage( PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> context, ListDataLabelingJobsResponse response)5834     protected ListDataLabelingJobsPage createPage(
5835         PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob>
5836             context,
5837         ListDataLabelingJobsResponse response) {
5838       return new ListDataLabelingJobsPage(context, response);
5839     }
5840 
5841     @Override
createPageAsync( PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> context, ApiFuture<ListDataLabelingJobsResponse> futureResponse)5842     public ApiFuture<ListDataLabelingJobsPage> createPageAsync(
5843         PageContext<ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob>
5844             context,
5845         ApiFuture<ListDataLabelingJobsResponse> futureResponse) {
5846       return super.createPageAsync(context, futureResponse);
5847     }
5848   }
5849 
5850   public static class ListDataLabelingJobsFixedSizeCollection
5851       extends AbstractFixedSizeCollection<
5852           ListDataLabelingJobsRequest,
5853           ListDataLabelingJobsResponse,
5854           DataLabelingJob,
5855           ListDataLabelingJobsPage,
5856           ListDataLabelingJobsFixedSizeCollection> {
5857 
ListDataLabelingJobsFixedSizeCollection( List<ListDataLabelingJobsPage> pages, int collectionSize)5858     private ListDataLabelingJobsFixedSizeCollection(
5859         List<ListDataLabelingJobsPage> pages, int collectionSize) {
5860       super(pages, collectionSize);
5861     }
5862 
createEmptyCollection()5863     private static ListDataLabelingJobsFixedSizeCollection createEmptyCollection() {
5864       return new ListDataLabelingJobsFixedSizeCollection(null, 0);
5865     }
5866 
5867     @Override
createCollection( List<ListDataLabelingJobsPage> pages, int collectionSize)5868     protected ListDataLabelingJobsFixedSizeCollection createCollection(
5869         List<ListDataLabelingJobsPage> pages, int collectionSize) {
5870       return new ListDataLabelingJobsFixedSizeCollection(pages, collectionSize);
5871     }
5872   }
5873 
5874   public static class ListHyperparameterTuningJobsPagedResponse
5875       extends AbstractPagedListResponse<
5876           ListHyperparameterTuningJobsRequest,
5877           ListHyperparameterTuningJobsResponse,
5878           HyperparameterTuningJob,
5879           ListHyperparameterTuningJobsPage,
5880           ListHyperparameterTuningJobsFixedSizeCollection> {
5881 
createAsync( PageContext< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse, HyperparameterTuningJob> context, ApiFuture<ListHyperparameterTuningJobsResponse> futureResponse)5882     public static ApiFuture<ListHyperparameterTuningJobsPagedResponse> createAsync(
5883         PageContext<
5884                 ListHyperparameterTuningJobsRequest,
5885                 ListHyperparameterTuningJobsResponse,
5886                 HyperparameterTuningJob>
5887             context,
5888         ApiFuture<ListHyperparameterTuningJobsResponse> futureResponse) {
5889       ApiFuture<ListHyperparameterTuningJobsPage> futurePage =
5890           ListHyperparameterTuningJobsPage.createEmptyPage()
5891               .createPageAsync(context, futureResponse);
5892       return ApiFutures.transform(
5893           futurePage,
5894           input -> new ListHyperparameterTuningJobsPagedResponse(input),
5895           MoreExecutors.directExecutor());
5896     }
5897 
ListHyperparameterTuningJobsPagedResponse(ListHyperparameterTuningJobsPage page)5898     private ListHyperparameterTuningJobsPagedResponse(ListHyperparameterTuningJobsPage page) {
5899       super(page, ListHyperparameterTuningJobsFixedSizeCollection.createEmptyCollection());
5900     }
5901   }
5902 
5903   public static class ListHyperparameterTuningJobsPage
5904       extends AbstractPage<
5905           ListHyperparameterTuningJobsRequest,
5906           ListHyperparameterTuningJobsResponse,
5907           HyperparameterTuningJob,
5908           ListHyperparameterTuningJobsPage> {
5909 
ListHyperparameterTuningJobsPage( PageContext< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse, HyperparameterTuningJob> context, ListHyperparameterTuningJobsResponse response)5910     private ListHyperparameterTuningJobsPage(
5911         PageContext<
5912                 ListHyperparameterTuningJobsRequest,
5913                 ListHyperparameterTuningJobsResponse,
5914                 HyperparameterTuningJob>
5915             context,
5916         ListHyperparameterTuningJobsResponse response) {
5917       super(context, response);
5918     }
5919 
createEmptyPage()5920     private static ListHyperparameterTuningJobsPage createEmptyPage() {
5921       return new ListHyperparameterTuningJobsPage(null, null);
5922     }
5923 
5924     @Override
createPage( PageContext< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse, HyperparameterTuningJob> context, ListHyperparameterTuningJobsResponse response)5925     protected ListHyperparameterTuningJobsPage createPage(
5926         PageContext<
5927                 ListHyperparameterTuningJobsRequest,
5928                 ListHyperparameterTuningJobsResponse,
5929                 HyperparameterTuningJob>
5930             context,
5931         ListHyperparameterTuningJobsResponse response) {
5932       return new ListHyperparameterTuningJobsPage(context, response);
5933     }
5934 
5935     @Override
createPageAsync( PageContext< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse, HyperparameterTuningJob> context, ApiFuture<ListHyperparameterTuningJobsResponse> futureResponse)5936     public ApiFuture<ListHyperparameterTuningJobsPage> createPageAsync(
5937         PageContext<
5938                 ListHyperparameterTuningJobsRequest,
5939                 ListHyperparameterTuningJobsResponse,
5940                 HyperparameterTuningJob>
5941             context,
5942         ApiFuture<ListHyperparameterTuningJobsResponse> futureResponse) {
5943       return super.createPageAsync(context, futureResponse);
5944     }
5945   }
5946 
5947   public static class ListHyperparameterTuningJobsFixedSizeCollection
5948       extends AbstractFixedSizeCollection<
5949           ListHyperparameterTuningJobsRequest,
5950           ListHyperparameterTuningJobsResponse,
5951           HyperparameterTuningJob,
5952           ListHyperparameterTuningJobsPage,
5953           ListHyperparameterTuningJobsFixedSizeCollection> {
5954 
ListHyperparameterTuningJobsFixedSizeCollection( List<ListHyperparameterTuningJobsPage> pages, int collectionSize)5955     private ListHyperparameterTuningJobsFixedSizeCollection(
5956         List<ListHyperparameterTuningJobsPage> pages, int collectionSize) {
5957       super(pages, collectionSize);
5958     }
5959 
createEmptyCollection()5960     private static ListHyperparameterTuningJobsFixedSizeCollection createEmptyCollection() {
5961       return new ListHyperparameterTuningJobsFixedSizeCollection(null, 0);
5962     }
5963 
5964     @Override
createCollection( List<ListHyperparameterTuningJobsPage> pages, int collectionSize)5965     protected ListHyperparameterTuningJobsFixedSizeCollection createCollection(
5966         List<ListHyperparameterTuningJobsPage> pages, int collectionSize) {
5967       return new ListHyperparameterTuningJobsFixedSizeCollection(pages, collectionSize);
5968     }
5969   }
5970 
5971   public static class ListNasJobsPagedResponse
5972       extends AbstractPagedListResponse<
5973           ListNasJobsRequest,
5974           ListNasJobsResponse,
5975           NasJob,
5976           ListNasJobsPage,
5977           ListNasJobsFixedSizeCollection> {
5978 
createAsync( PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context, ApiFuture<ListNasJobsResponse> futureResponse)5979     public static ApiFuture<ListNasJobsPagedResponse> createAsync(
5980         PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context,
5981         ApiFuture<ListNasJobsResponse> futureResponse) {
5982       ApiFuture<ListNasJobsPage> futurePage =
5983           ListNasJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
5984       return ApiFutures.transform(
5985           futurePage, input -> new ListNasJobsPagedResponse(input), MoreExecutors.directExecutor());
5986     }
5987 
ListNasJobsPagedResponse(ListNasJobsPage page)5988     private ListNasJobsPagedResponse(ListNasJobsPage page) {
5989       super(page, ListNasJobsFixedSizeCollection.createEmptyCollection());
5990     }
5991   }
5992 
5993   public static class ListNasJobsPage
5994       extends AbstractPage<ListNasJobsRequest, ListNasJobsResponse, NasJob, ListNasJobsPage> {
5995 
ListNasJobsPage( PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context, ListNasJobsResponse response)5996     private ListNasJobsPage(
5997         PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context,
5998         ListNasJobsResponse response) {
5999       super(context, response);
6000     }
6001 
createEmptyPage()6002     private static ListNasJobsPage createEmptyPage() {
6003       return new ListNasJobsPage(null, null);
6004     }
6005 
6006     @Override
createPage( PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context, ListNasJobsResponse response)6007     protected ListNasJobsPage createPage(
6008         PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context,
6009         ListNasJobsResponse response) {
6010       return new ListNasJobsPage(context, response);
6011     }
6012 
6013     @Override
createPageAsync( PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context, ApiFuture<ListNasJobsResponse> futureResponse)6014     public ApiFuture<ListNasJobsPage> createPageAsync(
6015         PageContext<ListNasJobsRequest, ListNasJobsResponse, NasJob> context,
6016         ApiFuture<ListNasJobsResponse> futureResponse) {
6017       return super.createPageAsync(context, futureResponse);
6018     }
6019   }
6020 
6021   public static class ListNasJobsFixedSizeCollection
6022       extends AbstractFixedSizeCollection<
6023           ListNasJobsRequest,
6024           ListNasJobsResponse,
6025           NasJob,
6026           ListNasJobsPage,
6027           ListNasJobsFixedSizeCollection> {
6028 
ListNasJobsFixedSizeCollection(List<ListNasJobsPage> pages, int collectionSize)6029     private ListNasJobsFixedSizeCollection(List<ListNasJobsPage> pages, int collectionSize) {
6030       super(pages, collectionSize);
6031     }
6032 
createEmptyCollection()6033     private static ListNasJobsFixedSizeCollection createEmptyCollection() {
6034       return new ListNasJobsFixedSizeCollection(null, 0);
6035     }
6036 
6037     @Override
createCollection( List<ListNasJobsPage> pages, int collectionSize)6038     protected ListNasJobsFixedSizeCollection createCollection(
6039         List<ListNasJobsPage> pages, int collectionSize) {
6040       return new ListNasJobsFixedSizeCollection(pages, collectionSize);
6041     }
6042   }
6043 
6044   public static class ListNasTrialDetailsPagedResponse
6045       extends AbstractPagedListResponse<
6046           ListNasTrialDetailsRequest,
6047           ListNasTrialDetailsResponse,
6048           NasTrialDetail,
6049           ListNasTrialDetailsPage,
6050           ListNasTrialDetailsFixedSizeCollection> {
6051 
createAsync( PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> context, ApiFuture<ListNasTrialDetailsResponse> futureResponse)6052     public static ApiFuture<ListNasTrialDetailsPagedResponse> createAsync(
6053         PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>
6054             context,
6055         ApiFuture<ListNasTrialDetailsResponse> futureResponse) {
6056       ApiFuture<ListNasTrialDetailsPage> futurePage =
6057           ListNasTrialDetailsPage.createEmptyPage().createPageAsync(context, futureResponse);
6058       return ApiFutures.transform(
6059           futurePage,
6060           input -> new ListNasTrialDetailsPagedResponse(input),
6061           MoreExecutors.directExecutor());
6062     }
6063 
ListNasTrialDetailsPagedResponse(ListNasTrialDetailsPage page)6064     private ListNasTrialDetailsPagedResponse(ListNasTrialDetailsPage page) {
6065       super(page, ListNasTrialDetailsFixedSizeCollection.createEmptyCollection());
6066     }
6067   }
6068 
6069   public static class ListNasTrialDetailsPage
6070       extends AbstractPage<
6071           ListNasTrialDetailsRequest,
6072           ListNasTrialDetailsResponse,
6073           NasTrialDetail,
6074           ListNasTrialDetailsPage> {
6075 
ListNasTrialDetailsPage( PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> context, ListNasTrialDetailsResponse response)6076     private ListNasTrialDetailsPage(
6077         PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>
6078             context,
6079         ListNasTrialDetailsResponse response) {
6080       super(context, response);
6081     }
6082 
createEmptyPage()6083     private static ListNasTrialDetailsPage createEmptyPage() {
6084       return new ListNasTrialDetailsPage(null, null);
6085     }
6086 
6087     @Override
createPage( PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> context, ListNasTrialDetailsResponse response)6088     protected ListNasTrialDetailsPage createPage(
6089         PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>
6090             context,
6091         ListNasTrialDetailsResponse response) {
6092       return new ListNasTrialDetailsPage(context, response);
6093     }
6094 
6095     @Override
createPageAsync( PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> context, ApiFuture<ListNasTrialDetailsResponse> futureResponse)6096     public ApiFuture<ListNasTrialDetailsPage> createPageAsync(
6097         PageContext<ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>
6098             context,
6099         ApiFuture<ListNasTrialDetailsResponse> futureResponse) {
6100       return super.createPageAsync(context, futureResponse);
6101     }
6102   }
6103 
6104   public static class ListNasTrialDetailsFixedSizeCollection
6105       extends AbstractFixedSizeCollection<
6106           ListNasTrialDetailsRequest,
6107           ListNasTrialDetailsResponse,
6108           NasTrialDetail,
6109           ListNasTrialDetailsPage,
6110           ListNasTrialDetailsFixedSizeCollection> {
6111 
ListNasTrialDetailsFixedSizeCollection( List<ListNasTrialDetailsPage> pages, int collectionSize)6112     private ListNasTrialDetailsFixedSizeCollection(
6113         List<ListNasTrialDetailsPage> pages, int collectionSize) {
6114       super(pages, collectionSize);
6115     }
6116 
createEmptyCollection()6117     private static ListNasTrialDetailsFixedSizeCollection createEmptyCollection() {
6118       return new ListNasTrialDetailsFixedSizeCollection(null, 0);
6119     }
6120 
6121     @Override
createCollection( List<ListNasTrialDetailsPage> pages, int collectionSize)6122     protected ListNasTrialDetailsFixedSizeCollection createCollection(
6123         List<ListNasTrialDetailsPage> pages, int collectionSize) {
6124       return new ListNasTrialDetailsFixedSizeCollection(pages, collectionSize);
6125     }
6126   }
6127 
6128   public static class ListBatchPredictionJobsPagedResponse
6129       extends AbstractPagedListResponse<
6130           ListBatchPredictionJobsRequest,
6131           ListBatchPredictionJobsResponse,
6132           BatchPredictionJob,
6133           ListBatchPredictionJobsPage,
6134           ListBatchPredictionJobsFixedSizeCollection> {
6135 
createAsync( PageContext< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> context, ApiFuture<ListBatchPredictionJobsResponse> futureResponse)6136     public static ApiFuture<ListBatchPredictionJobsPagedResponse> createAsync(
6137         PageContext<
6138                 ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob>
6139             context,
6140         ApiFuture<ListBatchPredictionJobsResponse> futureResponse) {
6141       ApiFuture<ListBatchPredictionJobsPage> futurePage =
6142           ListBatchPredictionJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
6143       return ApiFutures.transform(
6144           futurePage,
6145           input -> new ListBatchPredictionJobsPagedResponse(input),
6146           MoreExecutors.directExecutor());
6147     }
6148 
ListBatchPredictionJobsPagedResponse(ListBatchPredictionJobsPage page)6149     private ListBatchPredictionJobsPagedResponse(ListBatchPredictionJobsPage page) {
6150       super(page, ListBatchPredictionJobsFixedSizeCollection.createEmptyCollection());
6151     }
6152   }
6153 
6154   public static class ListBatchPredictionJobsPage
6155       extends AbstractPage<
6156           ListBatchPredictionJobsRequest,
6157           ListBatchPredictionJobsResponse,
6158           BatchPredictionJob,
6159           ListBatchPredictionJobsPage> {
6160 
ListBatchPredictionJobsPage( PageContext< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> context, ListBatchPredictionJobsResponse response)6161     private ListBatchPredictionJobsPage(
6162         PageContext<
6163                 ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob>
6164             context,
6165         ListBatchPredictionJobsResponse response) {
6166       super(context, response);
6167     }
6168 
createEmptyPage()6169     private static ListBatchPredictionJobsPage createEmptyPage() {
6170       return new ListBatchPredictionJobsPage(null, null);
6171     }
6172 
6173     @Override
createPage( PageContext< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> context, ListBatchPredictionJobsResponse response)6174     protected ListBatchPredictionJobsPage createPage(
6175         PageContext<
6176                 ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob>
6177             context,
6178         ListBatchPredictionJobsResponse response) {
6179       return new ListBatchPredictionJobsPage(context, response);
6180     }
6181 
6182     @Override
createPageAsync( PageContext< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> context, ApiFuture<ListBatchPredictionJobsResponse> futureResponse)6183     public ApiFuture<ListBatchPredictionJobsPage> createPageAsync(
6184         PageContext<
6185                 ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob>
6186             context,
6187         ApiFuture<ListBatchPredictionJobsResponse> futureResponse) {
6188       return super.createPageAsync(context, futureResponse);
6189     }
6190   }
6191 
6192   public static class ListBatchPredictionJobsFixedSizeCollection
6193       extends AbstractFixedSizeCollection<
6194           ListBatchPredictionJobsRequest,
6195           ListBatchPredictionJobsResponse,
6196           BatchPredictionJob,
6197           ListBatchPredictionJobsPage,
6198           ListBatchPredictionJobsFixedSizeCollection> {
6199 
ListBatchPredictionJobsFixedSizeCollection( List<ListBatchPredictionJobsPage> pages, int collectionSize)6200     private ListBatchPredictionJobsFixedSizeCollection(
6201         List<ListBatchPredictionJobsPage> pages, int collectionSize) {
6202       super(pages, collectionSize);
6203     }
6204 
createEmptyCollection()6205     private static ListBatchPredictionJobsFixedSizeCollection createEmptyCollection() {
6206       return new ListBatchPredictionJobsFixedSizeCollection(null, 0);
6207     }
6208 
6209     @Override
createCollection( List<ListBatchPredictionJobsPage> pages, int collectionSize)6210     protected ListBatchPredictionJobsFixedSizeCollection createCollection(
6211         List<ListBatchPredictionJobsPage> pages, int collectionSize) {
6212       return new ListBatchPredictionJobsFixedSizeCollection(pages, collectionSize);
6213     }
6214   }
6215 
6216   public static class SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
6217       extends AbstractPagedListResponse<
6218           SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6219           SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6220           ModelMonitoringStatsAnomalies,
6221           SearchModelDeploymentMonitoringStatsAnomaliesPage,
6222           SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection> {
6223 
createAsync( PageContext< SearchModelDeploymentMonitoringStatsAnomaliesRequest, SearchModelDeploymentMonitoringStatsAnomaliesResponse, ModelMonitoringStatsAnomalies> context, ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesResponse> futureResponse)6224     public static ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse> createAsync(
6225         PageContext<
6226                 SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6227                 SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6228                 ModelMonitoringStatsAnomalies>
6229             context,
6230         ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesResponse> futureResponse) {
6231       ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesPage> futurePage =
6232           SearchModelDeploymentMonitoringStatsAnomaliesPage.createEmptyPage()
6233               .createPageAsync(context, futureResponse);
6234       return ApiFutures.transform(
6235           futurePage,
6236           input -> new SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse(input),
6237           MoreExecutors.directExecutor());
6238     }
6239 
SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse( SearchModelDeploymentMonitoringStatsAnomaliesPage page)6240     private SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse(
6241         SearchModelDeploymentMonitoringStatsAnomaliesPage page) {
6242       super(
6243           page,
6244           SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection.createEmptyCollection());
6245     }
6246   }
6247 
6248   public static class SearchModelDeploymentMonitoringStatsAnomaliesPage
6249       extends AbstractPage<
6250           SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6251           SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6252           ModelMonitoringStatsAnomalies,
6253           SearchModelDeploymentMonitoringStatsAnomaliesPage> {
6254 
SearchModelDeploymentMonitoringStatsAnomaliesPage( PageContext< SearchModelDeploymentMonitoringStatsAnomaliesRequest, SearchModelDeploymentMonitoringStatsAnomaliesResponse, ModelMonitoringStatsAnomalies> context, SearchModelDeploymentMonitoringStatsAnomaliesResponse response)6255     private SearchModelDeploymentMonitoringStatsAnomaliesPage(
6256         PageContext<
6257                 SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6258                 SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6259                 ModelMonitoringStatsAnomalies>
6260             context,
6261         SearchModelDeploymentMonitoringStatsAnomaliesResponse response) {
6262       super(context, response);
6263     }
6264 
createEmptyPage()6265     private static SearchModelDeploymentMonitoringStatsAnomaliesPage createEmptyPage() {
6266       return new SearchModelDeploymentMonitoringStatsAnomaliesPage(null, null);
6267     }
6268 
6269     @Override
createPage( PageContext< SearchModelDeploymentMonitoringStatsAnomaliesRequest, SearchModelDeploymentMonitoringStatsAnomaliesResponse, ModelMonitoringStatsAnomalies> context, SearchModelDeploymentMonitoringStatsAnomaliesResponse response)6270     protected SearchModelDeploymentMonitoringStatsAnomaliesPage createPage(
6271         PageContext<
6272                 SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6273                 SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6274                 ModelMonitoringStatsAnomalies>
6275             context,
6276         SearchModelDeploymentMonitoringStatsAnomaliesResponse response) {
6277       return new SearchModelDeploymentMonitoringStatsAnomaliesPage(context, response);
6278     }
6279 
6280     @Override
createPageAsync( PageContext< SearchModelDeploymentMonitoringStatsAnomaliesRequest, SearchModelDeploymentMonitoringStatsAnomaliesResponse, ModelMonitoringStatsAnomalies> context, ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesResponse> futureResponse)6281     public ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesPage> createPageAsync(
6282         PageContext<
6283                 SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6284                 SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6285                 ModelMonitoringStatsAnomalies>
6286             context,
6287         ApiFuture<SearchModelDeploymentMonitoringStatsAnomaliesResponse> futureResponse) {
6288       return super.createPageAsync(context, futureResponse);
6289     }
6290   }
6291 
6292   public static class SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection
6293       extends AbstractFixedSizeCollection<
6294           SearchModelDeploymentMonitoringStatsAnomaliesRequest,
6295           SearchModelDeploymentMonitoringStatsAnomaliesResponse,
6296           ModelMonitoringStatsAnomalies,
6297           SearchModelDeploymentMonitoringStatsAnomaliesPage,
6298           SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection> {
6299 
SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection( List<SearchModelDeploymentMonitoringStatsAnomaliesPage> pages, int collectionSize)6300     private SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(
6301         List<SearchModelDeploymentMonitoringStatsAnomaliesPage> pages, int collectionSize) {
6302       super(pages, collectionSize);
6303     }
6304 
6305     private static SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection
createEmptyCollection()6306         createEmptyCollection() {
6307       return new SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(null, 0);
6308     }
6309 
6310     @Override
createCollection( List<SearchModelDeploymentMonitoringStatsAnomaliesPage> pages, int collectionSize)6311     protected SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection createCollection(
6312         List<SearchModelDeploymentMonitoringStatsAnomaliesPage> pages, int collectionSize) {
6313       return new SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(
6314           pages, collectionSize);
6315     }
6316   }
6317 
6318   public static class ListModelDeploymentMonitoringJobsPagedResponse
6319       extends AbstractPagedListResponse<
6320           ListModelDeploymentMonitoringJobsRequest,
6321           ListModelDeploymentMonitoringJobsResponse,
6322           ModelDeploymentMonitoringJob,
6323           ListModelDeploymentMonitoringJobsPage,
6324           ListModelDeploymentMonitoringJobsFixedSizeCollection> {
6325 
createAsync( PageContext< ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse, ModelDeploymentMonitoringJob> context, ApiFuture<ListModelDeploymentMonitoringJobsResponse> futureResponse)6326     public static ApiFuture<ListModelDeploymentMonitoringJobsPagedResponse> createAsync(
6327         PageContext<
6328                 ListModelDeploymentMonitoringJobsRequest,
6329                 ListModelDeploymentMonitoringJobsResponse,
6330                 ModelDeploymentMonitoringJob>
6331             context,
6332         ApiFuture<ListModelDeploymentMonitoringJobsResponse> futureResponse) {
6333       ApiFuture<ListModelDeploymentMonitoringJobsPage> futurePage =
6334           ListModelDeploymentMonitoringJobsPage.createEmptyPage()
6335               .createPageAsync(context, futureResponse);
6336       return ApiFutures.transform(
6337           futurePage,
6338           input -> new ListModelDeploymentMonitoringJobsPagedResponse(input),
6339           MoreExecutors.directExecutor());
6340     }
6341 
ListModelDeploymentMonitoringJobsPagedResponse( ListModelDeploymentMonitoringJobsPage page)6342     private ListModelDeploymentMonitoringJobsPagedResponse(
6343         ListModelDeploymentMonitoringJobsPage page) {
6344       super(page, ListModelDeploymentMonitoringJobsFixedSizeCollection.createEmptyCollection());
6345     }
6346   }
6347 
6348   public static class ListModelDeploymentMonitoringJobsPage
6349       extends AbstractPage<
6350           ListModelDeploymentMonitoringJobsRequest,
6351           ListModelDeploymentMonitoringJobsResponse,
6352           ModelDeploymentMonitoringJob,
6353           ListModelDeploymentMonitoringJobsPage> {
6354 
ListModelDeploymentMonitoringJobsPage( PageContext< ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse, ModelDeploymentMonitoringJob> context, ListModelDeploymentMonitoringJobsResponse response)6355     private ListModelDeploymentMonitoringJobsPage(
6356         PageContext<
6357                 ListModelDeploymentMonitoringJobsRequest,
6358                 ListModelDeploymentMonitoringJobsResponse,
6359                 ModelDeploymentMonitoringJob>
6360             context,
6361         ListModelDeploymentMonitoringJobsResponse response) {
6362       super(context, response);
6363     }
6364 
createEmptyPage()6365     private static ListModelDeploymentMonitoringJobsPage createEmptyPage() {
6366       return new ListModelDeploymentMonitoringJobsPage(null, null);
6367     }
6368 
6369     @Override
createPage( PageContext< ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse, ModelDeploymentMonitoringJob> context, ListModelDeploymentMonitoringJobsResponse response)6370     protected ListModelDeploymentMonitoringJobsPage createPage(
6371         PageContext<
6372                 ListModelDeploymentMonitoringJobsRequest,
6373                 ListModelDeploymentMonitoringJobsResponse,
6374                 ModelDeploymentMonitoringJob>
6375             context,
6376         ListModelDeploymentMonitoringJobsResponse response) {
6377       return new ListModelDeploymentMonitoringJobsPage(context, response);
6378     }
6379 
6380     @Override
createPageAsync( PageContext< ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse, ModelDeploymentMonitoringJob> context, ApiFuture<ListModelDeploymentMonitoringJobsResponse> futureResponse)6381     public ApiFuture<ListModelDeploymentMonitoringJobsPage> createPageAsync(
6382         PageContext<
6383                 ListModelDeploymentMonitoringJobsRequest,
6384                 ListModelDeploymentMonitoringJobsResponse,
6385                 ModelDeploymentMonitoringJob>
6386             context,
6387         ApiFuture<ListModelDeploymentMonitoringJobsResponse> futureResponse) {
6388       return super.createPageAsync(context, futureResponse);
6389     }
6390   }
6391 
6392   public static class ListModelDeploymentMonitoringJobsFixedSizeCollection
6393       extends AbstractFixedSizeCollection<
6394           ListModelDeploymentMonitoringJobsRequest,
6395           ListModelDeploymentMonitoringJobsResponse,
6396           ModelDeploymentMonitoringJob,
6397           ListModelDeploymentMonitoringJobsPage,
6398           ListModelDeploymentMonitoringJobsFixedSizeCollection> {
6399 
ListModelDeploymentMonitoringJobsFixedSizeCollection( List<ListModelDeploymentMonitoringJobsPage> pages, int collectionSize)6400     private ListModelDeploymentMonitoringJobsFixedSizeCollection(
6401         List<ListModelDeploymentMonitoringJobsPage> pages, int collectionSize) {
6402       super(pages, collectionSize);
6403     }
6404 
createEmptyCollection()6405     private static ListModelDeploymentMonitoringJobsFixedSizeCollection createEmptyCollection() {
6406       return new ListModelDeploymentMonitoringJobsFixedSizeCollection(null, 0);
6407     }
6408 
6409     @Override
createCollection( List<ListModelDeploymentMonitoringJobsPage> pages, int collectionSize)6410     protected ListModelDeploymentMonitoringJobsFixedSizeCollection createCollection(
6411         List<ListModelDeploymentMonitoringJobsPage> pages, int collectionSize) {
6412       return new ListModelDeploymentMonitoringJobsFixedSizeCollection(pages, collectionSize);
6413     }
6414   }
6415 
6416   public static class ListLocationsPagedResponse
6417       extends AbstractPagedListResponse<
6418           ListLocationsRequest,
6419           ListLocationsResponse,
6420           Location,
6421           ListLocationsPage,
6422           ListLocationsFixedSizeCollection> {
6423 
createAsync( PageContext<ListLocationsRequest, ListLocationsResponse, Location> context, ApiFuture<ListLocationsResponse> futureResponse)6424     public static ApiFuture<ListLocationsPagedResponse> createAsync(
6425         PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
6426         ApiFuture<ListLocationsResponse> futureResponse) {
6427       ApiFuture<ListLocationsPage> futurePage =
6428           ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
6429       return ApiFutures.transform(
6430           futurePage,
6431           input -> new ListLocationsPagedResponse(input),
6432           MoreExecutors.directExecutor());
6433     }
6434 
ListLocationsPagedResponse(ListLocationsPage page)6435     private ListLocationsPagedResponse(ListLocationsPage page) {
6436       super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
6437     }
6438   }
6439 
6440   public static class ListLocationsPage
6441       extends AbstractPage<
6442           ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
6443 
ListLocationsPage( PageContext<ListLocationsRequest, ListLocationsResponse, Location> context, ListLocationsResponse response)6444     private ListLocationsPage(
6445         PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
6446         ListLocationsResponse response) {
6447       super(context, response);
6448     }
6449 
createEmptyPage()6450     private static ListLocationsPage createEmptyPage() {
6451       return new ListLocationsPage(null, null);
6452     }
6453 
6454     @Override
createPage( PageContext<ListLocationsRequest, ListLocationsResponse, Location> context, ListLocationsResponse response)6455     protected ListLocationsPage createPage(
6456         PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
6457         ListLocationsResponse response) {
6458       return new ListLocationsPage(context, response);
6459     }
6460 
6461     @Override
createPageAsync( PageContext<ListLocationsRequest, ListLocationsResponse, Location> context, ApiFuture<ListLocationsResponse> futureResponse)6462     public ApiFuture<ListLocationsPage> createPageAsync(
6463         PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
6464         ApiFuture<ListLocationsResponse> futureResponse) {
6465       return super.createPageAsync(context, futureResponse);
6466     }
6467   }
6468 
6469   public static class ListLocationsFixedSizeCollection
6470       extends AbstractFixedSizeCollection<
6471           ListLocationsRequest,
6472           ListLocationsResponse,
6473           Location,
6474           ListLocationsPage,
6475           ListLocationsFixedSizeCollection> {
6476 
ListLocationsFixedSizeCollection(List<ListLocationsPage> pages, int collectionSize)6477     private ListLocationsFixedSizeCollection(List<ListLocationsPage> pages, int collectionSize) {
6478       super(pages, collectionSize);
6479     }
6480 
createEmptyCollection()6481     private static ListLocationsFixedSizeCollection createEmptyCollection() {
6482       return new ListLocationsFixedSizeCollection(null, 0);
6483     }
6484 
6485     @Override
createCollection( List<ListLocationsPage> pages, int collectionSize)6486     protected ListLocationsFixedSizeCollection createCollection(
6487         List<ListLocationsPage> pages, int collectionSize) {
6488       return new ListLocationsFixedSizeCollection(pages, collectionSize);
6489     }
6490   }
6491 }
6492