public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.ListJobsRequest other) { if (other == com.google.cloud.scheduler.v1beta1.ListJobsRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.scheduler.v1beta1.ListJobsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.scheduler.v1beta1.ListJobsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from * the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to * switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or * [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages. * </pre> * * <code>string page_token = 6;</code> */ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pageToken_ = value; onChanged(); return this; }
/** * * * <pre> * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from * the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to * switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or * [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages. * </pre> * * <code>string page_token = 6;</code> */ public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); } pageToken_ = value; onChanged(); return this; } /**
/** * 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); }
/** * * * <pre> * Required. * The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * </pre> * * <code>string parent = 1;</code> */ public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); parent_ = value; onChanged(); return this; }
/** * * * <pre> * Required. * The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * </pre> * * <code>string parent = 1;</code> */ public Builder setParent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } parent_ = value; onChanged(); return this; } /**
/** * * * <pre> * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from * the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to * switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or * [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages. * </pre> * * <code>string page_token = 6;</code> */ public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /**
/** * * * <pre> * Requested page size. * The maximum page size is 500. If unspecified, the page size will * be the maximum. Fewer jobs than requested might be returned, * even if more jobs exist; use next_page_token to determine if more * jobs exist. * </pre> * * <code>int32 page_size = 5;</code> */ public Builder setPageSize(int value) { pageSize_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. * The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
/** * * * <pre> * Requested page size. * The maximum page size is 500. If unspecified, the page size will * be the maximum. Fewer jobs than requested might be returned, * even if more jobs exist; use next_page_token to determine if more * jobs exist. * </pre> * * <code>int32 page_size = 5;</code> */ public Builder clearPageSize() { pageSize_ = 0; onChanged(); return this; }
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(com.google.cloud.scheduler.v1beta1.ListJobsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@Override public ListJobsRequest injectPageSize(ListJobsRequest payload, int pageSize) { return ListJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); }
@Override public ListJobsRequest injectToken(ListJobsRequest payload, String token) { return ListJobsRequest.newBuilder(payload).setPageToken(token).build(); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.cloud.scheduler.v1beta1.ListJobsRequest buildPartial() { com.google.cloud.scheduler.v1beta1.ListJobsRequest result = new com.google.cloud.scheduler.v1beta1.ListJobsRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; onBuilt(); return result; }