diff --git a/java-scheduler/README.md b/java-scheduler/README.md index b1ebaccdac48..e01a9eb98273 100644 --- a/java-scheduler/README.md +++ b/java-scheduler/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-scheduler - 2.6.0 + 2.7.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-scheduler:2.6.0' +implementation 'com.google.cloud:google-cloud-scheduler:2.7.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "2.6.0" +libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "2.7.0" ``` ## Authentication diff --git a/java-scheduler/google-cloud-scheduler/pom.xml b/java-scheduler/google-cloud-scheduler/pom.xml index 9de09eada312..6b4c33a50125 100644 --- a/java-scheduler/google-cloud-scheduler/pom.xml +++ b/java-scheduler/google-cloud-scheduler/pom.xml @@ -121,5 +121,10 @@ testlib test + + com.google.api.grpc + grpc-google-common-protos + test + diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/package-info.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/package-info.java index fc07bfec0f50..1585faa3eee3 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/package-info.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Scheduler API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= CloudSchedulerClient ======================= * diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java index 57f7d8e1753d..984692611b20 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java @@ -25,6 +25,10 @@ import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStub; import com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -251,8 +255,10 @@ public final ListJobsPagedResponse listJobs(String parent) { * ListJobsRequest request = * ListJobsRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setLegacyAppEngineCron(true) * .build(); * for (Job element : cloudSchedulerClient.listJobs(request).iterateAll()) { * // doThingsWith(element); @@ -283,8 +289,10 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) { * ListJobsRequest request = * ListJobsRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setLegacyAppEngineCron(true) * .build(); * ApiFuture future = cloudSchedulerClient.listJobsPagedCallable().futureCall(request); * // Do something. @@ -314,8 +322,10 @@ public final UnaryCallable listJobsPaged * ListJobsRequest request = * ListJobsRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setFilter("filter-1274492040") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setLegacyAppEngineCron(true) * .build(); * while (true) { * ListJobsResponse response = cloudSchedulerClient.listJobsCallable().call(request); @@ -757,6 +767,7 @@ public final void deleteJob(String name) { * DeleteJobRequest request = * DeleteJobRequest.newBuilder() * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setLegacyAppEngineCron(true) * .build(); * cloudSchedulerClient.deleteJob(request); * } @@ -785,6 +796,7 @@ public final void deleteJob(DeleteJobRequest request) { * DeleteJobRequest request = * DeleteJobRequest.newBuilder() * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setLegacyAppEngineCron(true) * .build(); * ApiFuture future = cloudSchedulerClient.deleteJobCallable().futureCall(request); * // Do something. @@ -1144,6 +1156,7 @@ public final Job runJob(String name) { * RunJobRequest request = * RunJobRequest.newBuilder() * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setLegacyAppEngineCron(true) * .build(); * Job response = cloudSchedulerClient.runJob(request); * } @@ -1175,6 +1188,7 @@ public final Job runJob(RunJobRequest request) { * RunJobRequest request = * RunJobRequest.newBuilder() * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setLegacyAppEngineCron(true) * .build(); * ApiFuture future = cloudSchedulerClient.runJobCallable().futureCall(request); * // Do something. @@ -1186,6 +1200,161 @@ public final UnaryCallable runJobCallable() { return stub.runJobCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudSchedulerClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudSchedulerClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudSchedulerClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudSchedulerClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudSchedulerClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -1278,4 +1447,80 @@ protected ListJobsFixedSizeCollection createCollection( return new ListJobsFixedSizeCollection(pages, collectionSize); } } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerSettings.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerSettings.java index c4d4d6f7e4df..3e6e90a106ca 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerSettings.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerSettings.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -30,6 +31,10 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStubSettings; import com.google.protobuf.Empty; import java.io.IOException; @@ -116,6 +121,17 @@ public UnaryCallSettings runJobSettings() { return ((CloudSchedulerStubSettings) getStubSettings()).runJobSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudSchedulerStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudSchedulerStubSettings) getStubSettings()).getLocationSettings(); + } + public static final CloudSchedulerSettings create(CloudSchedulerStubSettings stub) throws IOException { return new CloudSchedulerSettings.Builder(stub.toBuilder()).build(); @@ -272,6 +288,18 @@ public UnaryCallSettings.Builder runJobSettings() { return getStubSettingsBuilder().runJobSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + @Override public CloudSchedulerSettings build() throws IOException { return new CloudSchedulerSettings(this); diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/gapic_metadata.json b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/gapic_metadata.json index 0d60ac6417b0..2b6e64a4a8e7 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/gapic_metadata.json +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/gapic_metadata.json @@ -19,9 +19,15 @@ "GetJob": { "methods": ["getJob", "getJob", "getJob", "getJobCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "ListJobs": { "methods": ["listJobs", "listJobs", "listJobs", "listJobsPagedCallable", "listJobsCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "PauseJob": { "methods": ["pauseJob", "pauseJob", "pauseJob", "pauseJobCallable"] }, diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/package-info.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/package-info.java index bda7bcbe2dad..2b9adcd02e15 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/package-info.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Scheduler API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= CloudSchedulerClient ======================= * diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStub.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStub.java index f0dd0a60601e..2054fa47a658 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStub.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStub.java @@ -17,10 +17,15 @@ package com.google.cloud.scheduler.v1beta1.stub; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.CreateJobRequest; import com.google.cloud.scheduler.v1beta1.DeleteJobRequest; import com.google.cloud.scheduler.v1beta1.GetJobRequest; @@ -80,6 +85,19 @@ public UnaryCallable runJobCallable() { throw new UnsupportedOperationException("Not implemented: runJobCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + @Override public abstract void close(); } diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java index b3ea28eba886..02a81d8c49a5 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1.stub; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -43,6 +44,10 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.CreateJobRequest; import com.google.cloud.scheduler.v1beta1.DeleteJobRequest; import com.google.cloud.scheduler.v1beta1.GetJobRequest; @@ -114,6 +119,10 @@ public class CloudSchedulerStubSettings extends StubSettings pauseJobSettings; private final UnaryCallSettings resumeJobSettings; private final UnaryCallSettings runJobSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_JOBS_PAGE_STR_DESC = @@ -151,6 +160,42 @@ public Iterable extractResources(ListJobsResponse payload) { } }; + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> LIST_JOBS_PAGE_STR_FACT = @@ -167,6 +212,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listJobs. */ public PagedCallSettings listJobsSettings() { @@ -208,6 +270,17 @@ public UnaryCallSettings runJobSettings() { return runJobSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + public CloudSchedulerStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -322,6 +395,8 @@ protected CloudSchedulerStubSettings(Builder settingsBuilder) throws IOException pauseJobSettings = settingsBuilder.pauseJobSettings().build(); resumeJobSettings = settingsBuilder.resumeJobSettings().build(); runJobSettings = settingsBuilder.runJobSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for CloudSchedulerStubSettings. */ @@ -337,6 +412,10 @@ public static class Builder extends StubSettings.Builder pauseJobSettings; private final UnaryCallSettings.Builder resumeJobSettings; private final UnaryCallSettings.Builder runJobSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -350,6 +429,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -377,6 +457,8 @@ public static class Builder extends StubSettings.Builder>of( @@ -405,7 +489,9 @@ protected Builder(ClientContext clientContext) { deleteJobSettings, pauseJobSettings, resumeJobSettings, - runJobSettings); + runJobSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -420,6 +506,8 @@ protected Builder(CloudSchedulerStubSettings settings) { pauseJobSettings = settings.pauseJobSettings.toBuilder(); resumeJobSettings = settings.resumeJobSettings.toBuilder(); runJobSettings = settings.runJobSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -430,7 +518,9 @@ protected Builder(CloudSchedulerStubSettings settings) { deleteJobSettings, pauseJobSettings, resumeJobSettings, - runJobSettings); + runJobSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -500,6 +590,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + return builder; } @@ -559,6 +659,18 @@ public UnaryCallSettings.Builder runJobSettings() { return runJobSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + @Override public CloudSchedulerStubSettings build() throws IOException { return new CloudSchedulerStubSettings(this); diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java index f4ee550ca845..423b86eb0815 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1.stub; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; @@ -25,6 +26,10 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.CreateJobRequest; import com.google.cloud.scheduler.v1beta1.DeleteJobRequest; import com.google.cloud.scheduler.v1beta1.GetJobRequest; @@ -118,6 +123,25 @@ public class GrpcCloudSchedulerStub extends CloudSchedulerStub { .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + private final UnaryCallable listJobsCallable; private final UnaryCallable listJobsPagedCallable; private final UnaryCallable getJobCallable; @@ -127,6 +151,10 @@ public class GrpcCloudSchedulerStub extends CloudSchedulerStub { private final UnaryCallable pauseJobCallable; private final UnaryCallable resumeJobCallable; private final UnaryCallable runJobCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -252,6 +280,26 @@ protected GrpcCloudSchedulerStub( return params.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); this.listJobsCallable = callableFactory.createUnaryCallable( @@ -280,6 +328,15 @@ protected GrpcCloudSchedulerStub( this.runJobCallable = callableFactory.createUnaryCallable( runJobTransportSettings, settings.runJobSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -334,6 +391,22 @@ public UnaryCallable runJobCallable() { return runJobCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/HttpJsonCloudSchedulerStub.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/HttpJsonCloudSchedulerStub.java index 62d1d8c335ab..0baad4851b4c 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/HttpJsonCloudSchedulerStub.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/HttpJsonCloudSchedulerStub.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1.stub; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; @@ -30,6 +31,10 @@ import com.google.api.gax.httpjson.ProtoRestSerializer; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.CreateJobRequest; import com.google.cloud.scheduler.v1beta1.DeleteJobRequest; import com.google.cloud.scheduler.v1beta1.GetJobRequest; @@ -83,6 +88,9 @@ public class HttpJsonCloudSchedulerStub extends CloudSchedulerStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam( + fields, "legacyAppEngineCron", request.getLegacyAppEngineCron()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); @@ -220,6 +228,8 @@ public class HttpJsonCloudSchedulerStub extends CloudSchedulerStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "legacyAppEngineCron", request.getLegacyAppEngineCron()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -340,6 +350,74 @@ public class HttpJsonCloudSchedulerStub extends CloudSchedulerStub { .build()) .build(); + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable listJobsCallable; private final UnaryCallable listJobsPagedCallable; private final UnaryCallable getJobCallable; @@ -349,6 +427,10 @@ public class HttpJsonCloudSchedulerStub extends CloudSchedulerStub { private final UnaryCallable pauseJobCallable; private final UnaryCallable resumeJobCallable; private final UnaryCallable runJobCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -432,6 +514,17 @@ protected HttpJsonCloudSchedulerStub( .setMethodDescriptor(runJobMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); this.listJobsCallable = callableFactory.createUnaryCallable( @@ -460,6 +553,15 @@ protected HttpJsonCloudSchedulerStub( this.runJobCallable = callableFactory.createUnaryCallable( runJobTransportSettings, settings.runJobSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -476,6 +578,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(pauseJobMethodDescriptor); methodDescriptors.add(resumeJobMethodDescriptor); methodDescriptors.add(runJobMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } @@ -524,6 +628,22 @@ public UnaryCallable runJobCallable() { return runJobCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientHttpJsonTest.java b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientHttpJsonTest.java index a336c188f3ef..3b04ecb141c0 100644 --- a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientHttpJsonTest.java +++ b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientHttpJsonTest.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; @@ -27,8 +28,13 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.scheduler.v1beta1.stub.HttpJsonCloudSchedulerStub; import com.google.common.collect.Lists; +import com.google.protobuf.Any; import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -36,6 +42,7 @@ import com.google.rpc.Status; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -194,6 +201,7 @@ public void getJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -247,6 +255,7 @@ public void getJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -300,6 +309,7 @@ public void createJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -355,6 +365,7 @@ public void createJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -410,6 +421,7 @@ public void updateJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -425,6 +437,7 @@ public void updateJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -466,6 +479,7 @@ public void updateJobExceptionTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateJob(job, updateMask); @@ -569,6 +583,7 @@ public void pauseJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -622,6 +637,7 @@ public void pauseJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -675,6 +691,7 @@ public void resumeJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -728,6 +745,7 @@ public void resumeJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -781,6 +799,7 @@ public void runJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -834,6 +853,7 @@ public void runJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockService.addResponse(expectedResponse); @@ -872,4 +892,120 @@ public void runJobExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientTest.java b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientTest.java index 83e841198408..0638d7ff1d03 100644 --- a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientTest.java +++ b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClientTest.java @@ -17,6 +17,7 @@ package com.google.cloud.scheduler.v1beta1; import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListJobsPagedResponse; +import static com.google.cloud.scheduler.v1beta1.CloudSchedulerClient.ListLocationsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -25,8 +26,13 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -35,6 +41,7 @@ import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -48,6 +55,7 @@ @Generated("by gapic-generator-java") public class CloudSchedulerClientTest { private static MockCloudScheduler mockCloudScheduler; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudSchedulerClient client; @@ -55,9 +63,11 @@ public class CloudSchedulerClientTest { @BeforeClass public static void startStaticServer() { mockCloudScheduler = new MockCloudScheduler(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudScheduler)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudScheduler, mockLocations)); mockServiceHelper.start(); } @@ -185,6 +195,7 @@ public void getJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -232,6 +243,7 @@ public void getJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -279,6 +291,7 @@ public void createJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -329,6 +342,7 @@ public void createJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -379,6 +393,7 @@ public void updateJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -497,6 +512,7 @@ public void pauseJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -544,6 +560,7 @@ public void pauseJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -591,6 +608,7 @@ public void resumeJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -638,6 +656,7 @@ public void resumeJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -685,6 +704,7 @@ public void runJobTest() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -732,6 +752,7 @@ public void runJobTest2() throws Exception { .setLastAttemptTime(Timestamp.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setAttemptDeadline(Duration.newBuilder().build()) + .setLegacyAppEngineCron(true) .build(); mockCloudScheduler.addResponse(expectedResponse); @@ -764,4 +785,105 @@ public void runJobExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocations.java b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocations.java new file mode 100644 index 000000000000..862efd4876de --- /dev/null +++ b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocationsImpl.java b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocationsImpl.java new file mode 100644 index 000000000000..3afe4a75a17b --- /dev/null +++ b/java-scheduler/google-cloud-scheduler/src/test/java/com/google/cloud/scheduler/v1beta1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-scheduler/grpc-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerGrpc.java b/java-scheduler/grpc-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerGrpc.java index a54ae6b7c478..dad799c1cf8c 100644 --- a/java-scheduler/grpc-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerGrpc.java +++ b/java-scheduler/grpc-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerGrpc.java @@ -486,12 +486,13 @@ public void createJob( * *
      * Updates a job.
-     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
-     * not exist, `NOT_FOUND` is returned.
+     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
+     * returned. If the job does not exist, `NOT_FOUND` is returned.
      * If UpdateJob does not successfully return, it is possible for the
-     * job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
-     * not be executed. If this happens, retry the UpdateJob request
-     * until a successful response is received.
+     * job to be in an
+     * [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
+     * state. A job in this state may not be executed. If this happens, retry the
+     * UpdateJob request until a successful response is received.
      * 
*/ public void updateJob( @@ -519,10 +520,14 @@ public void deleteJob( *
      * Pauses a job.
      * If a job is paused then the system will stop executing the job
-     * until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
-     * state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
-     * will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]
-     * to be paused.
+     * until it is re-enabled via
+     * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
+     * state of the job is stored in
+     * [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
+     * to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
+     * job must be in
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
+     * paused.
      * 
*/ public void pauseJob( @@ -536,10 +541,15 @@ public void pauseJob( * *
      * Resume a job.
-     * This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
-     * state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
-     * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
-     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
+     * This method reenables a job after it has been
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
+     * state of a job is stored in
+     * [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
+     * method it will be set to
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
+     * job must be in
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
+     * resumed.
      * 
*/ public void resumeJob( @@ -686,12 +696,13 @@ public void createJob( * *
      * Updates a job.
-     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
-     * not exist, `NOT_FOUND` is returned.
+     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
+     * returned. If the job does not exist, `NOT_FOUND` is returned.
      * If UpdateJob does not successfully return, it is possible for the
-     * job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
-     * not be executed. If this happens, retry the UpdateJob request
-     * until a successful response is received.
+     * job to be in an
+     * [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
+     * state. A job in this state may not be executed. If this happens, retry the
+     * UpdateJob request until a successful response is received.
      * 
*/ public void updateJob( @@ -721,10 +732,14 @@ public void deleteJob( *
      * Pauses a job.
      * If a job is paused then the system will stop executing the job
-     * until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
-     * state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
-     * will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]
-     * to be paused.
+     * until it is re-enabled via
+     * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
+     * state of the job is stored in
+     * [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
+     * to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
+     * job must be in
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
+     * paused.
      * 
*/ public void pauseJob( @@ -739,10 +754,15 @@ public void pauseJob( * *
      * Resume a job.
-     * This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
-     * state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
-     * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
-     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
+     * This method reenables a job after it has been
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
+     * state of a job is stored in
+     * [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
+     * method it will be set to
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
+     * job must be in
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
+     * resumed.
      * 
*/ public void resumeJob( @@ -833,12 +853,13 @@ public com.google.cloud.scheduler.v1beta1.Job createJob( * *
      * Updates a job.
-     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
-     * not exist, `NOT_FOUND` is returned.
+     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
+     * returned. If the job does not exist, `NOT_FOUND` is returned.
      * If UpdateJob does not successfully return, it is possible for the
-     * job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
-     * not be executed. If this happens, retry the UpdateJob request
-     * until a successful response is received.
+     * job to be in an
+     * [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
+     * state. A job in this state may not be executed. If this happens, retry the
+     * UpdateJob request until a successful response is received.
      * 
*/ public com.google.cloud.scheduler.v1beta1.Job updateJob( @@ -866,10 +887,14 @@ public com.google.protobuf.Empty deleteJob( *
      * Pauses a job.
      * If a job is paused then the system will stop executing the job
-     * until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
-     * state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
-     * will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]
-     * to be paused.
+     * until it is re-enabled via
+     * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
+     * state of the job is stored in
+     * [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
+     * to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
+     * job must be in
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
+     * paused.
      * 
*/ public com.google.cloud.scheduler.v1beta1.Job pauseJob( @@ -883,10 +908,15 @@ public com.google.cloud.scheduler.v1beta1.Job pauseJob( * *
      * Resume a job.
-     * This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
-     * state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
-     * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
-     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
+     * This method reenables a job after it has been
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
+     * state of a job is stored in
+     * [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
+     * method it will be set to
+     * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
+     * job must be in
+     * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
+     * resumed.
      * 
*/ public com.google.cloud.scheduler.v1beta1.Job resumeJob( @@ -978,12 +1008,13 @@ protected CloudSchedulerFutureStub build( * *
      * Updates a job.
-     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
-     * not exist, `NOT_FOUND` is returned.
+     * If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
+     * returned. If the job does not exist, `NOT_FOUND` is returned.
      * If UpdateJob does not successfully return, it is possible for the
-     * job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
-     * not be executed. If this happens, retry the UpdateJob request
-     * until a successful response is received.
+     * job to be in an
+     * [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
+     * state. A job in this state may not be executed. If this happens, retry the
+     * UpdateJob request until a successful response is received.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1012,10 +1043,14 @@ public com.google.common.util.concurrent.ListenableFuture * Pauses a job. * If a job is paused then the system will stop executing the job - * until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The - * state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it - * will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] - * to be paused. + * until it is re-enabled via + * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The + * state of the job is stored in + * [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set + * to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A + * job must be in + * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be + * paused. * */ public com.google.common.util.concurrent.ListenableFuture< @@ -1030,10 +1065,15 @@ public com.google.common.util.concurrent.ListenableFuture * Resume a job. - * This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The - * state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it - * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in - * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. + * This method reenables a job after it has been + * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The + * state of a job is stored in + * [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this + * method it will be set to + * [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A + * job must be in + * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be + * resumed. * */ public com.google.common.util.concurrent.ListenableFuture< diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTarget.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTarget.java index 404c6d161da4..dc219994d1a2 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTarget.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTarget.java @@ -23,14 +23,14 @@ * *
  * App Engine target. The job will be pushed to a job handler by means
- * of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] such
- * as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
- * HTTP response code in the range [200 - 299]. Error 503 is
- * considered an App Engine system error instead of an application
- * error. Requests returning error 503 will be retried regardless of
- * retry configuration and not counted against retry counts. Any other
- * response code, or a failure to receive a response before the
- * deadline, constitutes a failed attempt.
+ * of an HTTP request via an
+ * [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method]
+ * such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+ * response code in the range [200 - 299]. Error 503 is considered an App Engine
+ * system error instead of an application error. Requests returning error 503
+ * will be retried regardless of retry configuration and not counted against
+ * retry counts. Any other response code, or a failure to receive a response
+ * before the deadline, constitutes a failed attempt.
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.AppEngineHttpTarget} @@ -271,8 +271,13 @@ public int getHeadersCount() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -316,8 +321,13 @@ public java.util.Map getHeaders() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -352,8 +362,13 @@ public java.util.Map getHeadersMap() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -392,8 +407,13 @@ public java.lang.String getHeadersOrDefault(java.lang.String key, java.lang.Stri * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -431,7 +451,8 @@ public java.lang.String getHeadersOrThrow(java.lang.String key) { * Body. * HTTP request body. A request body is allowed only if the HTTP method is * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + * job with an incompatible + * [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * * * bytes body = 5; @@ -659,14 +680,14 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * App Engine target. The job will be pushed to a job handler by means
-   * of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] such
-   * as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
-   * HTTP response code in the range [200 - 299]. Error 503 is
-   * considered an App Engine system error instead of an application
-   * error. Requests returning error 503 will be retried regardless of
-   * retry configuration and not counted against retry counts. Any other
-   * response code, or a failure to receive a response before the
-   * deadline, constitutes a failed attempt.
+   * of an HTTP request via an
+   * [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method]
+   * such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+   * response code in the range [200 - 299]. Error 503 is considered an App Engine
+   * system error instead of an application error. Requests returning error 503
+   * will be retried regardless of retry configuration and not counted against
+   * retry counts. Any other response code, or a failure to receive a response
+   * before the deadline, constitutes a failed attempt.
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.AppEngineHttpTarget} @@ -1366,8 +1387,13 @@ public int getHeadersCount() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1411,8 +1437,13 @@ public java.util.Map getHeaders() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1447,8 +1478,13 @@ public java.util.Map getHeadersMap() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1488,8 +1524,13 @@ public java.lang.String getHeadersOrDefault( * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1536,8 +1577,13 @@ public Builder clearHeaders() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1580,8 +1626,13 @@ public java.util.Map getMutableHeaders() { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1623,8 +1674,13 @@ public Builder putHeaders(java.lang.String key, java.lang.String value) { * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -1654,7 +1710,8 @@ public Builder putAllHeaders(java.util.Map v * Body. * HTTP request body. A request body is allowed only if the HTTP method is * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + * job with an incompatible + * [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * * * bytes body = 5; @@ -1672,7 +1729,8 @@ public com.google.protobuf.ByteString getBody() { * Body. * HTTP request body. A request body is allowed only if the HTTP method is * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + * job with an incompatible + * [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * * * bytes body = 5; @@ -1696,7 +1754,8 @@ public Builder setBody(com.google.protobuf.ByteString value) { * Body. * HTTP request body. A request body is allowed only if the HTTP method is * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + * job with an incompatible + * [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * * * bytes body = 5; diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTargetOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTargetOrBuilder.java index 61abe1e05e80..3e94fd4a99c0 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTargetOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineHttpTargetOrBuilder.java @@ -132,8 +132,13 @@ public interface AppEngineHttpTargetOrBuilder * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -165,8 +170,13 @@ public interface AppEngineHttpTargetOrBuilder * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -201,8 +211,13 @@ public interface AppEngineHttpTargetOrBuilder * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -234,8 +249,13 @@ public interface AppEngineHttpTargetOrBuilder * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -272,8 +292,13 @@ java.lang.String getHeadersOrDefault( * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the * modified `User-Agent`. * * `X-CloudScheduler`: This header will be set to true. - * If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - * the following headers: + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. + * If the job has an + * [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + * Scheduler sets the following headers: * * `Content-Type`: By default, the `Content-Type` header is set to * `"application/octet-stream"`. The default can be overridden by explictly * setting `Content-Type` to a particular media type when the job is @@ -299,7 +324,8 @@ java.lang.String getHeadersOrDefault( * Body. * HTTP request body. A request body is allowed only if the HTTP method is * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + * job with an incompatible + * [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * * * bytes body = 5; diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRouting.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRouting.java index 7f97c6670230..0ad100104116 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRouting.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRouting.java @@ -196,7 +196,7 @@ public com.google.protobuf.ByteString getVersionBytes() { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -229,7 +229,7 @@ public java.lang.String getInstance() { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -275,32 +275,40 @@ public com.google.protobuf.ByteString getInstanceBytes() { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -338,32 +346,40 @@ public java.lang.String getHost() { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -1030,7 +1046,7 @@ public Builder setVersionBytes(com.google.protobuf.ByteString value) { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -1062,7 +1078,7 @@ public java.lang.String getInstance() { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -1094,7 +1110,7 @@ public com.google.protobuf.ByteString getInstanceBytes() { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -1125,7 +1141,7 @@ public Builder setInstance(java.lang.String value) { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -1152,7 +1168,7 @@ public Builder clearInstance() { * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -1196,32 +1212,40 @@ public Builder setInstanceBytes(com.google.protobuf.ByteString value) { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -1258,32 +1282,40 @@ public java.lang.String getHost() { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -1320,32 +1352,40 @@ public com.google.protobuf.ByteString getHostBytes() { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -1381,32 +1421,40 @@ public Builder setHost(java.lang.String value) { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -1438,32 +1486,40 @@ public Builder clearHost() { * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRoutingOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRoutingOrBuilder.java index 908273e9d867..63771af1ff4d 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRoutingOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/AppEngineRoutingOrBuilder.java @@ -90,7 +90,7 @@ public interface AppEngineRoutingOrBuilder * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -112,7 +112,7 @@ public interface AppEngineRoutingOrBuilder * the job is attempted. * Requests can only be sent to a specific instance if * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). * App Engine Flex does not support instances. For more information, see * [App Engine Standard request * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -145,32 +145,40 @@ public interface AppEngineRoutingOrBuilder * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; @@ -197,32 +205,40 @@ public interface AppEngineRoutingOrBuilder * * `application_domain_name` = The domain name of the app, for * example <app-id>.appspot.com, which is associated with the * job's project ID. - * * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * * `service =` + * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `version_dot_service =` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] * * `instance_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] * * `instance_dot_version =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] * * `instance_dot_version_dot_service =` - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + * '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + * `+ '.' +` * [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] - * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - * to the service which is the default service when the job is attempted. - * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - * sent to an instance which is available when the job is attempted. + * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + * empty, then the job will be sent to the service which is the default + * service when the job is attempted. + * If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + * empty, then the job will be sent to the version which is the default + * version when the job is attempted. + * If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * empty, then the job will be sent to an instance which is available when the + * job is attempted. * If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], * [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. + * [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + * invalid, then the job will be sent to the default version of the default + * service when the job is attempted. * * * string host = 4; diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequest.java index 85c5eb2f699a..680be971fa08 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
+ * Request message for
+ * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.CreateJobRequest} @@ -129,7 +130,8 @@ public com.google.protobuf.ByteString getParentBytes() { * *
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -149,7 +151,8 @@ public boolean hasJob() {
    *
    * 
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -169,7 +172,8 @@ public com.google.cloud.scheduler.v1beta1.Job getJob() {
    *
    * 
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -360,7 +364,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    *
    * 
-   * Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
+   * Request message for
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.CreateJobRequest} @@ -679,7 +684,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * *
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -698,7 +704,8 @@ public boolean hasJob() {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -721,7 +728,8 @@ public com.google.cloud.scheduler.v1beta1.Job getJob() {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -748,7 +756,8 @@ public Builder setJob(com.google.cloud.scheduler.v1beta1.Job value) {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -772,7 +781,8 @@ public Builder setJob(com.google.cloud.scheduler.v1beta1.Job.Builder builderForV
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -803,7 +813,8 @@ public Builder mergeJob(com.google.cloud.scheduler.v1beta1.Job value) {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -828,7 +839,8 @@ public Builder clearJob() {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -847,7 +859,8 @@ public com.google.cloud.scheduler.v1beta1.Job.Builder getJobBuilder() {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -868,7 +881,8 @@ public com.google.cloud.scheduler.v1beta1.JobOrBuilder getJobOrBuilder() {
      *
      * 
      * Required. The job to add. The user can optionally specify a name for the
-     * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+     * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+     * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
      * existing job. If a name is not specified then the system will
      * generate a random unique name that will be returned
      * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequestOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequestOrBuilder.java
index 272307d56fe8..4241153537e4 100644
--- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequestOrBuilder.java
+++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/CreateJobRequestOrBuilder.java
@@ -59,7 +59,8 @@ public interface CreateJobRequestOrBuilder
    *
    * 
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -76,7 +77,8 @@ public interface CreateJobRequestOrBuilder
    *
    * 
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
@@ -93,7 +95,8 @@ public interface CreateJobRequestOrBuilder
    *
    * 
    * Required. The job to add. The user can optionally specify a name for the
-   * job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
+   * job in [name][google.cloud.scheduler.v1beta1.Job.name].
+   * [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
    * existing job. If a name is not specified then the system will
    * generate a random unique name that will be returned
    * ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequest.java
index 95bdc3943ba3..9345b51bf052 100644
--- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequest.java
+++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequest.java
@@ -123,6 +123,26 @@ public com.google.protobuf.ByteString getNameBytes() {
     }
   }
 
+  public static final int LEGACY_APP_ENGINE_CRON_FIELD_NUMBER = 2;
+  private boolean legacyAppEngineCron_;
+  /**
+   *
+   *
+   * 
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the job in the __cron
+   * queue with the corresponding name will be deleted instead.
+   * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -140,6 +160,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (legacyAppEngineCron_ != false) { + output.writeBool(2, legacyAppEngineCron_); + } getUnknownFields().writeTo(output); } @@ -152,6 +175,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (legacyAppEngineCron_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, legacyAppEngineCron_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -169,6 +195,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.scheduler.v1beta1.DeleteJobRequest) obj; if (!getName().equals(other.getName())) return false; + if (getLegacyAppEngineCron() != other.getLegacyAppEngineCron()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -182,6 +209,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LEGACY_APP_ENGINE_CRON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLegacyAppEngineCron()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -323,6 +352,8 @@ public Builder clear() { super.clear(); name_ = ""; + legacyAppEngineCron_ = false; + return this; } @@ -351,6 +382,7 @@ public com.google.cloud.scheduler.v1beta1.DeleteJobRequest buildPartial() { com.google.cloud.scheduler.v1beta1.DeleteJobRequest result = new com.google.cloud.scheduler.v1beta1.DeleteJobRequest(this); result.name_ = name_; + result.legacyAppEngineCron_ = legacyAppEngineCron_; onBuilt(); return result; } @@ -405,6 +437,9 @@ public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.DeleteJobRequest oth name_ = other.name_; onChanged(); } + if (other.getLegacyAppEngineCron() != false) { + setLegacyAppEngineCron(other.getLegacyAppEngineCron()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -437,6 +472,12 @@ public Builder mergeFrom( break; } // case 10 + case 16: + { + legacyAppEngineCron_ = input.readBool(); + + break; + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -575,6 +616,64 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private boolean legacyAppEngineCron_; + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be deleted instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be deleted instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @param value The legacyAppEngineCron to set. + * @return This builder for chaining. + */ + public Builder setLegacyAppEngineCron(boolean value) { + + legacyAppEngineCron_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be deleted instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return This builder for chaining. + */ + public Builder clearLegacyAppEngineCron() { + + legacyAppEngineCron_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequestOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequestOrBuilder.java index 3874da591f43..cad5a6ee840b 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequestOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/DeleteJobRequestOrBuilder.java @@ -53,4 +53,19 @@ public interface DeleteJobRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the job in the __cron
+   * queue with the corresponding name will be deleted instead.
+   * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + boolean getLegacyAppEngineCron(); } diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/GetJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/GetJobRequest.java index 06a33c9519d5..dc80ac9efd05 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/GetJobRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/GetJobRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
+ * Request message for
+ * [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.GetJobRequest} @@ -285,7 +286,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
+   * Request message for
+   * [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.GetJobRequest} diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTarget.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTarget.java index e1bab4577baa..cb8f582d03e8 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTarget.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTarget.java @@ -23,8 +23,9 @@ * *
  * Http target. The job will be pushed to the job handler by means of
- * an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as HTTP
- * POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+ * an HTTP request via an
+ * [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as
+ * HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
  * response code in the range [200 - 299]. A failure to receive a response
  * constitutes a failed execution. For a redirected request, the response
  * returned by the redirected request is considered.
@@ -269,6 +270,11 @@ public int getHeadersCount() {
    * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`.
    * * `X-Google-*`: Google internal use only.
    * * `X-AppEngine-*`: Google internal use only.
