@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@Override public ListJobsRequest injectToken(ListJobsRequest payload, String token) { return ListJobsRequest.newBuilder(payload).setPageToken(token).build(); }
@Override public ListJobsRequest injectPageSize(ListJobsRequest payload, int pageSize) { return ListJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); }
/** * Lists jobs. * * <p>Sample code: * * <pre><code> * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * for (Job element : cloudSchedulerClient.listJobs(parent.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. * <p>The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListJobsPagedResponse listJobs(String parent) { ListJobsRequest request = ListJobsRequest.newBuilder().setParent(parent).build(); return listJobs(request); }
/** * Lists jobs. * * <p>Sample code: * * <pre><code> * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * for (Job element : cloudSchedulerClient.listJobs(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. * <p>The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListJobsPagedResponse listJobs(LocationName parent) { ListJobsRequest request = ListJobsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listJobs(request); }