+   * * `X-CloudScheduler`: This header will be set to true.
+   * * `X-CloudScheduler-JobName`: This header will contain the job name.
+   * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in
+   * the unix-cron format, this header will contain the job schedule time in
+   * RFC3339 UTC "Zulu" format.
    * The total size of headers must be less than 80KB.
    * 
* @@ -304,6 +310,11 @@ public java.util.Map getHeaders() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -330,6 +341,11 @@ public java.util.Map getHeadersMap() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -360,6 +376,11 @@ public java.lang.String getHeadersOrDefault(java.lang.String key, java.lang.Stri * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -772,8 +793,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Http target. The job will be pushed to the job handler by means of
-   * an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as HTTP
-   * POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+   * an HTTP request via an
+   * [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as
+   * HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
    * response code in the range [200 - 299]. A failure to receive a response
    * constitutes a failed execution. For a redirected request, the response
    * returned by the redirected request is considered.
@@ -1333,6 +1355,11 @@ public int getHeadersCount() {
      * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`.
      * * `X-Google-*`: Google internal use only.
      * * `X-AppEngine-*`: Google internal use only.
+     * * `X-CloudScheduler`: This header will be set to true.
+     * * `X-CloudScheduler-JobName`: This header will contain the job name.
+     * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in
+     * the unix-cron format, this header will contain the job schedule time in
+     * RFC3339 UTC "Zulu" format.
      * The total size of headers must be less than 80KB.
      * 
* @@ -1368,6 +1395,11 @@ public java.util.Map getHeaders() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -1394,6 +1426,11 @@ public java.util.Map getHeadersMap() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -1425,6 +1462,11 @@ public java.lang.String getHeadersOrDefault( * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -1463,6 +1505,11 @@ public Builder clearHeaders() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -1497,6 +1544,11 @@ public java.util.Map getMutableHeaders() { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -1530,6 +1582,11 @@ public Builder putHeaders(java.lang.String key, java.lang.String value) { * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTargetOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTargetOrBuilder.java index 92d059be8c48..604a4a68ee65 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTargetOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/HttpTargetOrBuilder.java @@ -100,6 +100,11 @@ public interface HttpTargetOrBuilder * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -123,6 +128,11 @@ public interface HttpTargetOrBuilder * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -149,6 +159,11 @@ public interface HttpTargetOrBuilder * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -172,6 +187,11 @@ public interface HttpTargetOrBuilder * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* @@ -200,6 +220,11 @@ java.lang.String getHeadersOrDefault( * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. + * * `X-CloudScheduler`: This header will be set to true. + * * `X-CloudScheduler-JobName`: This header will contain the job name. + * * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + * the unix-cron format, this header will contain the job schedule time in + * RFC3339 UTC "Zulu" format. * The total size of headers must be less than 80KB. *
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/Job.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/Job.java index 6b2a00ee4db8..d6bbdf83cb3f 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/Job.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/Job.java @@ -23,7 +23,7 @@ * *
  * Configuration for a job.
- * The maximum allowed size for a job is 100KB.
+ * The maximum allowed size for a job is 1MB.
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.Job} @@ -129,9 +129,11 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
+     * The job state resulting from a failed
+     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
      * operation. To recover a job from this state, retry
-     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] until a successful response is received.
+     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
+     * until a successful response is received.
      * 
* * UPDATE_FAILED = 4; @@ -187,9 +189,11 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
+     * The job state resulting from a failed
+     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
      * operation. To recover a job from this state, retry
-     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] until a successful response is received.
+     * [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]
+     * until a successful response is received.
      * 
* * UPDATE_FAILED = 4; @@ -339,7 +343,8 @@ public TargetCase getTargetCase() { * * *
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
    * which it becomes output only.
    * The job name. For example:
    * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -376,7 +381,8 @@ public java.lang.String getName() {
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
    * which it becomes output only.
    * The job name. For example:
    * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -416,7 +422,8 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
    * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * A human-readable description for the job. This string must not contain
    * more than 500 characters.
@@ -442,7 +449,8 @@ public java.lang.String getDescription() {
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
    * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * A human-readable description for the job. This string must not contain
    * more than 500 characters.
@@ -625,10 +633,11 @@ public com.google.cloud.scheduler.v1beta1.HttpTargetOrBuilder getHttpTargetOrBui
    *
    *
    * 
-   * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+   * Required, except when used with
+   * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * Describes the schedule on which the job will be executed.
    * The schedule can be either of the following types:
-   * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+   * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
    * * English-like
    * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
    * As a general rule, execution `n + 1` of a job will not begin
@@ -639,8 +648,9 @@ public com.google.cloud.scheduler.v1beta1.HttpTargetOrBuilder getHttpTargetOrBui
    * execution will not start until `16:15`.
    * A scheduled start time will be delayed if the previous
    * execution has not ended when its scheduled time occurs.
-   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-   * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+   * 0 and a job attempt fails, the job will be tried a total of
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
    * times, with exponential backoff, until the next scheduled start
    * time.
    * 
@@ -665,10 +675,11 @@ public java.lang.String getSchedule() { * * *
-   * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+   * Required, except when used with
+   * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * Describes the schedule on which the job will be executed.
    * The schedule can be either of the following types:
-   * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+   * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
    * * English-like
    * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
    * As a general rule, execution `n + 1` of a job will not begin
@@ -679,8 +690,9 @@ public java.lang.String getSchedule() {
    * execution will not start until `16:15`.
    * A scheduled start time will be delayed if the previous
    * execution has not ended when its scheduled time occurs.
-   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-   * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+   * 0 and a job attempt fails, the job will be tried a total of
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
    * times, with exponential backoff, until the next scheduled start
    * time.
    * 
@@ -709,8 +721,9 @@ public com.google.protobuf.ByteString getScheduleBytes() { * *
    * Specifies the time zone to be used in interpreting
-   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-   * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+   * field must be a time zone name from the [tz
+   * database](http://en.wikipedia.org/wiki/Tz_database).
    * Note that some time zones include a provision for
    * daylight savings time. The rules for daylight saving time are
    * determined by the chosen tz. For UTC use the string "utc". If a
@@ -739,8 +752,9 @@ public java.lang.String getTimeZone() {
    *
    * 
    * Specifies the time zone to be used in interpreting
-   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-   * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+   * field must be a time zone name from the [tz
+   * database](http://en.wikipedia.org/wiki/Tz_database).
    * Note that some time zones include a provision for
    * daylight savings time. The rules for daylight saving time are
    * determined by the chosen tz. For UTC use the string "utc". If a
@@ -1056,11 +1070,19 @@ public com.google.cloud.scheduler.v1beta1.RetryConfigOrBuilder getRetryConfigOrB
    * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
    * execution logs. Cloud Scheduler will retry the job according
    * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig].
-   * The allowed duration for this deadline is:
-   * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes.
-   * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15
-   *   seconds and 24 hours.
-   * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored.
+   * The default and the allowed values depend on the type of target:
+   * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the
+   * default is 3 minutes. The deadline must be in the interval [15 seconds, 30
+   * minutes].
+   * * For [App Engine HTTP
+   * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0
+   * indicates that the request has the default deadline. The default deadline
+   * depends on the scaling type of the service: 10 minutes for standard apps
+   * with automatic scaling, 24 hours for standard apps with manual and basic
+   * scaling, and 60 minutes for flex apps. If the request deadline is set, it
+   * must be in the interval [15 seconds, 24 hours 15 seconds].
+   * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target],
+   * this field is ignored.
    * 
* * .google.protobuf.Duration attempt_deadline = 22; @@ -1080,11 +1102,19 @@ public boolean hasAttemptDeadline() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -1106,11 +1136,19 @@ public com.google.protobuf.Duration getAttemptDeadline() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -1120,6 +1158,28 @@ public com.google.protobuf.DurationOrBuilder getAttemptDeadlineOrBuilder() { return getAttemptDeadline(); } + public static final int LEGACY_APP_ENGINE_CRON_FIELD_NUMBER = 23; + private boolean legacyAppEngineCron_; + /** + * + * + *
+   * Immutable. This field is used to manage the legacy App Engine Cron jobs
+   * using the Cloud Scheduler API. If the field is set to true, the job will be
+   * considered a legacy job. Note that App Engine Cron jobs have fewer
+   * features than Cloud Scheduler jobs, e.g., are only limited to App Engine
+   * targets.
+   * 
+ * + * bool legacy_app_engine_cron = 23 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1176,6 +1236,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attemptDeadline_ != null) { output.writeMessage(22, getAttemptDeadline()); } + if (legacyAppEngineCron_ != false) { + output.writeBool(23, legacyAppEngineCron_); + } getUnknownFields().writeTo(output); } @@ -1233,6 +1296,9 @@ public int getSerializedSize() { if (attemptDeadline_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getAttemptDeadline()); } + if (legacyAppEngineCron_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, legacyAppEngineCron_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1277,6 +1343,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttemptDeadline()) { if (!getAttemptDeadline().equals(other.getAttemptDeadline())) return false; } + if (getLegacyAppEngineCron() != other.getLegacyAppEngineCron()) return false; if (!getTargetCase().equals(other.getTargetCase())) return false; switch (targetCase_) { case 4: @@ -1336,6 +1403,8 @@ public int hashCode() { hash = (37 * hash) + ATTEMPT_DEADLINE_FIELD_NUMBER; hash = (53 * hash) + getAttemptDeadline().hashCode(); } + hash = (37 * hash) + LEGACY_APP_ENGINE_CRON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLegacyAppEngineCron()); switch (targetCase_) { case 4: hash = (37 * hash) + PUBSUB_TARGET_FIELD_NUMBER; @@ -1457,7 +1526,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Configuration for a job.
-   * The maximum allowed size for a job is 100KB.
+   * The maximum allowed size for a job is 1MB.
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.Job} @@ -1546,6 +1615,8 @@ public Builder clear() { attemptDeadline_ = null; attemptDeadlineBuilder_ = null; } + legacyAppEngineCron_ = false; + targetCase_ = 0; target_ = null; return this; @@ -1631,6 +1702,7 @@ public com.google.cloud.scheduler.v1beta1.Job buildPartial() { } else { result.attemptDeadline_ = attemptDeadlineBuilder_.build(); } + result.legacyAppEngineCron_ = legacyAppEngineCron_; result.targetCase_ = targetCase_; onBuilt(); return result; @@ -1718,6 +1790,9 @@ public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.Job other) { if (other.hasAttemptDeadline()) { mergeAttemptDeadline(other.getAttemptDeadline()); } + if (other.getLegacyAppEngineCron() != false) { + setLegacyAppEngineCron(other.getLegacyAppEngineCron()); + } switch (other.getTargetCase()) { case PUBSUB_TARGET: { @@ -1850,6 +1925,12 @@ public Builder mergeFrom( break; } // case 178 + case 184: + { + legacyAppEngineCron_ = input.readBool(); + + break; + } // case 184 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1886,7 +1967,8 @@ public Builder clearTarget() { * * *
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
      * which it becomes output only.
      * The job name. For example:
      * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -1922,7 +2004,8 @@ public java.lang.String getName() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
      * which it becomes output only.
      * The job name. For example:
      * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -1958,7 +2041,8 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
      * which it becomes output only.
      * The job name. For example:
      * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -1993,7 +2077,8 @@ public Builder setName(java.lang.String value) {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
      * which it becomes output only.
      * The job name. For example:
      * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -2024,7 +2109,8 @@ public Builder clearName() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
      * which it becomes output only.
      * The job name. For example:
      * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -2062,7 +2148,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
      * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * A human-readable description for the job. This string must not contain
      * more than 500 characters.
@@ -2087,7 +2174,8 @@ public java.lang.String getDescription() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
      * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * A human-readable description for the job. This string must not contain
      * more than 500 characters.
@@ -2112,7 +2200,8 @@ public com.google.protobuf.ByteString getDescriptionBytes() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
      * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * A human-readable description for the job. This string must not contain
      * more than 500 characters.
@@ -2136,7 +2225,8 @@ public Builder setDescription(java.lang.String value) {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
      * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * A human-readable description for the job. This string must not contain
      * more than 500 characters.
@@ -2156,7 +2246,8 @@ public Builder clearDescription() {
      *
      *
      * 
-     * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+     * Optionally caller-specified in
+     * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
      * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * A human-readable description for the job. This string must not contain
      * more than 500 characters.
@@ -2818,10 +2909,11 @@ public com.google.cloud.scheduler.v1beta1.HttpTargetOrBuilder getHttpTargetOrBui
      *
      *
      * 
-     * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+     * Required, except when used with
+     * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * Describes the schedule on which the job will be executed.
      * The schedule can be either of the following types:
-     * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+     * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
      * * English-like
      * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
      * As a general rule, execution `n + 1` of a job will not begin
@@ -2832,8 +2924,9 @@ public com.google.cloud.scheduler.v1beta1.HttpTargetOrBuilder getHttpTargetOrBui
      * execution will not start until `16:15`.
      * A scheduled start time will be delayed if the previous
      * execution has not ended when its scheduled time occurs.
-     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-     * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+     * 0 and a job attempt fails, the job will be tried a total of
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
      * times, with exponential backoff, until the next scheduled start
      * time.
      * 
@@ -2857,10 +2950,11 @@ public java.lang.String getSchedule() { * * *
-     * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+     * Required, except when used with
+     * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * Describes the schedule on which the job will be executed.
      * The schedule can be either of the following types:
-     * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+     * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
      * * English-like
      * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
      * As a general rule, execution `n + 1` of a job will not begin
@@ -2871,8 +2965,9 @@ public java.lang.String getSchedule() {
      * execution will not start until `16:15`.
      * A scheduled start time will be delayed if the previous
      * execution has not ended when its scheduled time occurs.
-     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-     * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+     * 0 and a job attempt fails, the job will be tried a total of
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
      * times, with exponential backoff, until the next scheduled start
      * time.
      * 
@@ -2896,10 +2991,11 @@ public com.google.protobuf.ByteString getScheduleBytes() { * * *
-     * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+     * Required, except when used with
+     * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * Describes the schedule on which the job will be executed.
      * The schedule can be either of the following types:
-     * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+     * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
      * * English-like
      * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
      * As a general rule, execution `n + 1` of a job will not begin
@@ -2910,8 +3006,9 @@ public com.google.protobuf.ByteString getScheduleBytes() {
      * execution will not start until `16:15`.
      * A scheduled start time will be delayed if the previous
      * execution has not ended when its scheduled time occurs.
-     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-     * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+     * 0 and a job attempt fails, the job will be tried a total of
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
      * times, with exponential backoff, until the next scheduled start
      * time.
      * 
@@ -2934,10 +3031,11 @@ public Builder setSchedule(java.lang.String value) { * * *
-     * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+     * Required, except when used with
+     * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * Describes the schedule on which the job will be executed.
      * The schedule can be either of the following types:
-     * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+     * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
      * * English-like
      * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
      * As a general rule, execution `n + 1` of a job will not begin
@@ -2948,8 +3046,9 @@ public Builder setSchedule(java.lang.String value) {
      * execution will not start until `16:15`.
      * A scheduled start time will be delayed if the previous
      * execution has not ended when its scheduled time occurs.
-     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-     * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+     * 0 and a job attempt fails, the job will be tried a total of
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
      * times, with exponential backoff, until the next scheduled start
      * time.
      * 
@@ -2968,10 +3067,11 @@ public Builder clearSchedule() { * * *
-     * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+     * Required, except when used with
+     * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
      * Describes the schedule on which the job will be executed.
      * The schedule can be either of the following types:
-     * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+     * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
      * * English-like
      * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
      * As a general rule, execution `n + 1` of a job will not begin
@@ -2982,8 +3082,9 @@ public Builder clearSchedule() {
      * execution will not start until `16:15`.
      * A scheduled start time will be delayed if the previous
      * execution has not ended when its scheduled time occurs.
-     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-     * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+     * 0 and a job attempt fails, the job will be tried a total of
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
      * times, with exponential backoff, until the next scheduled start
      * time.
      * 
@@ -3010,8 +3111,9 @@ public Builder setScheduleBytes(com.google.protobuf.ByteString value) { * *
      * Specifies the time zone to be used in interpreting
-     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-     * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+     * field must be a time zone name from the [tz
+     * database](http://en.wikipedia.org/wiki/Tz_database).
      * Note that some time zones include a provision for
      * daylight savings time. The rules for daylight saving time are
      * determined by the chosen tz. For UTC use the string "utc". If a
@@ -3039,8 +3141,9 @@ public java.lang.String getTimeZone() {
      *
      * 
      * Specifies the time zone to be used in interpreting
-     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-     * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+     * field must be a time zone name from the [tz
+     * database](http://en.wikipedia.org/wiki/Tz_database).
      * Note that some time zones include a provision for
      * daylight savings time. The rules for daylight saving time are
      * determined by the chosen tz. For UTC use the string "utc". If a
@@ -3068,8 +3171,9 @@ public com.google.protobuf.ByteString getTimeZoneBytes() {
      *
      * 
      * Specifies the time zone to be used in interpreting
-     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-     * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+     * field must be a time zone name from the [tz
+     * database](http://en.wikipedia.org/wiki/Tz_database).
      * Note that some time zones include a provision for
      * daylight savings time. The rules for daylight saving time are
      * determined by the chosen tz. For UTC use the string "utc". If a
@@ -3096,8 +3200,9 @@ public Builder setTimeZone(java.lang.String value) {
      *
      * 
      * Specifies the time zone to be used in interpreting
-     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-     * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+     * field must be a time zone name from the [tz
+     * database](http://en.wikipedia.org/wiki/Tz_database).
      * Note that some time zones include a provision for
      * daylight savings time. The rules for daylight saving time are
      * determined by the chosen tz. For UTC use the string "utc". If a
@@ -3120,8 +3225,9 @@ public Builder clearTimeZone() {
      *
      * 
      * Specifies the time zone to be used in interpreting
-     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-     * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+     * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+     * field must be a time zone name from the [tz
+     * database](http://en.wikipedia.org/wiki/Tz_database).
      * Note that some time zones include a provision for
      * daylight savings time. The rules for daylight saving time are
      * determined by the chosen tz. For UTC use the string "utc". If a
@@ -4183,11 +4289,19 @@ public com.google.cloud.scheduler.v1beta1.RetryConfigOrBuilder getRetryConfigOrB
      * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
      * execution logs. Cloud Scheduler will retry the job according
      * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig].
-     * The allowed duration for this deadline is:
-     * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes.
-     * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15
-     *   seconds and 24 hours.
-     * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored.
+     * The default and the allowed values depend on the type of target:
+     * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the
+     * default is 3 minutes. The deadline must be in the interval [15 seconds, 30
+     * minutes].
+     * * For [App Engine HTTP
+     * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0
+     * indicates that the request has the default deadline. The default deadline
+     * depends on the scaling type of the service: 10 minutes for standard apps
+     * with automatic scaling, 24 hours for standard apps with manual and basic
+     * scaling, and 60 minutes for flex apps. If the request deadline is set, it
+     * must be in the interval [15 seconds, 24 hours 15 seconds].
+     * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target],
+     * this field is ignored.
      * 
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4206,11 +4320,19 @@ public boolean hasAttemptDeadline() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4235,11 +4357,19 @@ public com.google.protobuf.Duration getAttemptDeadline() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4266,11 +4396,19 @@ public Builder setAttemptDeadline(com.google.protobuf.Duration value) { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4294,11 +4432,19 @@ public Builder setAttemptDeadline(com.google.protobuf.Duration.Builder builderFo * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4329,11 +4475,19 @@ public Builder mergeAttemptDeadline(com.google.protobuf.Duration value) { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4358,11 +4512,19 @@ public Builder clearAttemptDeadline() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4381,11 +4543,19 @@ public com.google.protobuf.Duration.Builder getAttemptDeadlineBuilder() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4408,11 +4578,19 @@ public com.google.protobuf.DurationOrBuilder getAttemptDeadlineOrBuilder() { * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -4434,6 +4612,70 @@ public com.google.protobuf.DurationOrBuilder getAttemptDeadlineOrBuilder() { return attemptDeadlineBuilder_; } + private boolean legacyAppEngineCron_; + /** + * + * + *
+     * Immutable. This field is used to manage the legacy App Engine Cron jobs
+     * using the Cloud Scheduler API. If the field is set to true, the job will be
+     * considered a legacy job. Note that App Engine Cron jobs have fewer
+     * features than Cloud Scheduler jobs, e.g., are only limited to App Engine
+     * targets.
+     * 
+ * + * bool legacy_app_engine_cron = 23 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + /** + * + * + *
+     * Immutable. This field is used to manage the legacy App Engine Cron jobs
+     * using the Cloud Scheduler API. If the field is set to true, the job will be
+     * considered a legacy job. Note that App Engine Cron jobs have fewer
+     * features than Cloud Scheduler jobs, e.g., are only limited to App Engine
+     * targets.
+     * 
+ * + * bool legacy_app_engine_cron = 23 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The legacyAppEngineCron to set. + * @return This builder for chaining. + */ + public Builder setLegacyAppEngineCron(boolean value) { + + legacyAppEngineCron_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. This field is used to manage the legacy App Engine Cron jobs
+     * using the Cloud Scheduler API. If the field is set to true, the job will be
+     * considered a legacy job. Note that App Engine Cron jobs have fewer
+     * features than Cloud Scheduler jobs, e.g., are only limited to App Engine
+     * targets.
+     * 
+ * + * bool legacy_app_engine_cron = 23 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearLegacyAppEngineCron() { + + legacyAppEngineCron_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobOrBuilder.java index 2862917360fb..21c2d2483e08 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobOrBuilder.java @@ -27,7 +27,8 @@ public interface JobOrBuilder * * *
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
    * which it becomes output only.
    * The job name. For example:
    * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -53,7 +54,8 @@ public interface JobOrBuilder
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after
    * which it becomes output only.
    * The job name. For example:
    * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -80,7 +82,8 @@ public interface JobOrBuilder
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
    * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * A human-readable description for the job. This string must not contain
    * more than 500 characters.
@@ -95,7 +98,8 @@ public interface JobOrBuilder
    *
    *
    * 
-   * Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
+   * Optionally caller-specified in
+   * [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or
    * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * A human-readable description for the job. This string must not contain
    * more than 500 characters.
@@ -216,10 +220,11 @@ public interface JobOrBuilder
    *
    *
    * 
-   * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+   * Required, except when used with
+   * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * Describes the schedule on which the job will be executed.
    * The schedule can be either of the following types:
-   * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+   * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
    * * English-like
    * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
    * As a general rule, execution `n + 1` of a job will not begin
@@ -230,8 +235,9 @@ public interface JobOrBuilder
    * execution will not start until `16:15`.
    * A scheduled start time will be delayed if the previous
    * execution has not ended when its scheduled time occurs.
-   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-   * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+   * 0 and a job attempt fails, the job will be tried a total of
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
    * times, with exponential backoff, until the next scheduled start
    * time.
    * 
@@ -245,10 +251,11 @@ public interface JobOrBuilder * * *
-   * Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+   * Required, except when used with
+   * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * Describes the schedule on which the job will be executed.
    * The schedule can be either of the following types:
-   * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
+   * * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview)
    * * English-like
    * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
    * As a general rule, execution `n + 1` of a job will not begin
@@ -259,8 +266,9 @@ public interface JobOrBuilder
    * execution will not start until `16:15`.
    * A scheduled start time will be delayed if the previous
    * execution has not ended when its scheduled time occurs.
-   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails,
-   * the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] >
+   * 0 and a job attempt fails, the job will be tried a total of
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
    * times, with exponential backoff, until the next scheduled start
    * time.
    * 
@@ -276,8 +284,9 @@ public interface JobOrBuilder * *
    * Specifies the time zone to be used in interpreting
-   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-   * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+   * field must be a time zone name from the [tz
+   * database](http://en.wikipedia.org/wiki/Tz_database).
    * Note that some time zones include a provision for
    * daylight savings time. The rules for daylight saving time are
    * determined by the chosen tz. For UTC use the string "utc". If a
@@ -295,8 +304,9 @@ public interface JobOrBuilder
    *
    * 
    * Specifies the time zone to be used in interpreting
-   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time
-   * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
+   * [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this
+   * field must be a time zone name from the [tz
+   * database](http://en.wikipedia.org/wiki/Tz_database).
    * Note that some time zones include a provision for
    * daylight savings time. The rules for daylight saving time are
    * determined by the chosen tz. For UTC use the string "utc". If a
@@ -525,11 +535,19 @@ public interface JobOrBuilder
    * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
    * execution logs. Cloud Scheduler will retry the job according
    * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig].
-   * The allowed duration for this deadline is:
-   * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes.
-   * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15
-   *   seconds and 24 hours.
-   * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored.
+   * The default and the allowed values depend on the type of target:
+   * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the
+   * default is 3 minutes. The deadline must be in the interval [15 seconds, 30
+   * minutes].
+   * * For [App Engine HTTP
+   * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0
+   * indicates that the request has the default deadline. The default deadline
+   * depends on the scaling type of the service: 10 minutes for standard apps
+   * with automatic scaling, 24 hours for standard apps with manual and basic
+   * scaling, and 60 minutes for flex apps. If the request deadline is set, it
+   * must be in the interval [15 seconds, 24 hours 15 seconds].
+   * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target],
+   * this field is ignored.
    * 
* * .google.protobuf.Duration attempt_deadline = 22; @@ -546,11 +564,19 @@ public interface JobOrBuilder * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; @@ -567,16 +593,41 @@ public interface JobOrBuilder * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in * execution logs. Cloud Scheduler will retry the job according * to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. - * The allowed duration for this deadline is: - * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - * * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - * seconds and 24 hours. - * * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + * The default and the allowed values depend on the type of target: + * * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + * default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + * minutes]. + * * For [App Engine HTTP + * targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + * indicates that the request has the default deadline. The default deadline + * depends on the scaling type of the service: 10 minutes for standard apps + * with automatic scaling, 24 hours for standard apps with manual and basic + * scaling, and 60 minutes for flex apps. If the request deadline is set, it + * must be in the interval [15 seconds, 24 hours 15 seconds]. + * * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + * this field is ignored. *
* * .google.protobuf.Duration attempt_deadline = 22; */ com.google.protobuf.DurationOrBuilder getAttemptDeadlineOrBuilder(); + /** + * + * + *
+   * Immutable. This field is used to manage the legacy App Engine Cron jobs
+   * using the Cloud Scheduler API. If the field is set to true, the job will be
+   * considered a legacy job. Note that App Engine Cron jobs have fewer
+   * features than Cloud Scheduler jobs, e.g., are only limited to App Engine
+   * targets.
+   * 
+ * + * bool legacy_app_engine_cron = 23 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The legacyAppEngineCron. + */ + boolean getLegacyAppEngineCron(); + public com.google.cloud.scheduler.v1beta1.Job.TargetCase getTargetCase(); } diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobProto.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobProto.java index 67767286c4d5..038a46555fd8 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobProto.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/JobProto.java @@ -45,47 +45,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n(google/cloud/scheduler/v1beta1/job.pro" - + "to\022\036google.cloud.scheduler.v1beta1\032\031goog" - + "le/api/resource.proto\032+google/cloud/sche" - + "duler/v1beta1/target.proto\032\036google/proto" - + "buf/duration.proto\032\037google/protobuf/time" - + "stamp.proto\032\027google/rpc/status.proto\"\344\006\n" - + "\003Job\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022" - + "E\n\rpubsub_target\030\004 \001(\0132,.google.cloud.sc" - + "heduler.v1beta1.PubsubTargetH\000\022U\n\026app_en" - + "gine_http_target\030\005 \001(\01323.google.cloud.sc" - + "heduler.v1beta1.AppEngineHttpTargetH\000\022A\n" - + "\013http_target\030\006 \001(\0132*.google.cloud.schedu" - + "ler.v1beta1.HttpTargetH\000\022\020\n\010schedule\030\024 \001" - + "(\t\022\021\n\ttime_zone\030\025 \001(\t\0224\n\020user_update_tim" - + "e\030\t \001(\0132\032.google.protobuf.Timestamp\0228\n\005s" - + "tate\030\n \001(\0162).google.cloud.scheduler.v1be" - + "ta1.Job.State\022\"\n\006status\030\013 \001(\0132\022.google.r" - + "pc.Status\0221\n\rschedule_time\030\021 \001(\0132\032.googl" - + "e.protobuf.Timestamp\0225\n\021last_attempt_tim" - + "e\030\022 \001(\0132\032.google.protobuf.Timestamp\022A\n\014r" - + "etry_config\030\023 \001(\0132+.google.cloud.schedul" - + "er.v1beta1.RetryConfig\0223\n\020attempt_deadli" - + "ne\030\026 \001(\0132\031.google.protobuf.Duration\"X\n\005S" - + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001" - + "\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED\020\003\022\021\n\rUPDATE_FAI" - + "LED\020\004:Z\352AW\n!cloudscheduler.googleapis.co" - + "m/Job\0222projects/{project}/locations/{loc" - + "ation}/jobs/{job}B\010\n\006target\"\342\001\n\013RetryCon" - + "fig\022\023\n\013retry_count\030\001 \001(\005\0225\n\022max_retry_du" - + "ration\030\002 \001(\0132\031.google.protobuf.Duration\022" - + "7\n\024min_backoff_duration\030\003 \001(\0132\031.google.p" - + "rotobuf.Duration\0227\n\024max_backoff_duration" - + "\030\004 \001(\0132\031.google.protobuf.Duration\022\025\n\rmax" - + "_doublings\030\005 \001(\005By\n\"com.google.cloud.sch" - + "eduler.v1beta1B\010JobProtoP\001ZGgoogle.golan" - + "g.org/genproto/googleapis/cloud/schedule" - + "r/v1beta1;schedulerb\006proto3" + + "to\022\036google.cloud.scheduler.v1beta1\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\032+google/cloud/scheduler/v" + + "1beta1/target.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\032\027google/rpc/status.proto\"\211\007\n\003Job\022\014\n" + + "\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022E\n\rpubs" + + "ub_target\030\004 \001(\0132,.google.cloud.scheduler" + + ".v1beta1.PubsubTargetH\000\022U\n\026app_engine_ht" + + "tp_target\030\005 \001(\01323.google.cloud.scheduler" + + ".v1beta1.AppEngineHttpTargetH\000\022A\n\013http_t" + + "arget\030\006 \001(\0132*.google.cloud.scheduler.v1b" + + "eta1.HttpTargetH\000\022\020\n\010schedule\030\024 \001(\t\022\021\n\tt" + + "ime_zone\030\025 \001(\t\0224\n\020user_update_time\030\t \001(\013" + + "2\032.google.protobuf.Timestamp\0228\n\005state\030\n " + + "\001(\0162).google.cloud.scheduler.v1beta1.Job" + + ".State\022\"\n\006status\030\013 \001(\0132\022.google.rpc.Stat" + + "us\0221\n\rschedule_time\030\021 \001(\0132\032.google.proto" + + "buf.Timestamp\0225\n\021last_attempt_time\030\022 \001(\013" + + "2\032.google.protobuf.Timestamp\022A\n\014retry_co" + + "nfig\030\023 \001(\0132+.google.cloud.scheduler.v1be" + + "ta1.RetryConfig\0223\n\020attempt_deadline\030\026 \001(" + + "\0132\031.google.protobuf.Duration\022#\n\026legacy_a" + + "pp_engine_cron\030\027 \001(\010B\003\340A\005\"X\n\005State\022\025\n\021ST" + + "ATE_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\n\n\006PAUSED" + + "\020\002\022\014\n\010DISABLED\020\003\022\021\n\rUPDATE_FAILED\020\004:Z\352AW" + + "\n!cloudscheduler.googleapis.com/Job\0222pro" + + "jects/{project}/locations/{location}/job" + + "s/{job}B\010\n\006target\"\342\001\n\013RetryConfig\022\023\n\013ret" + + "ry_count\030\001 \001(\005\0225\n\022max_retry_duration\030\002 \001" + + "(\0132\031.google.protobuf.Duration\0227\n\024min_bac" + + "koff_duration\030\003 \001(\0132\031.google.protobuf.Du" + + "ration\0227\n\024max_backoff_duration\030\004 \001(\0132\031.g" + + "oogle.protobuf.Duration\022\025\n\rmax_doublings" + + "\030\005 \001(\005By\n\"com.google.cloud.scheduler.v1b" + + "eta1B\010JobProtoP\001ZGgoogle.golang.org/genp" + + "roto/googleapis/cloud/scheduler/v1beta1;" + + "schedulerb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.scheduler.v1beta1.TargetProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -112,6 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LastAttemptTime", "RetryConfig", "AttemptDeadline", + "LegacyAppEngineCron", "Target", }); internal_static_google_cloud_scheduler_v1beta1_RetryConfig_descriptor = @@ -128,9 +132,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.scheduler.v1beta1.TargetProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequest.java index ce1bfd6e7a4d..aa333343bbcf 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+ * Request message for listing jobs using
+ * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ListJobsRequest} @@ -39,6 +40,7 @@ private ListJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builde private ListJobsRequest() { parent_ = ""; + filter_ = ""; pageToken_ = ""; } @@ -123,6 +125,67 @@ public com.google.protobuf.ByteString getParentBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * `filter` can be used to specify a subset of jobs.
+   * If `filter` equals `target_config="HttpConfig"`, then the http
+   * target jobs are retrieved. If `filter` equals
+   * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+   * retrieved. If `filter` equals `labels.foo=value1
+   * labels.foo=value2` then only jobs which are labeled with
+   * foo=value1 AND foo=value2 will be returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * `filter` can be used to specify a subset of jobs.
+   * If `filter` equals `target_config="HttpConfig"`, then the http
+   * target jobs are retrieved. If `filter` equals
+   * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+   * retrieved. If `filter` equals `labels.foo=value1
+   * labels.foo=value2` then only jobs which are labeled with
+   * foo=value1 AND foo=value2 will be returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PAGE_SIZE_FIELD_NUMBER = 5; private int pageSize_; /** @@ -154,10 +217,13 @@ public int getPageSize() { * 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. + * [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. *
* * string page_token = 6; @@ -183,10 +249,13 @@ public java.lang.String getPageToken() { * 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. + * [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. *
* * string page_token = 6; @@ -206,6 +275,26 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int LEGACY_APP_ENGINE_CRON_FIELD_NUMBER = 7; + private boolean legacyAppEngineCron_; + /** + * + * + *
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the jobs in the __cron
+   * queue will be listed instead.
+   * 
+ * + * bool legacy_app_engine_cron = 7; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -223,12 +312,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } if (pageSize_ != 0) { output.writeInt32(5, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); } + if (legacyAppEngineCron_ != false) { + output.writeBool(7, legacyAppEngineCron_); + } getUnknownFields().writeTo(output); } @@ -241,12 +336,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); } + if (legacyAppEngineCron_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, legacyAppEngineCron_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -264,8 +365,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.scheduler.v1beta1.ListJobsRequest) obj; if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (getLegacyAppEngineCron() != other.getLegacyAppEngineCron()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -279,10 +382,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + LEGACY_APP_ENGINE_CRON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLegacyAppEngineCron()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -387,7 +494,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+   * Request message for listing jobs using
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ListJobsRequest} @@ -423,10 +531,14 @@ public Builder clear() { super.clear(); parent_ = ""; + filter_ = ""; + pageSize_ = 0; pageToken_ = ""; + legacyAppEngineCron_ = false; + return this; } @@ -455,8 +567,10 @@ 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.filter_ = filter_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.legacyAppEngineCron_ = legacyAppEngineCron_; onBuilt(); return result; } @@ -511,6 +625,10 @@ public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.ListJobsRequest othe parent_ = other.parent_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } @@ -518,6 +636,9 @@ public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.ListJobsRequest othe pageToken_ = other.pageToken_; onChanged(); } + if (other.getLegacyAppEngineCron() != false) { + setLegacyAppEngineCron(other.getLegacyAppEngineCron()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -550,6 +671,12 @@ public Builder mergeFrom( break; } // case 10 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 case 40: { pageSize_ = input.readInt32(); @@ -562,6 +689,12 @@ public Builder mergeFrom( break; } // case 50 + case 56: + { + legacyAppEngineCron_ = input.readBool(); + + break; + } // case 56 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -700,6 +833,142 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * `filter` can be used to specify a subset of jobs.
+     * If `filter` equals `target_config="HttpConfig"`, then the http
+     * target jobs are retrieved. If `filter` equals
+     * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+     * retrieved. If `filter` equals `labels.foo=value1
+     * labels.foo=value2` then only jobs which are labeled with
+     * foo=value1 AND foo=value2 will be returned.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * `filter` can be used to specify a subset of jobs.
+     * If `filter` equals `target_config="HttpConfig"`, then the http
+     * target jobs are retrieved. If `filter` equals
+     * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+     * retrieved. If `filter` equals `labels.foo=value1
+     * labels.foo=value2` then only jobs which are labeled with
+     * foo=value1 AND foo=value2 will be returned.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * `filter` can be used to specify a subset of jobs.
+     * If `filter` equals `target_config="HttpConfig"`, then the http
+     * target jobs are retrieved. If `filter` equals
+     * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+     * retrieved. If `filter` equals `labels.foo=value1
+     * labels.foo=value2` then only jobs which are labeled with
+     * foo=value1 AND foo=value2 will be returned.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * `filter` can be used to specify a subset of jobs.
+     * If `filter` equals `target_config="HttpConfig"`, then the http
+     * target jobs are retrieved. If `filter` equals
+     * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+     * retrieved. If `filter` equals `labels.foo=value1
+     * labels.foo=value2` then only jobs which are labeled with
+     * foo=value1 AND foo=value2 will be returned.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * `filter` can be used to specify a subset of jobs.
+     * If `filter` equals `target_config="HttpConfig"`, then the http
+     * target jobs are retrieved. If `filter` equals
+     * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+     * retrieved. If `filter` equals `labels.foo=value1
+     * labels.foo=value2` then only jobs which are labeled with
+     * foo=value1 AND foo=value2 will be returned.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + private int pageSize_; /** * @@ -772,10 +1041,13 @@ public Builder clearPageSize() { * 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. + * [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. *
* * string page_token = 6; @@ -800,10 +1072,13 @@ public java.lang.String getPageToken() { * 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. + * [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. *
* * string page_token = 6; @@ -828,10 +1103,13 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * 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. + * [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. *
* * string page_token = 6; @@ -855,10 +1133,13 @@ public Builder setPageToken(java.lang.String value) { * 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. + * [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. *
* * string page_token = 6; @@ -878,10 +1159,13 @@ public Builder clearPageToken() { * 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. + * [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. *
* * string page_token = 6; @@ -900,6 +1184,64 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private boolean legacyAppEngineCron_; + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the jobs in the __cron
+     * queue will be listed instead.
+     * 
+ * + * bool legacy_app_engine_cron = 7; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the jobs in the __cron
+     * queue will be listed instead.
+     * 
+ * + * bool legacy_app_engine_cron = 7; + * + * @param value The legacyAppEngineCron to set. + * @return This builder for chaining. + */ + public Builder setLegacyAppEngineCron(boolean value) { + + legacyAppEngineCron_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the jobs in the __cron
+     * queue will be listed instead.
+     * 
+ * + * bool legacy_app_engine_cron = 7; + * + * @return This builder for chaining. + */ + public Builder clearLegacyAppEngineCron() { + + legacyAppEngineCron_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequestOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequestOrBuilder.java index b2a579c06702..e0c75e3fea9c 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequestOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsRequestOrBuilder.java @@ -54,6 +54,43 @@ public interface ListJobsRequestOrBuilder */ com.google.protobuf.ByteString getParentBytes(); + /** + * + * + *
+   * `filter` can be used to specify a subset of jobs.
+   * If `filter` equals `target_config="HttpConfig"`, then the http
+   * target jobs are retrieved. If `filter` equals
+   * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+   * retrieved. If `filter` equals `labels.foo=value1
+   * labels.foo=value2` then only jobs which are labeled with
+   * foo=value1 AND foo=value2 will be returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * `filter` can be used to specify a subset of jobs.
+   * If `filter` equals `target_config="HttpConfig"`, then the http
+   * target jobs are retrieved. If `filter` equals
+   * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
+   * retrieved. If `filter` equals `labels.foo=value1
+   * labels.foo=value2` then only jobs which are labeled with
+   * foo=value1 AND foo=value2 will be returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + /** * * @@ -78,10 +115,13 @@ public interface ListJobsRequestOrBuilder * 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. + * [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. *
* * string page_token = 6; @@ -96,10 +136,13 @@ public interface ListJobsRequestOrBuilder * 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. + * [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. *
* * string page_token = 6; @@ -107,4 +150,19 @@ public interface ListJobsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the jobs in the __cron
+   * queue will be listed instead.
+   * 
+ * + * bool legacy_app_engine_cron = 7; + * + * @return The legacyAppEngineCron. + */ + boolean getLegacyAppEngineCron(); } diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponse.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponse.java index 593883646664..42fc23e2e6d8 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponse.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponse.java @@ -22,7 +22,8 @@ * * *
- * Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+ * Response message for listing jobs using
+ * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ListJobsResponse} @@ -144,10 +145,11 @@ public com.google.cloud.scheduler.v1beta1.JobOrBuilder getJobsOrBuilder(int inde * *
    * A token to retrieve next page of results. Pass this value in the
-   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-   * If this is empty it indicates that there are no more results
-   * through which to paginate.
+   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+   * field in the subsequent call to
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+   * retrieve the next page of results. If this is empty it indicates that there
+   * are no more results through which to paginate.
    * The page token is valid for only 2 hours.
    * 
* @@ -172,10 +174,11 @@ public java.lang.String getNextPageToken() { * *
    * A token to retrieve next page of results. Pass this value in the
-   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-   * If this is empty it indicates that there are no more results
-   * through which to paginate.
+   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+   * field in the subsequent call to
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+   * retrieve the next page of results. If this is empty it indicates that there
+   * are no more results through which to paginate.
    * The page token is valid for only 2 hours.
    * 
* @@ -370,7 +373,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
+   * Response message for listing jobs using
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ListJobsResponse} @@ -950,10 +954,11 @@ public java.util.List getJobsBui * *
      * A token to retrieve next page of results. Pass this value in the
-     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-     * If this is empty it indicates that there are no more results
-     * through which to paginate.
+     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+     * field in the subsequent call to
+     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+     * retrieve the next page of results. If this is empty it indicates that there
+     * are no more results through which to paginate.
      * The page token is valid for only 2 hours.
      * 
* @@ -977,10 +982,11 @@ public java.lang.String getNextPageToken() { * *
      * A token to retrieve next page of results. Pass this value in the
-     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-     * If this is empty it indicates that there are no more results
-     * through which to paginate.
+     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+     * field in the subsequent call to
+     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+     * retrieve the next page of results. If this is empty it indicates that there
+     * are no more results through which to paginate.
      * The page token is valid for only 2 hours.
      * 
* @@ -1004,10 +1010,11 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * *
      * A token to retrieve next page of results. Pass this value in the
-     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-     * If this is empty it indicates that there are no more results
-     * through which to paginate.
+     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+     * field in the subsequent call to
+     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+     * retrieve the next page of results. If this is empty it indicates that there
+     * are no more results through which to paginate.
      * The page token is valid for only 2 hours.
      * 
* @@ -1030,10 +1037,11 @@ public Builder setNextPageToken(java.lang.String value) { * *
      * A token to retrieve next page of results. Pass this value in the
-     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-     * If this is empty it indicates that there are no more results
-     * through which to paginate.
+     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+     * field in the subsequent call to
+     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+     * retrieve the next page of results. If this is empty it indicates that there
+     * are no more results through which to paginate.
      * The page token is valid for only 2 hours.
      * 
* @@ -1052,10 +1060,11 @@ public Builder clearNextPageToken() { * *
      * A token to retrieve next page of results. Pass this value in the
-     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-     * If this is empty it indicates that there are no more results
-     * through which to paginate.
+     * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+     * field in the subsequent call to
+     * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+     * retrieve the next page of results. If this is empty it indicates that there
+     * are no more results through which to paginate.
      * The page token is valid for only 2 hours.
      * 
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponseOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponseOrBuilder.java index 37621cf5bcf3..1cdd3efbf78e 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponseOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ListJobsResponseOrBuilder.java @@ -79,10 +79,11 @@ public interface ListJobsResponseOrBuilder * *
    * A token to retrieve next page of results. Pass this value in the
-   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-   * If this is empty it indicates that there are no more results
-   * through which to paginate.
+   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+   * field in the subsequent call to
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+   * retrieve the next page of results. If this is empty it indicates that there
+   * are no more results through which to paginate.
    * The page token is valid for only 2 hours.
    * 
* @@ -96,10 +97,11 @@ public interface ListJobsResponseOrBuilder * *
    * A token to retrieve next page of results. Pass this value in the
-   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
-   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
-   * If this is empty it indicates that there are no more results
-   * through which to paginate.
+   * [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
+   * field in the subsequent call to
+   * [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
+   * retrieve the next page of results. If this is empty it indicates that there
+   * are no more results through which to paginate.
    * The page token is valid for only 2 hours.
    * 
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PauseJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PauseJobRequest.java index 209116f59a9d..0607e5a230b5 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PauseJobRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PauseJobRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
+ * Request message for
+ * [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.PauseJobRequest} @@ -285,7 +286,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
+   * Request message for
+   * [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.PauseJobRequest} diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTarget.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTarget.java index 67c363f70536..138f76ba0b3f 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTarget.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTarget.java @@ -88,7 +88,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { *
    * Required. The name of the Cloud Pub/Sub topic to which messages will
    * be published when a job is delivered. The topic name must be in the
-   * same format as required by PubSub's
+   * same format as required by Pub/Sub's
    * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
    * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
    * The topic must be in the same project as the Cloud Scheduler job.
@@ -116,7 +116,7 @@ public java.lang.String getTopicName() {
    * 
    * Required. The name of the Cloud Pub/Sub topic to which messages will
    * be published when a job is delivered. The topic name must be in the
-   * same format as required by PubSub's
+   * same format as required by Pub/Sub's
    * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
    * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
    * The topic must be in the same project as the Cloud Scheduler job.
@@ -680,7 +680,7 @@ public Builder mergeFrom(
      * 
      * Required. The name of the Cloud Pub/Sub topic to which messages will
      * be published when a job is delivered. The topic name must be in the
-     * same format as required by PubSub's
+     * same format as required by Pub/Sub's
      * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
      * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
      * The topic must be in the same project as the Cloud Scheduler job.
@@ -707,7 +707,7 @@ public java.lang.String getTopicName() {
      * 
      * Required. The name of the Cloud Pub/Sub topic to which messages will
      * be published when a job is delivered. The topic name must be in the
-     * same format as required by PubSub's
+     * same format as required by Pub/Sub's
      * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
      * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
      * The topic must be in the same project as the Cloud Scheduler job.
@@ -734,7 +734,7 @@ public com.google.protobuf.ByteString getTopicNameBytes() {
      * 
      * Required. The name of the Cloud Pub/Sub topic to which messages will
      * be published when a job is delivered. The topic name must be in the
-     * same format as required by PubSub's
+     * same format as required by Pub/Sub's
      * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
      * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
      * The topic must be in the same project as the Cloud Scheduler job.
@@ -760,7 +760,7 @@ public Builder setTopicName(java.lang.String value) {
      * 
      * Required. The name of the Cloud Pub/Sub topic to which messages will
      * be published when a job is delivered. The topic name must be in the
-     * same format as required by PubSub's
+     * same format as required by Pub/Sub's
      * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
      * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
      * The topic must be in the same project as the Cloud Scheduler job.
@@ -782,7 +782,7 @@ public Builder clearTopicName() {
      * 
      * Required. The name of the Cloud Pub/Sub topic to which messages will
      * be published when a job is delivered. The topic name must be in the
-     * same format as required by PubSub's
+     * same format as required by Pub/Sub's
      * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
      * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
      * The topic must be in the same project as the Cloud Scheduler job.
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTargetOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTargetOrBuilder.java
index ff10a72fb852..01427b014a13 100644
--- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTargetOrBuilder.java
+++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/PubsubTargetOrBuilder.java
@@ -29,7 +29,7 @@ public interface PubsubTargetOrBuilder
    * 
    * Required. The name of the Cloud Pub/Sub topic to which messages will
    * be published when a job is delivered. The topic name must be in the
-   * same format as required by PubSub's
+   * same format as required by Pub/Sub's
    * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
    * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
    * The topic must be in the same project as the Cloud Scheduler job.
@@ -46,7 +46,7 @@ public interface PubsubTargetOrBuilder
    * 
    * Required. The name of the Cloud Pub/Sub topic to which messages will
    * be published when a job is delivered. The topic name must be in the
-   * same format as required by PubSub's
+   * same format as required by Pub/Sub's
    * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
    * for example `projects/PROJECT_ID/topics/TOPIC_ID`.
    * The topic must be in the same project as the Cloud Scheduler job.
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ResumeJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ResumeJobRequest.java
index 606860bd3ebd..a447972d2996 100644
--- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ResumeJobRequest.java
+++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/ResumeJobRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
+ * Request message for
+ * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ResumeJobRequest} @@ -285,7 +286,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
+   * Request message for
+   * [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.ResumeJobRequest} diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfig.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfig.java index a1a4978676bc..011e45661689 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfig.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfig.java @@ -25,7 +25,8 @@ * Settings that determine the retry behavior. * By default, if a job does not complete successfully (meaning that * an acknowledgement is not received from the handler, then it will be retried - * with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. + * with exponential backoff according to the settings in + * [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. *
* * Protobuf type {@code google.cloud.scheduler.v1beta1.RetryConfig} @@ -105,8 +106,8 @@ public int getRetryCount() { *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -125,8 +126,8 @@ public boolean hasMaxRetryDuration() { *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -147,8 +148,8 @@ public com.google.protobuf.Duration getMaxRetryDuration() { *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -276,19 +277,24 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffDurationOrBuilder() { *
    * The time between retries will double `max_doublings` times.
    * A job's retry interval starts at
-   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
-   * `max_doublings` times, then increases linearly, and finally
-   * retries retries at intervals of
-   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
-   * For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
-   * 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
-   * `max_doublings` is 3, then the a job will first be retried in 10s. The
-   * retry interval will double three times, and then increase linearly by
-   * 2^3 * 10s.  Finally, the job will retry at intervals of
-   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
-   * been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
-   * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration],
+   * then doubles `max_doublings` times, then increases linearly, and finally
+   * retries at intervals of
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * times.
+   * For example, if
+   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration]
+   * is 10s,
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * is 300s, and `max_doublings` is 3, then the a job will first be retried in
+   * 10s. The retry interval will double three times, and then increase linearly
+   * by 2^3 * 10s.  Finally, the job will retry at intervals of
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * until the job has been attempted
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
+   * 300s, 300s, ....
    * The default value of this field is 5.
    * 
* @@ -518,7 +524,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Settings that determine the retry behavior. * By default, if a job does not complete successfully (meaning that * an acknowledgement is not received from the handler, then it will be retried - * with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. + * with exponential backoff according to the settings in + * [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. *
* * Protobuf type {@code google.cloud.scheduler.v1beta1.RetryConfig} @@ -855,8 +862,8 @@ public Builder clearRetryCount() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -874,8 +881,8 @@ public boolean hasMaxRetryDuration() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -899,8 +906,8 @@ public com.google.protobuf.Duration getMaxRetryDuration() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -926,8 +933,8 @@ public Builder setMaxRetryDuration(com.google.protobuf.Duration value) { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -950,8 +957,8 @@ public Builder setMaxRetryDuration(com.google.protobuf.Duration.Builder builderF *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -981,8 +988,8 @@ public Builder mergeMaxRetryDuration(com.google.protobuf.Duration value) { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -1006,8 +1013,8 @@ public Builder clearMaxRetryDuration() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -1025,8 +1032,8 @@ public com.google.protobuf.Duration.Builder getMaxRetryDurationBuilder() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -1048,8 +1055,8 @@ public com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder() { *
      * The time limit for retrying a failed job, measured from time when an
      * execution was first attempted. If specified with
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-     * limits are reached.
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+     * job will be retried until both limits are reached.
      * The default value for max_retry_duration is zero, which means retry
      * duration is unlimited.
      * 
@@ -1486,19 +1493,24 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffDurationOrBuilder() { *
      * The time between retries will double `max_doublings` times.
      * A job's retry interval starts at
-     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
-     * `max_doublings` times, then increases linearly, and finally
-     * retries retries at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
-     * For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
-     * 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
-     * `max_doublings` is 3, then the a job will first be retried in 10s. The
-     * retry interval will double three times, and then increase linearly by
-     * 2^3 * 10s.  Finally, the job will retry at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
-     * been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
-     * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration],
+     * then doubles `max_doublings` times, then increases linearly, and finally
+     * retries at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times.
+     * For example, if
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration]
+     * is 10s,
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * is 300s, and `max_doublings` is 3, then the a job will first be retried in
+     * 10s. The retry interval will double three times, and then increase linearly
+     * by 2^3 * 10s.  Finally, the job will retry at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * until the job has been attempted
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
+     * 300s, 300s, ....
      * The default value of this field is 5.
      * 
* @@ -1516,19 +1528,24 @@ public int getMaxDoublings() { *
      * The time between retries will double `max_doublings` times.
      * A job's retry interval starts at
-     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
-     * `max_doublings` times, then increases linearly, and finally
-     * retries retries at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
-     * For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
-     * 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
-     * `max_doublings` is 3, then the a job will first be retried in 10s. The
-     * retry interval will double three times, and then increase linearly by
-     * 2^3 * 10s.  Finally, the job will retry at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
-     * been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
-     * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration],
+     * then doubles `max_doublings` times, then increases linearly, and finally
+     * retries at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times.
+     * For example, if
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration]
+     * is 10s,
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * is 300s, and `max_doublings` is 3, then the a job will first be retried in
+     * 10s. The retry interval will double three times, and then increase linearly
+     * by 2^3 * 10s.  Finally, the job will retry at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * until the job has been attempted
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
+     * 300s, 300s, ....
      * The default value of this field is 5.
      * 
* @@ -1549,19 +1566,24 @@ public Builder setMaxDoublings(int value) { *
      * The time between retries will double `max_doublings` times.
      * A job's retry interval starts at
-     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
-     * `max_doublings` times, then increases linearly, and finally
-     * retries retries at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
-     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
-     * For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
-     * 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
-     * `max_doublings` is 3, then the a job will first be retried in 10s. The
-     * retry interval will double three times, and then increase linearly by
-     * 2^3 * 10s.  Finally, the job will retry at intervals of
-     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
-     * been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
-     * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration],
+     * then doubles `max_doublings` times, then increases linearly, and finally
+     * retries at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times.
+     * For example, if
+     * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration]
+     * is 10s,
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * is 300s, and `max_doublings` is 3, then the a job will first be retried in
+     * 10s. The retry interval will double three times, and then increase linearly
+     * by 2^3 * 10s.  Finally, the job will retry at intervals of
+     * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+     * until the job has been attempted
+     * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
+     * 300s, 300s, ....
      * The default value of this field is 5.
      * 
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfigOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfigOrBuilder.java index 7aa8a7a592a7..c21be87e40fa 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfigOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RetryConfigOrBuilder.java @@ -53,8 +53,8 @@ public interface RetryConfigOrBuilder *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -70,8 +70,8 @@ public interface RetryConfigOrBuilder *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -87,8 +87,8 @@ public interface RetryConfigOrBuilder *
    * The time limit for retrying a failed job, measured from time when an
    * execution was first attempted. If specified with
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both
-   * limits are reached.
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the
+   * job will be retried until both limits are reached.
    * The default value for max_retry_duration is zero, which means retry
    * duration is unlimited.
    * 
@@ -185,19 +185,24 @@ public interface RetryConfigOrBuilder *
    * The time between retries will double `max_doublings` times.
    * A job's retry interval starts at
-   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles
-   * `max_doublings` times, then increases linearly, and finally
-   * retries retries at intervals of
-   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to
-   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times.
-   * For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is
-   * 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and
-   * `max_doublings` is 3, then the a job will first be retried in 10s. The
-   * retry interval will double three times, and then increase linearly by
-   * 2^3 * 10s.  Finally, the job will retry at intervals of
-   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has
-   * been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the
-   * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
+   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration],
+   * then doubles `max_doublings` times, then increases linearly, and finally
+   * retries at intervals of
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * times.
+   * For example, if
+   * [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration]
+   * is 10s,
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * is 300s, and `max_doublings` is 3, then the a job will first be retried in
+   * 10s. The retry interval will double three times, and then increase linearly
+   * by 2^3 * 10s.  Finally, the job will retry at intervals of
+   * [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration]
+   * until the job has been attempted
+   * [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count]
+   * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
+   * 300s, 300s, ....
    * The default value of this field is 5.
    * 
* diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequest.java index 546ac6eeef4e..e86fddd51a69 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequest.java @@ -123,6 +123,26 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LEGACY_APP_ENGINE_CRON_FIELD_NUMBER = 2; + private boolean legacyAppEngineCron_; + /** + * + * + *
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the job in the __cron
+   * queue with the corresponding name will be forced to run instead.
+   * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -140,6 +160,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (legacyAppEngineCron_ != false) { + output.writeBool(2, legacyAppEngineCron_); + } getUnknownFields().writeTo(output); } @@ -152,6 +175,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (legacyAppEngineCron_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, legacyAppEngineCron_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -169,6 +195,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.scheduler.v1beta1.RunJobRequest) obj; if (!getName().equals(other.getName())) return false; + if (getLegacyAppEngineCron() != other.getLegacyAppEngineCron()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -182,6 +209,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LEGACY_APP_ENGINE_CRON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLegacyAppEngineCron()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -323,6 +352,8 @@ public Builder clear() { super.clear(); name_ = ""; + legacyAppEngineCron_ = false; + return this; } @@ -351,6 +382,7 @@ public com.google.cloud.scheduler.v1beta1.RunJobRequest buildPartial() { com.google.cloud.scheduler.v1beta1.RunJobRequest result = new com.google.cloud.scheduler.v1beta1.RunJobRequest(this); result.name_ = name_; + result.legacyAppEngineCron_ = legacyAppEngineCron_; onBuilt(); return result; } @@ -405,6 +437,9 @@ public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.RunJobRequest other) name_ = other.name_; onChanged(); } + if (other.getLegacyAppEngineCron() != false) { + setLegacyAppEngineCron(other.getLegacyAppEngineCron()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -437,6 +472,12 @@ public Builder mergeFrom( break; } // case 10 + case 16: + { + legacyAppEngineCron_ = input.readBool(); + + break; + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -575,6 +616,64 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private boolean legacyAppEngineCron_; + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be forced to run instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + @java.lang.Override + public boolean getLegacyAppEngineCron() { + return legacyAppEngineCron_; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be forced to run instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @param value The legacyAppEngineCron to set. + * @return This builder for chaining. + */ + public Builder setLegacyAppEngineCron(boolean value) { + + legacyAppEngineCron_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field is used to manage the legacy App Engine Cron jobs using the
+     * Cloud Scheduler API. If the field is set to true, the job in the __cron
+     * queue with the corresponding name will be forced to run instead.
+     * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return This builder for chaining. + */ + public Builder clearLegacyAppEngineCron() { + + legacyAppEngineCron_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequestOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequestOrBuilder.java index 2a0b110da824..77f37fd2e40b 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequestOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/RunJobRequestOrBuilder.java @@ -53,4 +53,19 @@ public interface RunJobRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * This field is used to manage the legacy App Engine Cron jobs using the
+   * Cloud Scheduler API. If the field is set to true, the job in the __cron
+   * queue with the corresponding name will be forced to run instead.
+   * 
+ * + * bool legacy_app_engine_cron = 2; + * + * @return The legacyAppEngineCron. + */ + boolean getLegacyAppEngineCron(); } diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/SchedulerProto.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/SchedulerProto.java index 5dfadd05ad84..6f3b93d90bf2 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/SchedulerProto.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/SchedulerProto.java @@ -79,68 +79,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ehavior.proto\032\031google/api/resource.proto" + "\032(google/cloud/scheduler/v1beta1/job.pro" + "to\032\033google/protobuf/empty.proto\032 google/" - + "protobuf/field_mask.proto\"s\n\017ListJobsReq" - + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!cloudsched" - + "uler.googleapis.com/Job\022\021\n\tpage_size\030\005 \001" - + "(\005\022\022\n\npage_token\030\006 \001(\t\"^\n\020ListJobsRespon" - + "se\0221\n\004jobs\030\001 \003(\0132#.google.cloud.schedule" - + "r.v1beta1.Job\022\027\n\017next_page_token\030\002 \001(\t\"H" - + "\n\rGetJobRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!c" - + "loudscheduler.googleapis.com/Job\"\204\001\n\020Cre" - + "ateJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!c" - + "loudscheduler.googleapis.com/Job\0225\n\003job\030" - + "\002 \001(\0132#.google.cloud.scheduler.v1beta1.J" - + "obB\003\340A\002\"z\n\020UpdateJobRequest\0225\n\003job\030\001 \001(\013" - + "2#.google.cloud.scheduler.v1beta1.JobB\003\340" - + "A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobu" - + "f.FieldMask\"K\n\020DeleteJobRequest\0227\n\004name\030" - + "\001 \001(\tB)\340A\002\372A#\n!cloudscheduler.googleapis" - + ".com/Job\"J\n\017PauseJobRequest\0227\n\004name\030\001 \001(" - + "\tB)\340A\002\372A#\n!cloudscheduler.googleapis.com" - + "/Job\"K\n\020ResumeJobRequest\0227\n\004name\030\001 \001(\tB)" + + "protobuf/field_mask.proto\"\243\001\n\017ListJobsRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!cloudsche" + + "duler.googleapis.com/Job\022\016\n\006filter\030\004 \001(\t" + + "\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_token\030\006 \001(\t\022" + + "\036\n\026legacy_app_engine_cron\030\007 \001(\010\"^\n\020ListJ" + + "obsResponse\0221\n\004jobs\030\001 \003(\0132#.google.cloud" + + ".scheduler.v1beta1.Job\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\"H\n\rGetJobRequest\0227\n\004name\030\001 \001(\tB)" + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Jo" - + "b\"H\n\rRunJobRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#" - + "\n!cloudscheduler.googleapis.com/Job2\246\013\n\016" - + "CloudScheduler\022\255\001\n\010ListJobs\022/.google.clo" - + "ud.scheduler.v1beta1.ListJobsRequest\0320.g" - + "oogle.cloud.scheduler.v1beta1.ListJobsRe" - + "sponse\">\202\323\344\223\002/\022-/v1beta1/{parent=project" - + "s/*/locations/*}/jobs\332A\006parent\022\232\001\n\006GetJo" - + "b\022-.google.cloud.scheduler.v1beta1.GetJo" + + "b\"\204\001\n\020CreateJobRequest\0229\n\006parent\030\001 \001(\tB)" + + "\340A\002\372A#\022!cloudscheduler.googleapis.com/Jo" + + "b\0225\n\003job\030\002 \001(\0132#.google.cloud.scheduler." + + "v1beta1.JobB\003\340A\002\"z\n\020UpdateJobRequest\0225\n\003" + + "job\030\001 \001(\0132#.google.cloud.scheduler.v1bet" + + "a1.JobB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMask\"k\n\020DeleteJobRequest" + + "\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!cloudscheduler.g" + + "oogleapis.com/Job\022\036\n\026legacy_app_engine_c" + + "ron\030\002 \001(\010\"J\n\017PauseJobRequest\0227\n\004name\030\001 \001" + + "(\tB)\340A\002\372A#\n!cloudscheduler.googleapis.co" + + "m/Job\"K\n\020ResumeJobRequest\0227\n\004name\030\001 \001(\tB" + + ")\340A\002\372A#\n!cloudscheduler.googleapis.com/J" + + "ob\"h\n\rRunJobRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A" + + "#\n!cloudscheduler.googleapis.com/Job\022\036\n\026" + + "legacy_app_engine_cron\030\002 \001(\0102\246\013\n\016CloudSc" + + "heduler\022\255\001\n\010ListJobs\022/.google.cloud.sche" + + "duler.v1beta1.ListJobsRequest\0320.google.c" + + "loud.scheduler.v1beta1.ListJobsResponse\"" + + ">\202\323\344\223\002/\022-/v1beta1/{parent=projects/*/loc" + + "ations/*}/jobs\332A\006parent\022\232\001\n\006GetJob\022-.goo" + + "gle.cloud.scheduler.v1beta1.GetJobReques" + + "t\032#.google.cloud.scheduler.v1beta1.Job\"<" + + "\202\323\344\223\002/\022-/v1beta1/{name=projects/*/locati" + + "ons/*/jobs/*}\332A\004name\022\253\001\n\tCreateJob\0220.goo" + + "gle.cloud.scheduler.v1beta1.CreateJobReq" + + "uest\032#.google.cloud.scheduler.v1beta1.Jo" + + "b\"G\202\323\344\223\0024\"-/v1beta1/{parent=projects/*/l" + + "ocations/*}/jobs:\003job\332A\nparent,job\022\264\001\n\tU" + + "pdateJob\0220.google.cloud.scheduler.v1beta" + + "1.UpdateJobRequest\032#.google.cloud.schedu" + + "ler.v1beta1.Job\"P\202\323\344\223\002821/v1beta1/{job.n" + + "ame=projects/*/locations/*/jobs/*}:\003job\332" + + "A\017job,update_mask\022\223\001\n\tDeleteJob\0220.google" + + ".cloud.scheduler.v1beta1.DeleteJobReques" + + "t\032\026.google.protobuf.Empty\"<\202\323\344\223\002/*-/v1be" + + "ta1/{name=projects/*/locations/*/jobs/*}" + + "\332A\004name\022\247\001\n\010PauseJob\022/.google.cloud.sche" + + "duler.v1beta1.PauseJobRequest\032#.google.c" + + "loud.scheduler.v1beta1.Job\"E\202\323\344\223\0028\"3/v1b" + + "eta1/{name=projects/*/locations/*/jobs/*" + + "}:pause:\001*\332A\004name\022\252\001\n\tResumeJob\0220.google" + + ".cloud.scheduler.v1beta1.ResumeJobReques" + + "t\032#.google.cloud.scheduler.v1beta1.Job\"F" + + "\202\323\344\223\0029\"4/v1beta1/{name=projects/*/locati" + + "ons/*/jobs/*}:resume:\001*\332A\004name\022\241\001\n\006RunJo" + + "b\022-.google.cloud.scheduler.v1beta1.RunJo" + "bRequest\032#.google.cloud.scheduler.v1beta" - + "1.Job\"<\202\323\344\223\002/\022-/v1beta1/{name=projects/*" - + "/locations/*/jobs/*}\332A\004name\022\253\001\n\tCreateJo" - + "b\0220.google.cloud.scheduler.v1beta1.Creat" - + "eJobRequest\032#.google.cloud.scheduler.v1b" - + "eta1.Job\"G\202\323\344\223\0024\"-/v1beta1/{parent=proje" - + "cts/*/locations/*}/jobs:\003job\332A\nparent,jo" - + "b\022\264\001\n\tUpdateJob\0220.google.cloud.scheduler" - + ".v1beta1.UpdateJobRequest\032#.google.cloud" - + ".scheduler.v1beta1.Job\"P\202\323\344\223\002821/v1beta1" - + "/{job.name=projects/*/locations/*/jobs/*" - + "}:\003job\332A\017job,update_mask\022\223\001\n\tDeleteJob\0220" - + ".google.cloud.scheduler.v1beta1.DeleteJo" - + "bRequest\032\026.google.protobuf.Empty\"<\202\323\344\223\002/" - + "*-/v1beta1/{name=projects/*/locations/*/" - + "jobs/*}\332A\004name\022\247\001\n\010PauseJob\022/.google.clo" - + "ud.scheduler.v1beta1.PauseJobRequest\032#.g" - + "oogle.cloud.scheduler.v1beta1.Job\"E\202\323\344\223\002" - + "8\"3/v1beta1/{name=projects/*/locations/*" - + "/jobs/*}:pause:\001*\332A\004name\022\252\001\n\tResumeJob\0220" - + ".google.cloud.scheduler.v1beta1.ResumeJo" - + "bRequest\032#.google.cloud.scheduler.v1beta" - + "1.Job\"F\202\323\344\223\0029\"4/v1beta1/{name=projects/*" - + "/locations/*/jobs/*}:resume:\001*\332A\004name\022\241\001" - + "\n\006RunJob\022-.google.cloud.scheduler.v1beta" - + "1.RunJobRequest\032#.google.cloud.scheduler" - + ".v1beta1.Job\"C\202\323\344\223\0026\"1/v1beta1/{name=pro" - + "jects/*/locations/*/jobs/*}:run:\001*\332A\004nam" - + "e\032Q\312A\035cloudscheduler.googleapis.com\322A.ht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "formB\213\001\n\"com.google.cloud.scheduler.v1be" - + "ta1B\016SchedulerProtoP\001ZGgoogle.golang.org" - + "/genproto/googleapis/cloud/scheduler/v1b" - + "eta1;scheduler\242\002\tSCHEDULERb\006proto3" + + "1.Job\"C\202\323\344\223\0026\"1/v1beta1/{name=projects/*" + + "/locations/*/jobs/*}:run:\001*\332A\004name\032Q\312A\035c" + + "loudscheduler.googleapis.com\322A.https://w" + + "ww.googleapis.com/auth/cloud-platformB\213\001" + + "\n\"com.google.cloud.scheduler.v1beta1B\016Sc" + + "hedulerProtoP\001ZGgoogle.golang.org/genpro" + + "to/googleapis/cloud/scheduler/v1beta1;sc" + + "heduler\242\002\tSCHEDULERb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -160,7 +163,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_scheduler_v1beta1_ListJobsRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "Filter", "PageSize", "PageToken", "LegacyAppEngineCron", }); internal_static_google_cloud_scheduler_v1beta1_ListJobsResponse_descriptor = getDescriptor().getMessageTypes().get(1); @@ -200,7 +203,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_scheduler_v1beta1_DeleteJobRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "LegacyAppEngineCron", }); internal_static_google_cloud_scheduler_v1beta1_PauseJobRequest_descriptor = getDescriptor().getMessageTypes().get(6); @@ -224,7 +227,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_scheduler_v1beta1_RunJobRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "LegacyAppEngineCron", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequest.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequest.java index 85cfad0f9e62..95a760324deb 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequest.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+ * Request message for
+ * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
  * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.UpdateJobRequest} @@ -71,7 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
@@ -89,7 +91,8 @@ public boolean hasJob() { * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
@@ -107,7 +110,8 @@ public com.google.cloud.scheduler.v1beta1.Job getJob() { * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
@@ -348,7 +352,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
+   * Request message for
+   * [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
    * 
* * Protobuf type {@code google.cloud.scheduler.v1beta1.UpdateJobRequest} @@ -552,7 +557,8 @@ public Builder mergeFrom( * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -569,7 +575,8 @@ public boolean hasJob() { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -590,7 +597,8 @@ public com.google.cloud.scheduler.v1beta1.Job getJob() { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -615,7 +623,8 @@ public Builder setJob(com.google.cloud.scheduler.v1beta1.Job value) { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -637,7 +646,8 @@ public Builder setJob(com.google.cloud.scheduler.v1beta1.Job.Builder builderForV * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -666,7 +676,8 @@ public Builder mergeJob(com.google.cloud.scheduler.v1beta1.Job value) { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -689,7 +700,8 @@ public Builder clearJob() { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -706,7 +718,8 @@ public com.google.cloud.scheduler.v1beta1.Job.Builder getJobBuilder() { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
@@ -725,7 +738,8 @@ public com.google.cloud.scheduler.v1beta1.JobOrBuilder getJobOrBuilder() { * * *
-     * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+     * Required. The new job properties.
+     * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
      * Output only fields cannot be modified using UpdateJob.
      * Any value specified for an output only field will be ignored.
      * 
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequestOrBuilder.java b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequestOrBuilder.java index f1df96597041..96293818b80b 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequestOrBuilder.java +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/java/com/google/cloud/scheduler/v1beta1/UpdateJobRequestOrBuilder.java @@ -27,7 +27,8 @@ public interface UpdateJobRequestOrBuilder * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
@@ -42,7 +43,8 @@ public interface UpdateJobRequestOrBuilder * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
@@ -57,7 +59,8 @@ public interface UpdateJobRequestOrBuilder * * *
-   * Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
+   * Required. The new job properties.
+   * [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
    * Output only fields cannot be modified using UpdateJob.
    * Any value specified for an output only field will be ignored.
    * 
diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/cloudscheduler.proto b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/cloudscheduler.proto index 4f86b7a56218..f9a2da03ff22 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/cloudscheduler.proto +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/cloudscheduler.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -35,7 +34,8 @@ option objc_class_prefix = "SCHEDULER"; // schedule asynchronous jobs. service CloudScheduler { option (google.api.default_host) = "cloudscheduler.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { @@ -64,13 +64,14 @@ service CloudScheduler { // Updates a job. // - // If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does - // not exist, `NOT_FOUND` is returned. + // If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is + // returned. If the job does not exist, `NOT_FOUND` is returned. // // If UpdateJob does not successfully return, it is possible for the - // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may - // not be executed. If this happens, retry the UpdateJob request - // until a successful response is received. + // job to be in an + // [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] + // state. A job in this state may not be executed. If this happens, retry the + // UpdateJob request until a successful response is received. rpc UpdateJob(UpdateJobRequest) returns (Job) { option (google.api.http) = { patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}" @@ -90,10 +91,14 @@ service CloudScheduler { // Pauses a job. // // If a job is paused then the system will stop executing the job - // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The - // state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it - // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] - // to be paused. + // until it is re-enabled via + // [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The + // state of the job is stored in + // [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set + // to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A + // job must be in + // [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be + // paused. rpc PauseJob(PauseJobRequest) returns (Job) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause" @@ -104,10 +109,15 @@ service CloudScheduler { // Resume a job. // - // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The - // state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it - // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in - // [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. + // This method reenables a job after it has been + // [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The + // state of a job is stored in + // [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this + // method it will be set to + // [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A + // job must be in + // [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be + // resumed. rpc ResumeJob(ResumeJobRequest) returns (Job) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume" @@ -129,7 +139,8 @@ service CloudScheduler { } } -// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. +// Request message for listing jobs using +// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. message ListJobsRequest { // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. @@ -140,6 +151,16 @@ message ListJobsRequest { } ]; + // `filter` can be used to specify a subset of jobs. + // + // If `filter` equals `target_config="HttpConfig"`, then the http + // target jobs are retrieved. If `filter` equals + // `target_config="PubSubConfig"`, then the Pub/Sub target jobs are + // retrieved. If `filter` equals `labels.foo=value1 + // labels.foo=value2` then only jobs which are labeled with + // foo=value1 AND foo=value2 will be returned. + string filter = 4; + // Requested page size. // // The maximum page size is 500. If unspecified, the page size will @@ -151,29 +172,40 @@ message ListJobsRequest { // 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. + // [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. string page_token = 6; + + // This field is used to manage the legacy App Engine Cron jobs using the + // Cloud Scheduler API. If the field is set to true, the jobs in the __cron + // queue will be listed instead. + bool legacy_app_engine_cron = 7; } -// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. +// Response message for listing jobs using +// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. message ListJobsResponse { // The list of jobs. repeated Job jobs = 1; // A token to retrieve next page of results. Pass this value in the - // [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to - // [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results. - // If this is empty it indicates that there are no more results - // through which to paginate. + // [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] + // field in the subsequent call to + // [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to + // retrieve the next page of results. If this is empty it indicates that there + // are no more results through which to paginate. // // The page token is valid for only 2 hours. string next_page_token = 2; } -// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob]. +// Request message for +// [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob]. message GetJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. @@ -185,7 +217,8 @@ message GetJobRequest { ]; } -// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob]. +// Request message for +// [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob]. message CreateJobRequest { // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. @@ -197,16 +230,19 @@ message CreateJobRequest { ]; // Required. The job to add. The user can optionally specify a name for the - // job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an + // job in [name][google.cloud.scheduler.v1beta1.Job.name]. + // [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an // existing job. If a name is not specified then the system will // generate a random unique name that will be returned // ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response. Job job = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. +// Request message for +// [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. message UpdateJobRequest { - // Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified. + // Required. The new job properties. + // [name][google.cloud.scheduler.v1beta1.Job.name] must be specified. // // Output only fields cannot be modified using UpdateJob. // Any value specified for an output only field will be ignored. @@ -227,9 +263,15 @@ message DeleteJobRequest { type: "cloudscheduler.googleapis.com/Job" } ]; + + // This field is used to manage the legacy App Engine Cron jobs using the + // Cloud Scheduler API. If the field is set to true, the job in the __cron + // queue with the corresponding name will be deleted instead. + bool legacy_app_engine_cron = 2; } -// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob]. +// Request message for +// [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob]. message PauseJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. @@ -241,7 +283,8 @@ message PauseJobRequest { ]; } -// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. +// Request message for +// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. message ResumeJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. @@ -264,4 +307,9 @@ message RunJobRequest { type: "cloudscheduler.googleapis.com/Job" } ]; + + // This field is used to manage the legacy App Engine Cron jobs using the + // Cloud Scheduler API. If the field is set to true, the job in the __cron + // queue with the corresponding name will be forced to run instead. + bool legacy_app_engine_cron = 2; } diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/job.proto b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/job.proto index 4e8e3777fc82..2353beecac83 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/job.proto +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; package google.cloud.scheduler.v1beta1; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1beta1/target.proto"; import "google/protobuf/duration.proto"; @@ -29,7 +29,7 @@ option java_outer_classname = "JobProto"; option java_package = "com.google.cloud.scheduler.v1beta1"; // Configuration for a job. -// The maximum allowed size for a job is 100KB. +// The maximum allowed size for a job is 1MB. message Job { option (google.api.resource) = { type: "cloudscheduler.googleapis.com/Job" @@ -53,13 +53,16 @@ message Job { // cannot directly set a job to be disabled. DISABLED = 3; - // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] + // The job state resulting from a failed + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] // operation. To recover a job from this state, retry - // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] until a successful response is received. + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob] + // until a successful response is received. UPDATE_FAILED = 4; } - // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after + // Optionally caller-specified in + // [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob], after // which it becomes output only. // // The job name. For example: @@ -78,7 +81,8 @@ message Job { // hyphens (-), or underscores (_). The maximum length is 500 characters. string name = 1; - // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or + // Optionally caller-specified in + // [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or // [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. // // A human-readable description for the job. This string must not contain @@ -99,13 +103,14 @@ message Job { HttpTarget http_target = 6; } - // Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. + // Required, except when used with + // [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob]. // // Describes the schedule on which the job will be executed. // // The schedule can be either of the following types: // - // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + // * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) // * English-like // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) // @@ -118,15 +123,17 @@ message Job { // A scheduled start time will be delayed if the previous // execution has not ended when its scheduled time occurs. // - // If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails, - // the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] + // If [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > + // 0 and a job attempt fails, the job will be tried a total of + // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] // times, with exponential backoff, until the next scheduled start // time. string schedule = 20; // Specifies the time zone to be used in interpreting - // [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this field must be a time - // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). + // [schedule][google.cloud.scheduler.v1beta1.Job.schedule]. The value of this + // field must be a time zone name from the [tz + // database](http://en.wikipedia.org/wiki/Tz_database). // // Note that some time zones include a provision for // daylight savings time. The rules for daylight saving time are @@ -161,20 +168,38 @@ message Job { // execution logs. Cloud Scheduler will retry the job according // to the [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. // - // The allowed duration for this deadline is: + // The default and the allowed values depend on the type of target: + // + // * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the + // default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + // minutes]. // - // * For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], between 15 seconds and 30 minutes. - // * For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], between 15 - // seconds and 24 hours. - // * For [PubSub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored. + // * For [App Engine HTTP + // targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 + // indicates that the request has the default deadline. The default deadline + // depends on the scaling type of the service: 10 minutes for standard apps + // with automatic scaling, 24 hours for standard apps with manual and basic + // scaling, and 60 minutes for flex apps. If the request deadline is set, it + // must be in the interval [15 seconds, 24 hours 15 seconds]. + // + // * For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], + // this field is ignored. google.protobuf.Duration attempt_deadline = 22; + + // Immutable. This field is used to manage the legacy App Engine Cron jobs + // using the Cloud Scheduler API. If the field is set to true, the job will be + // considered a legacy job. Note that App Engine Cron jobs have fewer + // features than Cloud Scheduler jobs, e.g., are only limited to App Engine + // targets. + bool legacy_app_engine_cron = 23 [(google.api.field_behavior) = IMMUTABLE]; } // Settings that determine the retry behavior. // // By default, if a job does not complete successfully (meaning that // an acknowledgement is not received from the handler, then it will be retried -// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. +// with exponential backoff according to the settings in +// [RetryConfig][google.cloud.scheduler.v1beta1.RetryConfig]. message RetryConfig { // The number of attempts that the system will make to run a job using the // exponential backoff procedure described by @@ -196,8 +221,8 @@ message RetryConfig { // The time limit for retrying a failed job, measured from time when an // execution was first attempted. If specified with - // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the job will be retried until both - // limits are reached. + // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count], the + // job will be retried until both limits are reached. // // The default value for max_retry_duration is zero, which means retry // duration is unlimited. @@ -218,20 +243,25 @@ message RetryConfig { // The time between retries will double `max_doublings` times. // // A job's retry interval starts at - // [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], then doubles - // `max_doublings` times, then increases linearly, and finally - // retries retries at intervals of - // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] up to - // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. - // - // For example, if [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] is - // 10s, [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] is 300s, and - // `max_doublings` is 3, then the a job will first be retried in 10s. The - // retry interval will double three times, and then increase linearly by - // 2^3 * 10s. Finally, the job will retry at intervals of - // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] until the job has - // been attempted [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times. Thus, the - // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + // [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration], + // then doubles `max_doublings` times, then increases linearly, and finally + // retries at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] + // up to [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] + // times. + // + // For example, if + // [min_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.min_backoff_duration] + // is 10s, + // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] + // is 300s, and `max_doublings` is 3, then the a job will first be retried in + // 10s. The retry interval will double three times, and then increase linearly + // by 2^3 * 10s. Finally, the job will retry at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1beta1.RetryConfig.max_backoff_duration] + // until the job has been attempted + // [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, + // 300s, 300s, .... // // The default value of this field is 5. int32 max_doublings = 5; diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/target.proto b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/target.proto index 7f5214f593e6..f98f210dc40c 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/target.proto +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/src/main/proto/google/cloud/scheduler/v1beta1/target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,10 +22,15 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1bet option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.scheduler.v1beta1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; // Http target. The job will be pushed to the job handler by means of -// an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as HTTP -// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP +// an HTTP request via an +// [http_method][google.cloud.scheduler.v1beta1.HttpTarget.http_method] such as +// HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP // response code in the range [200 - 299]. A failure to receive a response // constitutes a failed execution. For a redirected request, the response // returned by the redirected request is considered. @@ -55,6 +59,11 @@ message HttpTarget { // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. // * `X-Google-*`: Google internal use only. // * `X-AppEngine-*`: Google internal use only. + // * `X-CloudScheduler`: This header will be set to true. + // * `X-CloudScheduler-JobName`: This header will contain the job name. + // * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + // the unix-cron format, this header will contain the job schedule time in + // RFC3339 UTC "Zulu" format. // // The total size of headers must be less than 80KB. map headers = 3; @@ -66,7 +75,8 @@ message HttpTarget { // The mode for generating an `Authorization` header for HTTP requests. // - // If specified, all `Authorization` headers in the [HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.headers] + // If specified, all `Authorization` headers in the + // [HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.headers] // field will be overridden. oneof authorization_header { // If specified, an @@ -91,14 +101,14 @@ message HttpTarget { } // App Engine target. The job will be pushed to a job handler by means -// of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] such -// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an -// HTTP response code in the range [200 - 299]. Error 503 is -// considered an App Engine system error instead of an application -// error. Requests returning error 503 will be retried regardless of -// retry configuration and not counted against retry counts. Any other -// response code, or a failure to receive a response before the -// deadline, constitutes a failed attempt. +// of an HTTP request via an +// [http_method][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.http_method] +// such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP +// response code in the range [200 - 299]. Error 503 is considered an App Engine +// system error instead of an application error. Requests returning error 503 +// will be retried regardless of retry configuration and not counted against +// retry counts. Any other response code, or a failure to receive a response +// before the deadline, constitutes a failed attempt. message AppEngineHttpTarget { // The HTTP method to use for the request. PATCH and OPTIONS are not // permitted. @@ -128,9 +138,14 @@ message AppEngineHttpTarget { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // * `X-CloudScheduler`: This header will be set to true. + // * `X-CloudScheduler-JobName`: This header will contain the job name. + // * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + // the unix-cron format, this header will contain the job schedule time in + // RFC3339 UTC "Zulu" format. // - // If the job has an [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud Scheduler sets - // the following headers: + // If the job has an + // [body][google.cloud.scheduler.v1beta1.AppEngineHttpTarget.body], Cloud + // Scheduler sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to // `"application/octet-stream"`. The default can be overridden by explictly @@ -153,7 +168,8 @@ message AppEngineHttpTarget { // // HTTP request body. A request body is allowed only if the HTTP method is // POST or PUT. It will result in invalid argument error to set a body on a - // job with an incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. + // job with an incompatible + // [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. bytes body = 5; } @@ -162,14 +178,14 @@ message AppEngineHttpTarget { message PubsubTarget { // Required. The name of the Cloud Pub/Sub topic to which messages will // be published when a job is delivered. The topic name must be in the - // same format as required by PubSub's + // same format as required by Pub/Sub's // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), // for example `projects/PROJECT_ID/topics/TOPIC_ID`. // // The topic must be in the same project as the Cloud Scheduler job. - string topic_name = 1 [(google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - }]; + string topic_name = 1 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // The message payload for PubsubMessage. // @@ -215,7 +231,7 @@ message AppEngineRouting { // // Requests can only be sent to a specific instance if // [manual scaling is used in App Engine - // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). // App Engine Flex does not support instances. For more information, see // [App Engine Standard request // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -244,43 +260,51 @@ message AppEngineRouting { // example .appspot.com, which is associated with the // job's project ID. // - // * `service =` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // * `service =` + // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] // - // * `version =` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + // * `version =` + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] // // * `version_dot_service =` - // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` - // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' + // +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] // - // * `instance =` [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] + // * `instance =` + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] // // * `instance_dot_service =` - // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + // '.' +` [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] // // * `instance_dot_version =` - // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + // '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] // // * `instance_dot_version_dot_service =` - // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ '.' +` - // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] `+ '.' +` + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] `+ + // '.' +` [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] + // `+ '.' +` // [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] // // - // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is empty, then the job will be sent - // to the service which is the default service when the job is attempted. + // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service] is + // empty, then the job will be sent to the service which is the default + // service when the job is attempted. // - // If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is empty, then the job will be sent - // to the version which is the default version when the job is attempted. + // If [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version] is + // empty, then the job will be sent to the version which is the default + // version when the job is attempted. // - // If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is empty, then the job will be - // sent to an instance which is available when the job is attempted. + // If [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + // empty, then the job will be sent to an instance which is available when the + // job is attempted. // // If [service][google.cloud.scheduler.v1beta1.AppEngineRouting.service], // [version][google.cloud.scheduler.v1beta1.AppEngineRouting.version], or - // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is invalid, then the job will be sent - // to the default version of the default service when the job is attempted. + // [instance][google.cloud.scheduler.v1beta1.AppEngineRouting.instance] is + // invalid, then the job will be sent to the default version of the default + // service when the job is attempted. string host = 4; } @@ -345,11 +369,3 @@ message OidcToken { // specified in target will be used. string audience = 2; } - -// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, -// but we do not import that proto directly; therefore, we redefine the -// pattern here. -option (google.api.resource_definition) = { - type: "pubsub.googleapis.com/Topic" - pattern: "projects/{project}/topics/{topic}" -}; diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/AsyncDeleteJob.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/AsyncDeleteJob.java index a69f0d23a688..99bda6875f10 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/AsyncDeleteJob.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/AsyncDeleteJob.java @@ -39,6 +39,7 @@ public static void asyncDeleteJob() throws Exception { DeleteJobRequest request = DeleteJobRequest.newBuilder() .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setLegacyAppEngineCron(true) .build(); ApiFuture future = cloudSchedulerClient.deleteJobCallable().futureCall(request); // Do something. diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/SyncDeleteJob.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/SyncDeleteJob.java index 357cf85c022c..c30917eb8ec0 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/SyncDeleteJob.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/deletejob/SyncDeleteJob.java @@ -38,6 +38,7 @@ public static void syncDeleteJob() throws Exception { DeleteJobRequest request = DeleteJobRequest.newBuilder() .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setLegacyAppEngineCron(true) .build(); cloudSchedulerClient.deleteJob(request); } diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/AsyncGetLocation.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..d3cc52cef3ac --- /dev/null +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1.samples; + +// [START cloudscheduler_v1beta1_generated_CloudScheduler_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.scheduler.v1beta1.CloudSchedulerClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudSchedulerClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END cloudscheduler_v1beta1_generated_CloudScheduler_GetLocation_async] diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/SyncGetLocation.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..ca9f9f213e33 --- /dev/null +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1.samples; + +// [START cloudscheduler_v1beta1_generated_CloudScheduler_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.scheduler.v1beta1.CloudSchedulerClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudSchedulerClient.getLocation(request); + } + } +} +// [END cloudscheduler_v1beta1_generated_CloudScheduler_GetLocation_sync] diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobs.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobs.java index 5fcfc55ab137..70011687181d 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobs.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobs.java @@ -39,8 +39,10 @@ public static void asyncListJobs() throws Exception { ListJobsRequest request = ListJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setLegacyAppEngineCron(true) .build(); ApiFuture future = cloudSchedulerClient.listJobsPagedCallable().futureCall(request); // Do something. diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobsPaged.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobsPaged.java index c30c7936a979..d8746bc8a83c 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobsPaged.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/AsyncListJobsPaged.java @@ -40,8 +40,10 @@ public static void asyncListJobsPaged() throws Exception { ListJobsRequest request = ListJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setLegacyAppEngineCron(true) .build(); while (true) { ListJobsResponse response = cloudSchedulerClient.listJobsCallable().call(request); diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/SyncListJobs.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/SyncListJobs.java index 05ae607eb261..162c43d22dc4 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/SyncListJobs.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listjobs/SyncListJobs.java @@ -38,8 +38,10 @@ public static void syncListJobs() throws Exception { ListJobsRequest request = ListJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") + .setLegacyAppEngineCron(true) .build(); for (Job element : cloudSchedulerClient.listJobs(request).iterateAll()) { // doThingsWith(element); diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocations.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..161afe7f0637 --- /dev/null +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1.samples; + +// [START cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.scheduler.v1beta1.CloudSchedulerClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudSchedulerClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_async] diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocationsPaged.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..fad98d146325 --- /dev/null +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1.samples; + +// [START cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.scheduler.v1beta1.CloudSchedulerClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudSchedulerClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_Paged_async] diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/SyncListLocations.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..65dc17183186 --- /dev/null +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.scheduler.v1beta1.samples; + +// [START cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.scheduler.v1beta1.CloudSchedulerClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudSchedulerClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudscheduler_v1beta1_generated_CloudScheduler_ListLocations_sync] diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/AsyncRunJob.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/AsyncRunJob.java index c6bbedf51e4b..69e9f28f2318 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/AsyncRunJob.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/AsyncRunJob.java @@ -39,6 +39,7 @@ public static void asyncRunJob() throws Exception { RunJobRequest request = RunJobRequest.newBuilder() .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setLegacyAppEngineCron(true) .build(); ApiFuture future = cloudSchedulerClient.runJobCallable().futureCall(request); // Do something. diff --git a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/SyncRunJob.java b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/SyncRunJob.java index 7be43db81c41..15e92908f676 100644 --- a/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/SyncRunJob.java +++ b/java-scheduler/samples/snippets/generated/com/google/cloud/scheduler/v1beta1/cloudscheduler/runjob/SyncRunJob.java @@ -38,6 +38,7 @@ public static void syncRunJob() throws Exception { RunJobRequest request = RunJobRequest.newBuilder() .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setLegacyAppEngineCron(true) .build(); Job response = cloudSchedulerClient.runJob(request); } diff --git a/versions.txt b/versions.txt index a7c8d4a2bf0f..26acef5dc131 100644 --- a/versions.txt +++ b/versions.txt @@ -599,4 +599,4 @@ google-cloud-monitoring-metricsscope:0.1.0:0.1.0 proto-google-cloud-monitoring-metricsscope-v1:0.1.0:0.1.0 grpc-google-cloud-monitoring-metricsscope-v1:0.1.0:0.1.0 proto-google-cloud-tpu-v2:2.8.0:2.8.0 -grpc-google-cloud-tpu-v2:2.8.0:2.8.0 \ No newline at end of file +grpc-google-cloud-tpu-v2:2.8.0:2.8.0